Archive for May, 2009

FreeBSD USB Boot

Wednesday, May 27th, 2009

One of the common perils of FreeBSD is that it’s not as user friendly in some cases as I believe it should be. It has taken some time for DVD images to become common for installation, and creating a bootable USB device has been problematic at times too. I figured I would provide an image that has worked (for me) on a few different systems. It doesn’t always work, but should help you out in a pinch. It enables console on the serial ports (com1/com2) after it boots up, so can help out in a pinch since the distributed bootable media does not include obvious ways to access utilities such as ufs/ffs capable mount or ways to put the console on com2 without rebuilding from source.

I hope this link helps you (and others) out, and if it does, I will try to post updated USB media images to help others. – MD5 (FreeBSD-7.1p4.dmg.bz2) = 2ca1fd7a66d9251d503fdd56ff2b9707

This image is for 512MB media and has no root password set, uses GRUB 0.97 and enables console on ttyd0/ttyd1. GRUB also should be enabled for both the serial console (COM1) & monitor. The same is true for the FreeBSD loader.

You will need to uncompress this (bunzip2) and write it to your USB media with a tool such as dd.

*WARNING* Make sure you use the correct output file (device).


dd if=FreeBSD-7.1p4.dmg of=/dev/da0 bs=1024k
483+1 records in
483+1 records out
506986496 bytes transferred in 51.327206 secs (9877539 bytes/sec)

If you want to write this from a mac, find the correct device eg:

sh-3.2# diskutil list
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *931.5 Gi   disk0
   1:                        EFI                         200.0 Mi   disk0s1
   2:                  Apple_HFS Macintosh HD            931.2 Gi   disk0s2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *483.5 Mi   disk2
   1:                    FreeBSD                         483.0 Mi   disk2s1

In this case, you want /dev/disk2