Installing OpenBSD on Scaleway Elastic Metal

This post is a longer version of what I initially posted on a Mastodon thread.

I like Scaleway because they (1) host in Europe and (2) provide a good mix of services from elastic metal to cloud instances and serverless functions.

Let’s get into it…

What’s Elastic Metal?

Scaleway Elastic Metal is a fancy name for what’s often called “bare metal” servers. Scaleway does provide some “elastic” features around these servers, such as elastic IP numbers.

What I think is great with this offering is that you get pretty much full access to the out-of-band (OOB) management software. Having access to the remote console is what makes installing OpenBSD possible.

Why bare metal?

Because compared to the cloud, bare metal is more… metal! 🤘

But also, while “cloud” does provide many operational benefits, the feature premium is often high. If all you need is a simple Unix server, then you’ll get more computing power for your money on bare metal.

Installing OpenBSD

It’s a shame that there are so few hosting providers that offer BSD images for their offerings. Thankfully, it’s easy to install!

The instructions below will roughly stay the same should you want to install NetBSD or FreeBSD instead of OpenBSD.

1. Order an Elastic Metal server

Ordering an Elastic Metal server can take up to an hour. After all, we’re provisioning some actual hardware and not just another virtual machine or container…

I reckon the servers in the “Aluminum” range are enough for most use cases that run straightforward Unix software. With 6 cores and 12 threads, you could even run some half-decent kernel builds on these machines.

You don’t need to order the server with an installed image. The first boot will be in rescue mode anyway.

2. Boot into rescue mode

Once you got your server, boot into rescue mode and SSH into it. Scaleway makes this easy because they will automatically provision your authorized SSH keys onto the rescue system.

3. Write the installer

From the rescue system, we will fetch the OpenBSD installer, verify the image, and write it to the first bootable hard drive.

Note: Your device names might differ!

# wget
# wget
# sha256sum -c --ignore-missing SHA256
# dd if=install71.img of=/dev/sda bs=1M
# sync

4. Reboot into normal mode

We’ve now got some BSD goodness sitting on the first hard drive. Let’s bring it alive by rebooting into normal mode!

5. Access the remote console

Since you won’t be able to SSH into the installer, we need to access the server’s remote console.

Thankfully, Scaleway provides a Keyboard Video Mouse (KVM) interface through the out-of-band (OOB) management software they use, called HP iLO.

First, you need to enable this feature for your server. Then, you’ll go through a few simple steps to authenticate to the OOB interface.

Note: Don‘t drag your feet here! Enabling remote access cost almost €1 per hour (as of writing this). Don’t forget to turn it off as soon as you’re done!

Here you see, from the OOB interface, the server booting:

6. Prepare RAID disks

Since this is bare metal, we don’t have the cloud’s convenience of ubiquitous disk snapshots or backups. So, for a bit of extra reliability, we will arrange the 2 hard drives in RAID1 mode.

Using the remote console, on the first OpenBSD installer prompt, drop to the shell.

Then, we will go through the RAID setup steps documented in the RAID section of the OpenBSD handbook.

Note: Again, your device names might differ!

Welcome to the OpenBSD amd64 7.1 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? s
# cd /dev/
# sh MAKEDEV sd0 sd1 sd2
# fdisk -iy sd0
Writing MBR at offset 0.
# fdisk -iy sd1
Writing MBR at offset 0.
# disklabel -E sd0
Label editor (enter ‘?’ for help at any prompt)
sd0> a
partition: [a]
offset: [64]
size: [2000409200] *
FS type: [4.2BSD] RAID
sd0*> w
sd0> q
No label changes.
# disklabel sd0 > layout
# disklabel -R sd1 layout
# bioctl -c 1 -l sd0a,sd1a softraid0
softraid0: RAID 1 volume attached as sd2

7. Run the installer

Now it‘s time to install OpenBSD onto the RAID disk. From the shell, just run install and proceed as usual.

When selecting the disk, choose the disk that was set up with RAID (in our case /dev/sda2). Choose the MBR partition layout (since Scaleway boot their servers with BIOS).

I like to install the system with all file sets. Even then, OpenBSD provides a slim and secure system. The big advantage with installing all file sets is that the sysupgrade between OpenBSD releases works seamlessly!

When you’re done, reboot!

8. Boot your system

Et voilà! As we can see from the OOB interface, we have booted OpenBSD on Scaleway Elastic Metal!

But remember, running the remote access OOB interface is expensive! So don’t forget to turn it off! Here is a screenshot of an SSH session on the new server:


I hope you enjoyed this guide as much as I enjoy running OpenBSD on metal! 🤘 🎸