Custom release ISO questions.

Paul Wootton paul-freebsd at fletchermoorland.co.uk
Wed Sep 4 12:40:41 UTC 2013


On 09/04/13 10:27, Sergey wrote:
> Hi all!
>
> Is there a way to create custom ISO without buildworld?
> I just want to edit some configs and bsdinstall scripts for silent
> automated install - why need to recompile whole world?
> It will be great if you'll share some useful links about this process.
>
> Thanks.

Hi,

To create a custom ISO, download the ISO you want to use as your base, 
use tar to extract the ISO into a new directory, make the changes you 
want and then run "mkisofs -V FreeBSD9 -J -R -b boot/cdboot 
-no-emul-boot -o ../freebsd_custom.iso ." from the new directory.
That will create a bootable CD.

What I did when making a custom install CD for my server (it's 1000s of 
miles away in a datacenter) was a slightly different approach.
I created a sparse file (sparse to save on disk space) the exact size of 
my server harddrive on my running BSD box, used mdconfig to give me a md 
device and pointed VirtualBox at it. Within a VBox session, I did a 
normal install (manually created the ZFS filing systems), made all the 
config changes I wanted, installed the apps I wanted then shut the VBox 
session down. I DD-ed in the md device and piped it to bzip2, creating a 
bz2 file. Added the bz2 file to the custom BSD install ISO and modified 
/etc/rc.local file to un-bzip the bz2 file, pipe it to mbuffer (so the 
opperator could see something was happening) and write the output to the 
harddrive, popping the reset line when complete.
When the server restarted, it was configured with all the right user 
accounts, ip addresses, nameserver settings etc.

Just my 2 pence worth...

Paul


More information about the freebsd-questions mailing list