Category Archives: OpenBSD

Installing OpenBSD on a Soekris 6501 using Windows

Moving house gave me the excuse to trash my ISP’s modem/router and replace it with my own modem and router. For the router, I splashed out on one of these:

net6501_brd_rkmt_2lan1841_6501_open_id75-76-77_1

A Soekris 6501 with dual LAN cards. I wanted to run OpenBSD on it but the Soekris Wiki only gives help installing from PXE boot.  So, I’ve written this blog to remind myself how to install OpenBSD on a Soekris 6501 using a USB stick and Windows.

STEP 1: Install an OpenBSD image on to a USB stick.  See my blog entry.

STEP 2: Download, install and configure PuTTY.  Of course you’ll need a null-modem/crossover serial cable but you already knew that, right?  You can pick one up on eBay for less than £5.  As I use a MacBook Air, which doesn’t have any serial ports, I also have a Serial-to-USB converter which, again, costs less than £5 on eBay. To configure PuTTY to talk to the Soekris board, you’ll need to know the COM port of your cable.  You can find this in Device Manager:

New Picture

Having identified the COM port, it’s then easy to set up PuTTY.  You need to make sure the “Connection type” is set to “Serial” and the “Speed” (ie. Baud rate) is set to 19200.  You can see this in the below graphic (as I’ve been using PuTTY to communicate with the Soekris board a lot, I’ve saved the settings).

New Picture

STEP 3: Plug the USB stick containing your OpenBSD image, into the USB port on the board – not the USB port at the back of the board (next to the Serial port) but the USB port next to what look like IDE drive pin headers.  You can’t miss it – it’s the one that looks like it’ll accept a USB stick. Having plugged it in, plug in your Serial cable, and click on “Open” in PuTTY.  You should now see a blank screen, like this:

Untitled5

Not very exciting. Now plug the power cord into the Soekris and switch on the power and you’ll see the Soekris board begin to boot.  After a very short period of time you’ll be given 5 seconds to optionally break out of the default boot process so make sure you press <Ctrl>+P.  You can then review the boot output and, scrolling up, you should see something like this:

Untitled4

Note that I’ve highlighted (in red) the fact that it has detected my USB stick.  Make sure it has detected yours.  If it hasn’t it may be down to a bad connection.  Take the USB stick out and plug it back in again and reboot.  I found my mileage varied depending upon the USB stick I was using.  I had no problem whatsoever with my 8GB SanDisk CruzerFit but with my 1GB Kingston DataTraveller I had to play around about 5 times before it was recognised. I’ve also highlighted (in green) the SATA drive that I have attached.  This is where I’m going to install OpenBSD to, ie. from the USB stick to the SATA drive, so that I can boot from the SATA drive in future. Having broken out of the boot sequence to check the USB stick was recognised, we then need to instruct the board to boot from it.  In the above picture you’ll see the address of the USB stick is “81”.  Therefore, we just type the command:

boot 81

This will then begin the boot process from the USB stick.  However, before the OpenBSD bootloader attempts to load the kernel, we need to instruct it to output to COM1.  If we don’t do this, we won’t capture the output in PuTTY.  Make sure you enter these commands:

stty com0 19200

set tty com0

Here is a picture of what you should see:

soekris

Now instruct the OpenBSD bootloader to load the bsd kernel:

bsd

and you should now see the familiar OpenBSD boot process start:

soekris2

This will take you to the familiar install options.  Congratulations, you can now go ahead and install OpenBSD.

Advertisements

Getting an OpenBSD image onto a USB stick using Windows

STEP 1: Download Win32DiskImager.  Using the link, download and install Win32DiskImager to your C:\ drive.

STEP 2: Download an OpenBSD image.  Go to one of the mirrors that are close to you and download either InstallXY.fs or MinirootXY.fs where ‘XY‘ is the OpenBSD release you’re after, eg. Install56.fs would be for OpenBSD5.6.  InstallXY.fs is the larger of the two as it includes all of the file sets needed for a stand alone install.  If you’re relatively new to OpenBSD, this is the one you want.  MinirootXY.fs does not include the file sets and is, therefore, substantially smaller.  If you choose MinirootXY.fs, the file sets will be pulled down over the internet from an OpenBSD mirror.  This, of course, requires a working network connection which you will set up during install.

STEP 3: Run Win32DiskImager.  As Win32DiskImager is doing low-level file operations you need to run it with Administrator privileges (ie. right-click, “Run as administrator”).  Please note that writing an image file to disk will erase anything that existed on that disk prior to write.  Therefore, it is vital you correctly identify your USB stick prior to beginning the write operation.  In my case, below, the USB stick is showing up as the E:\ drive in Windows Explorer.  Do not continue until you’re sure you’ve identified the drive letter that Windows has assigned to your USB stick.  Writing an image file is irreversible.  You have been warned.

.New Picture

Having identified your drive, you can continue with Win32DiskImager and (a) specify the path of the image file, and (b) the drive letter (“Device”) of your USB stick:

New Picture

Now click “Write”, confirm your desire to proceed and after a 30 seconds or so you should see:

New Picture

Congratulations.  Your USB stick now has a bootable OpenBSD installer image on it.  You can now stick it into your PC, boot it and go through the OpenBSD installation process.