OpenBSD on Linode
=================
date: 2021-09-21
tags: openbsd

I'm a huge fan of OpenBSD. The simplicity of the system, the cohesive
feel it has, the proactive stance on security... The only problem?
My preferred cloud provider (Linode) doesn't support it!

Fortunately there's a comprehensive post on the Linode forum of how to
do it [1].

I wanted to document it here in case said post ever goes away.

1. Create a New Linode (any OS will do)
2. Once booted, shut it down
3. Under the "Storage" tab delete the ext4 partitions
4. Create two new disks, both "Raw" format:
   - One labeled "install", 1GB (could do less)
   - One labeled "os", the rest of the space
5. Boot in "Rescue" mode
6. In the serial console, wget the minirootXX.img
   - Check the sha256 against the SHA256 file
   - Check the signature using signify (on a different machine that
     has signify)
7. Find the install disk with `lsblk`
8. Flash the img using: `dd if=minirootXX.img of=/dev/sdX bs=1M`
9. In the Configurations tab, create a new one:
   - Full Virtualization
   - Select a Kernel > Direct Disk
   - /dev/sda - os
   - /dev/sdb - install
   - boot from sdb
10. Reboot into configuration, install OpenBSD from serial console
11. Halt/shutdown, and change configuration to boot from sda
12. Rejoice!

NOTE: if you skip the "Direct Disk" kernel step, it boots a Linux
kernel and tries to load the img... it panics every time!

[1]: https://www.linode.com/community/questions/10329/openbsd-on-linode