Installing OpenBSD from a USB Drive

UPDATE 2/25/2014:

Chris Cappuccio has posted instructions that are MUCH better. Go follow those instead:

I found a couple of links that suggested using qemu to install OpenBSD to a flash drive. I took the advice in those links and instead of using qemu, I booted from an install CD and installed directly to a USB drive. I then used that USB drive to do the install onto a CD-ROM-less machine.

I might try the qemu route later but this is what worked for me, perhaps it will help someone else.

You will need:

  • Blank CD-R
  • USB Drive +1GB
  • PC with CD-ROM Burner and USB Port
  • OpenBSD install media (installXX.iso)

The install iso can be found at a location such as <MIRROR>/pub/OpenBSD/<RELEASE>/<ARCH>/

Burn the install iso to the CD-R and boot it with the USB drive plugged into the machine. Install OpenBSD to your USB drive, it should be sd0.

Be sure to use DUID’s in the fstab when prompted (this will be the default). When installing sets you will only need “bsd”, “bsd.rd”, “baseXX.tgz”, and “etcXX.tgz”. You can select only those sets by typing de-selecting them all, then adding the needed sets individually:

  • “-all”
  • “+bsd”
  • “+bsd.rd”
  • “+base*”
  • “+etc*”

After installing those sets, the installer will ask if you’re sure you want to omit “”, confirm that you do not want it. You should now have a root prompt. You will need to copy the install scripts to the USB drive before leaving.

# mount /dev/cd0a /mnt2
# cp -r /mnt2/X.X /mnt
# halt

Replace /mnt2/X.X with the version that you are installing such as “/mnt2/5.3”.

Now that you have the OS installed to the USB drive, plug it into your target machine and boot. At the boot screen you will need to type “bsd.rd” like so:

boot> bsd.rd

You can install as usual but there will be one difference. When prompted to install sets you will need to choose “disk”. The installer will then ask if the disk partition is already mounted. Choose “no” and when prompted choose the USB Drive, it will usually be sd0 but in my case it was actually sd1. The sets will be on partition “a”.

These instructions were adapted from the following links. if something isn’t clear in my instructions check these out, they were very helpful to me:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: