Solved bsdinstall installerconfig copy files to chrooted new system


New Member

Messages: 5


I'm using a custom ISO with a bsdinstall installerconfig script.

What I know is that installerconfig is splitted by bsdinstall and everything behind the shebang (included itself) is executed after installation in the chrooted new system freshly installed. And that works pretty well ;)

But, I can't achieve a file copy from my custom ISO to the new system ! Hence I'm limited to the old school cat in the second part of my installerconfig...
cat > /my/new/system/ << EOL
And I have to escape my $ to make them print on the final file...

Anyone with a clever idea ?

I appreciate your time on reading,


New Member

Messages: 5

OK, I re (re) RTFM bsdinstall(8)...

For the record, the first part of installerconfig called PREAMBLE is:
[...] interpreted as a sh(1) script run at the very beginning of the install [...]
Which led me to just write cp /my/customiso/ /mnt/etc/ in the preamble, but I was wrong, /mnt is nothing and readonly on this step...

Then I read bsdinstall script content.

No way to get the new system to RW without "rewriting" a part of bsdinstall script (between the execution of /tmp/bsdinstall-installscript-aa and /tmp/bsdinstall-installscript-ab).

So I ended up altering /usr/libexec/bsdinstall/script on my custom ISO with cp /my/customiso/ $BSDINSTALL_CHROOT/etc/ just before it copies itself bsdinstall-installscript-ab to the new system...



Reaction score: 4
Messages: 36

To copy file to installdir, add your txz file in environment DISTRIBUTIONS, it's the standard way.