Preinstalled OpenBSD USB Thumb Drive Images

So, after seeing that apparently people are interested in this. I decided to go ahead with making some OpenBSD thumb drive images. (this, combined with the fact I have much faster upload speeds at my house now)


There are a variety of uses for these images.

  1. Repair an existing OpenBSD installation with a full userland at your disposal(unlike the ramdisk images)
  2. Grab dmesgs off of machines easily
  3. Make sure OpenBSD will work on a machine(very useful at retail locations)
  4. OpenBSD portable awesomeness -- Included in the base sets is an http server, firewall/router, ftp server, ssh server.
  5. Easily back up/restore a harddrive using netcat
  6. Portable development environment! Included is perl, gcc, binutils and friends.


  1. Almost all default options of OpenBSD
  2. All sets are installed including Xorg sets
  3. is used by default
  4. The drive is just one big /
  5. Each image is 1G uncompressed and requires at least a 1G thumb drive
  6. Each image is delivered gzip compressed
  7. Common network hostname.if files have dhcp in them so no network setup required
  8. fstab mounts the filesystem using softdep, which performs much better on thumb drives.
  9. Root password is root
  10. I'll try to generate these images on each release and each major snapshot
  11. SSH public and private keys are generated upon first boot (so no security concerns)
  12. I will only be making images for amd64 and i386.

How To Use


First, you need to decompress the image.

On a unix-like machine, use:

gunzip [imagefile].gz

On a Windows machine, you can use 7-zip to extract gzipped archives.

How to put it on thumb drive:

If using a unix-like OS(including Mac?), just use:

dd if=myimage of=/dev/[mythumbdrive] bs=4k

Of course replacing with your thumbdrive's actual device name.

If using Windows, follow something like this:

Of course replacing an Arch Linux image with the OpenBSD image. Make sure to use the uncompressed image!

Image Links

OpenBSD 5.1 i386

OpenBSD 5.1 amd64

Latest snapshots coming soon as well.


If you want to share these links, please link to this article, not to the image itself. As newer OpenBSD releases come out, I will delete old ones, and I prefer not to have dead links. Also, this will give people a chance to browse for a more optimal image for their needs.

If anyone is interested in using bit-torrent for this, I can definitely seed such a thing, but I'm not going to bother if there is no demand for it. My server is based in New Jersey and should keep par with anyone's connection.

Other Notes

Because of how awesome OpenBSD is, this image can also be written straight to a harddrive and it will work. I recommend running your own installation though if using it on a harddrive.

Posted: 9/10/2012 3:46:46 AM

OpenBSD thumb drive images

Update: These are now available! See this post

So after having to (yet again) go to a secondary machine to install OpenBSD on a flash drive so I can install OpenBSD on a primary machine that lacks a disk drive(and floppy drive), I figured "you know, they should provide thumb drive images"

Well, THEY (the OpenBSD developers) don't believe it's necessary.. and don't recommend using third party generated USB images.. but here we are.

Soon to come will be a few OpenBSD images for various flash drive sizes. I plan on these sizes: (Note, these are still OpenBSD and not in any way branched or whatever. The Micro/Mini thing is just what I make the host name at install)

  1. MicroBSD. 500M. sets: bsd, bsd.rd,, base, etc, man
  2. MiniBSD. 1G. sets: bsd, bsd.rd,, base, etc, man, comp, games and a few packages preinstalled
  3. MiniBSDX. 1G. sets: all, no packages
  4. InstallBSD. 500M. sets: bsd, bsd.rd, base, etc. Includes install sets off of install_XX.iso

I plan on trying to build images for i386 and amd64 each official release and snapshot(but not more than once a month). If you want more then I suggest building your own USB image. It really isn't that hard.

My main goal of these images is

  1. Easy way to get dmesgs off of computers
  2. As a "rescue" disk. The ramdisk kernel is extremely limited. Having a full BSD installation is invaluable whenever you accidentally update fstab to use sd1a instead of sd0a... Sure there is always ed to fix it with the ramdisk kernel.. but ed is not trivial to use
  3. As a quick way to see if OpenBSD will work on your computer(especially at retail locations)
  4. As an easy way to test snapshots

These images are very simplisticly made. They are basically a default install with one-big / and a mfs /tmp. The only modifications I make are to the fstab and I add a reminder to change the root password. All private keys are generated on first boot, so no worries there.

The main annoying thing about doing these images is just uploading them. About 130M uploaded at 60kb/s on stupid DSL is awful.

Posted: 8/19/2011 5:02:09 AM

Softraid fun!

Note: This was imported from my old blog. This "tutorial" may be stale. Be prepared for differences in newer version of OpenBSD. This was made from 4.6

