BSDInstall ISO images

Warner Losh imp at bsdimp.com
Mon Jan 10 13:01:01 UTC 2011


On 01/08/2011 15:54, Nathan Whitehorn wrote:
> I've spent some time integrating bsdinstall into startup of install 
> CDs, mostly related to building useful live-CD-based installers. An 
> i386 image can be found here (other architectures may follow, as my 
> very slow DSL line permits):
>
> http://people.freebsd.org/~nwhitehorn/bsdinstall-i386-20110108.iso.bz2
>
> The source for this can be found at:
>
> svn://svn.freebsd.org/base/user/nwhitehorn/bsdinstall
>
> The bits related to live CD usage are the testsystem.sh and rc.local 
> files. Instead of running sysinstall as an init replacement, I have 
> written a small rc.local script that gives the user the option to 
> either start the installer, open a single-user-mode style shell, or to 
> continue to boot to a multi-user live CD. Also, instead of the md root 
> used by sysinstall, this just boots from the CD directly. This 
> prevents the need for sysinstall's media selection, since the 
> distribution files are in the mounted root file system.
>
> I would appreciate any comments or test results.

We do something very similar in the FreeNAS installer.  We boot to a 
menu that's run out of /etc/rc.  We further have good so that we boot a 
livecd-ish thing that was inherited from Freesbie.  This works out very 
well, and moves a lot of the silly hair outside of the installer.  The 
installer we have is a dirt-simple front-end to a pc-sysinstall backend.

We actually run off a GZIP'd MD root for this, however.  We do this for 
space reasons, but frankly we don't have to do it for that.  We build 
the md root as a by-product of our nanobsd build of FreeNAS.  But we 
also assume that the distribution mechanism is the installed media.

The one down side to this level of indirection is that we have to find 
the /dev/cd* or /dev/acd* device that has our image on it, so we have to 
look at startup.  So far, we haven't had issues with that, but it does 
mean that I had to start to get creative when I was looking for things 
so cases like 'user extracts .iso onto a ufs that's on a thumb drive' 
work.  The minor upside to this is that you can boot off a CD and then 
do the install off a DVD if you wanted to.  FreeNAS has no need for 
that, but other systems might (I have lots of PCs around here that can 
boot off CDROM, but have a USB DVD drive during the install).  This was 
handy for putting PC-BSD on a couple of systems that were like that 
since pc-bsd only has a DVD image due to its size.

I'd still offer a way to select the install media, since maybe I booted 
8.2R CD so I could net install 8.3R from ftp.freebsd.org.

You are most welcome to use any/all/none of the FreeNAS bits if you wanted.

Warner


More information about the freebsd-arch mailing list