How to put a FreeBSD installation ISO onto a USB Flash Drive
Assumes USB drive uses device da0, which is usually the case.
Modify device names as needed.
Unless special permissions have been set up,
the commands usually need to be run as root.
- ./fbsd-install-iso2img.sh ./8.2-RELEASE-amd64-bootonly.iso ./8.2-RELEASE-amd64-bootonly.img
- Use fbsd-install-iso2img.sh
script to convert the ISO into an appropriate disk image.
(Paths assume script and all files are in the current directory;
modify paths as appropriate.)
NOTE THAT MEMORYSTICK IMAGES ARE NOW AVAILABLE FOR
FREEBSD STARTING WITH VERSION 8,
SO THE ISO-TO-IMG CONVERSION STEP ABOVE IS NOT NEEDED.
Just download and use the memorystick image with the steps below.
- fdisk -BI /dev/da0
- Create a bootable BSD slice on the USB flash drive, using the entire disk.
THIS DESTROYS ALL DATA ON THE FLASH DRIVE!
(Ignore the "Geom not found" warning.)
- bsdlabel -B -w da0s1
- Put a BSD label on the flash drive and copy bootstrap code to it.
- newfs -U -L FreeBSDboot /dev/da0s1a
- Create a FreeBSD file system on the flash drive.
- dd if=8.2-RELEASE-amd64-bootonly.img of=/dev/da0 bs=10k conv=sync
- Copy the image file to the USB flash drive.
The first script can be found in
this FreeBSD mailing list message
by Clifton Royston. (local copy)
The original version of the script was by Dario Freni.
Like the script above, the rest of the steps are
from the FreeBSD mailing list,
by Andrew Snow, which was a follow up to Clifton's message.