Tuesday, August 25, 2009

Modifying a FreeBSD release ISO for headless booting

Ok, here are the commands. I will come back later to add context, too many irons in the fire right this minute...

# mkdir /bigdisk/iso
# mkdir /bigdisk/iso_headless
# cd /bigdisk
# fetch ftp://ftp7.us.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.2/7.2-RELEASE-i386-disc1.iso
# mdconfig -a -t vnode -f /bigdisk/7.2-RELEASE-i386-disc1.iso -u 0
# mount -t cd9660 /dev/md0 /bigdisk/iso


No trailing slash on the rsync destination is significant. The following two commands are equivalent:
   rsync -av /bigdisk/iso/ /bigdisk/iso_headless
rsync -av /bigdisk/iso/* /bigdisk/iso_headless/

# rsync -av /bigdisk/iso/ /bigdisk/iso_headless
# umount /bigdisk/iso
# mdconfig -d -u 0


Note that I did attempt the following, which failed:
   echo "/boot/loader -h" > /bigdisk/iso_headless/boot.config

# echo 'console="comconsole"' >> /bigdisk/iso_headless/boot/loader.conf
# mkisofs -no-emul-boot -U -R -b boot/cdboot -o /bigdisk/7.2-RELEASE-i386-disc1_HEADLESS.iso /bigdisk/iso_headless
# cdrecord -scanbus


Set whatever speed you want here. I had some cheap, old CDRs and they needed burn slowly. I have plenty to keep me busy while it's burning...

# cdrecord speed=2 dev=1,0,0 /bigdisk/7.2-RELEASE-i386-disc1_HEADLESS.iso


That's all for now, please enjoy responsibly.

No comments: