Converting a bootable USB stick in to bootable CD-ROM

Peter Steele psteele at maxiscale.com
Mon Nov 9 18:56:34 UTC 2009


I have a FreeBSD image that I install on USB sticks to build new systems. When the stick boots it automatically clones itself on the system's hard drive, creating partitions and other configuration parameters that are programmed into the stick's cloning logic. I want to create a similar mechanism using a bootable 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 in the process. I looked at how the FreeBSD Live CD is setup and the loader.conf file has these lines:

mfsroot_load="YES"
mfsroot_type="mfs_root"
mfsroot_name="/boot/mfsroot"

along with the file /boot/mfsroot.gz and no /etc/fstab. I copied this into my BSD image and duplicated the mfsroot settings in my loader.conf.

I use the command below to create the iso file from the BSD image I've prepared.

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 from on a read-only file system. What step am I missing?




More information about the freebsd-questions mailing list