FreeBSD memstick – Creating a bootable install key on a Mac

I dont make boot keys very often, an seem to have to ‘re-learn’ every time its needed. Hopefully writing it down like this will commit it to memory! So first take the USB key of choice and plug it into the Mac – I’m using a mac-mini running Mountain Lion here, but I don’t think the process has changed mush over the years.

1. Find the volume name:

MINI:~ dan$ df -h
Filesystem      Size   Used  Avail Capacity  Mounted on
/dev/disk0s2   297Gi  124Gi  173Gi    42%    /
devfs          205Ki  205Ki    0Bi   100%    /dev
map -hosts       0Bi    0Bi    0Bi   100%    /net
map auto_home    0Bi    0Bi    0Bi   100%    /home
/dev/disk1s2   698Gi  338Gi  360Gi    49%    /Volumes/Time Machine Backups
/dev/disk2s2   9.5Mi  8.7Mi  848Ki    92%    /Volumes/JellyfiSSH
/dev/disk3s1   7.3Gi  1.5Mi  7.3Gi     1%    /Volumes/KINGSTON

Clearly the /Volumes/KINGSTON looks good for my Kingston USB key. Its the bit on the left we need (/dev/disk3s1)

2. Unmount the volume:

sudo diskutil umount /dev/disk3s1
Volume KINGSTON on disk3s1 unmounted

If you don’t unmount the disk, the next step will fail with excuses about the device being ‘busy’. Repeat step 1 to ensure the key is now unmounted:

MINI:~ dan$ df -h
Filesystem      Size   Used  Avail Capacity  Mounted on
/dev/disk0s2   297Gi  124Gi  173Gi    42%    /
devfs          205Ki  205Ki    0Bi   100%    /dev
map -hosts       0Bi    0Bi    0Bi   100%    /net
map auto_home    0Bi    0Bi    0Bi   100%    /home
/dev/disk1s2   698Gi  338Gi  360Gi    49%    /Volumes/Time Machine Backups
/dev/disk2s2   9.5Mi  8.7Mi  848Ki    92%    /Volumes/JellyfiSSH

3. Write the memstick image:

The FreeBSD website shows:

dd if="FreeBSD"-8.3-RELEASE-amd64-memstick.img of=/dev/da0 bs="10240" conv="sync"

So correcting their typos and adapting for our setup here:

cd Desktop
sudo dd if="FreeBSD-8.3-RELEASE-amd64-memstick.img" of=/dev/disk3 bs="10240" conv="sync"

Note that I got the of (output file) from the initial ‘df -h’. Be careful here as hosing an entire drive is more than possible if you type the wrong destination.

Depending on the system/key you are using, the process takes a few minutes.

MINI:Desktop dan$ sudo dd if="FreeBSD-8.3-RELEASE-amd64-memstick.img" of=/dev/disk3 bs="10240" conv="sync"
Password:
110724+0 records in
110724+0 records out
1133813760 bytes transferred in 881.781875 secs (1285821 bytes/sec)
This entry was posted in FreeBSD Administration, Macintosh and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *