Converting a bootable USB stick in to bootable CD-ROM

Peter Steele psteele at maxiscale.com
Wed Nov 11 00:14:07 UTC 2009


I posted this on the -questions list but didn't get any replies. 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. 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 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, 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 right info for setting up this kind of bootable BSD CD?





More information about the freebsd-hackers mailing list