I've been thinking about running OpenBSD again for a while now, yesterday I had some inspiration and decided to try to boot it on OVH's VPS machines.

OVH doesn't have the best reputation regarding availability and support (both of which I confirmed in the past...), but they are cheap and they have a datacenter in Beauharnois, Qc, that's less than 50km from home.

They're only offering Linux distribution for their VPS SSD instances at the moment, but since the virtualzation technology is KVM, booting the OpenBSD ramdisk kernel (bsd.rd) and doing the installation is all that is needed to get a working OpenBSD machine.

Here's how I did it.

Preparing host

First, the host needs to be a KVM virtual machine, that is, one of the 'new' VPS offering from OVH. They call it VPS SSD.

That host must be running a Linux distribution. For my test, I used Ubuntu 14.04, but it doesn't really matter, what's needed is GRUB and most distros are probably using it.

Downloading bsd.rd

To install OpenBSD, we need a ramdisk kernel. Pretty easy to do:

cd /tmp;
ftp ftp://ftp.openbsd.org/pub/OpenBSD/5.8/amd64/bsd.rd
sudo mv bsd.rd /

That's it, the installation kernel is sitting at the root of the filesystem.

Preparing GRUB menu

Next, the bootloader configuration needs to be updated to let it know where it can find the OpenBSD kernel and how it can be boot it.

On Ubuntu, GRUB's configuration is generated using files in /etc/grub.d.

To let GRUB know about the OpenBSD kernel, append the following lines to /etc/grub.d/40_custom:

menuentry "openbsd" { 
  set root=(hd0) 
  kopenbsd /openbsd.rd 

With the default config, GRUB doesn't show the boot menu. To get a chance to select 'openbsd' in the menu, tweak the following variables in /etc/default/grub:


Finally, run update-grub to update the actual GRUB config in /boot/grub

Reboot into OpenBSD installer

This step must be done through the virtual console in OVH's control panel.

Once the console is open, reboot the machine. After a while, a countdown from 10 to 0 will appear, press ESC to enter the boot menu. Select openbsd to boot into the installer.

The installation process is straight forward. I used all default options except for disk partitioning, where I used only a single partition.

There was also some 'double keypress' weirdness in the installer, this looks like a bug

Reboot into OpenBSD

So that's it, just reboot and enjoy OpenBSD.