Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2009 17:14:02 -0600
From:      Peter Steele <psteele@maxiscale.com>
To:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Converting a bootable USB stick in to bootable CD-ROM
Message-ID:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB3394F75B@MBX03.exg5.exghost.com>

next in thread | raw e-mail | index | archive | help
I posted this on the -questions list but didn't get any replies. I have a F=
reeBSD image that I install on USB sticks to build new systems. When the st=
ick boots it automatically clones itself on the system's hard drive, creati=
ng partitions and other configuration parameters that are programmed into t=
he stick's cloning logic. I want to create a similar mechanism using a boot=
able CD-ROM. The biggest difference in the process of course is that the CD=
-ROM itself is read-only so clearly there needs to be an mfsroot involved i=
n the process. I looked at how the FreeBSD Live CD is setup and the loader.=
conf file has these lines:



mfsroot_load=3D"YES"

mfsroot_type=3D"mfs_root"

mfsroot_name=3D"/boot/mfsroot"



along with the file /boot/mfsroot.gz and no /etc/fstab. The fstab on my USB=
 stick version has root mounted as /etc/da0s1a and clearly that isn't going=
 to work. I changed my core BSD image accordingly, duplicating the mfsroot =
settings in my loader.conf.



I used the command below to create the iso file from the BSD image I prepar=
ed.



mkisofs -R -no-emul-boot -o /tmp/bsd.iso -b boot/cdboot  /bsd



When this iso is copied to a CD, it does boot. However, it doesn't seem to =
be picking up the mfsroot config and complains that the system is running f=
rom on a read-only file system, which of course is what I'm trying to avoid=
.



I assume I simply have the boot config setup wrong. I essentially want the =
same kind of thing that's done for BSD Live. Can anyone point me to the rig=
ht info for setting up this kind of bootable BSD CD?






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