So I've been messing around recently with the softraid implementation in OpenBSD.. I've done this once before configured for RAID 0, but one of the drives went bad..

In case you aren't aware(as I wasn't without a bit of thinking) you can do softraid experiments with only 1 drive(though it's a bit silly) by creating multiple RAID disklabels or do something useful with 2 drives. I'll use RAID1 as an example. Also, you can install OpenBSD (4.6 at least) straight onto the RAID psuedo-drive..

I'll assume you have wd0 and wd1 for drives.

Boot up the OpenBSD CD and then at the install prompt, goto the shell.

fdisk the disks

# fdisk -iy wd0
# fdisk -iy wd1

Now do the disk label. Here, you have make a decision for how much space you want in / I personally went a bit over and used 100M because I plan on putting some emergency software there in case a RAID chunk goes down.

Do the following replacing X with each drive number. (so do this multiple times)

# disklabel -E wdX
> z
> a
partition: [a] <enter>
offset: [<some number>] <enter>
size: [<some number>] 100M
FS type: [4.2 BSD] <enter>
> a
partition [b] d
offset: [<some number>] <enter>
size: [<some number>] <enter>
FS type: [4.2 bSD] RAID
> w
> q

Now for the actual RAID configuration..

# bioctl -c 1 -l /dev/wd0d,/dev/wd1d softraid0
<blue dmesg text outputted>

Make sure to note what sd device is created as told by the blue text.

Note the number after -c is the RAID level, so you can try one of the other RAID levels if you wish.

Now we need to go back to the install..

# install

Do all the install stuff, and then when you get to "choose the root disk" choose wd0.

when configuring the disklabel all you have to do is

> n a
mount point: /
> w
> q

So now you got your root disk. Now time to use RAID for everything else. When it asks you if you want to initialize other disks, choose the sd device that bioctl created. Usually it should be the highest number of sd device.

You'll have to write a new MBR for the device, so just choose Use Whole Disk and then at disk label, just label everything as normal except for partition-a doesn't get configured as / .

Now you should be able to run everything as normal and you'll be using whatever RAID level you chose.. Have fun! Maybe in the future OpenBSD will get support for automated recovery of failed RAID 1, 4, and 5 levels... There is RAIDFrame, but I haven't bothered myself enough to check into it.. If I do I'll probably write up something here.. 12010-03-14 04:02:11.123145

Posted: 5/20/2011 12:26:19 AM

Making your own OpenBSD Router

So I recently changed my router from pfSense to OpenBSD. Why do I enjoy pain so much? Well, pfSense 2.0 has a PPPoE bug in it, and I'm tired of a limitation in the 1.x versions. So I downloaded the latest release(4.9) and did a typical OpenBSD setup.

Ok so to make an OpenBSD router, you'll need:

  • Copy of offline(install_49) installation media for OpenBSD
  • At least two network cards in your router machine
  • Basic working knowledge of OpenBSD(particularly, how to do initial install, which I don't cover)

You'll have to tweak your setup if you're trying to accomplish something different from me. What I'm doing is making a general NAT router for multiple machines and connected to the internet via PPPoE(which is bridged across from a modem)

So first things first, install OpenBSD. You can leave the network connections not setup.

few days later

Oh good, you're back. Ok, now I know you could avoid some reboots in this tutorial, but I don't care enough to cover the "hot" methods.

First, /etc/sysctl.conf. Uncomment the line net.inet.ip.forwarding=1

Second, /etc/hostname.pppoe0(new file). Here, you put the PPPoE configuration.

inet NONE pppoedev EXT_IF authproto pap \
authname 'pppoe_username' authkey 'pppoe_password' up
!/sbin/route add default -ifp pppoe0

Make sure to replace EXT_IF with the external(wan) network interface. Also, fill in the username and password for your PPPoE connection.

Now, go skim through /etc/dhcpd.conf. It's out of the box a working configuration, but I recommend changing the domain name. Also, change the nameservers if you're like me and prefer google's nameservers(,

Now, edit /etc/rc.conf.local to enable dhcpd


Ok, now just put up in hostname.EXT_IF

And then, in hostname.INT_IF put a static configuration. Mine looks like this:


This determines the IP address of your router from the client computers.

Now then, in pf.conf you'll have to put two new rules.

match on pppoe0 scrub (max-mss 1440)
match out on pppoe0 inet from INT_IF:network to any nat-to (pppoe0:0)

The first one will scrub pppoe packets so that there isn't an MTU issue when going from PPPoE to ethernet. The second line will basically make pf behave as a NAT on our internal network, and allow outward access to the pppoe0(internet) network.

Tags: openbsd howto
Posted: 5/17/2011 7:03:42 PM