Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Sep 2013 13:17:35 +0100
From:      Paul Wootton <paul-freebsd@fletchermoorland.co.uk>
To:        Sergey <power.real@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Custom release ISO questions.
Message-ID:  <522724DF.1020702@fletchermoorland.co.uk>
In-Reply-To: <CAJwTraWxXEAbskvMzztpV=f-_aGLh_q=DVxfZhxqGBYby5=N4w@mail.gmail.com>
References:  <CAJwTraWxXEAbskvMzztpV=f-_aGLh_q=DVxfZhxqGBYby5=N4w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?522724DF.1020702>