Running OpenBSD on Raspberry Pi 3

Step 1 was getting my hands on Raspbian. Step 2 was running OpenBSD on the Raspberry Pi 3 Model B. I had quite a few try & fails but it booted, installed and ran properly in the end. Full story follows.

The Hardware

To install OpenBSD 6.3 on the Raspberry Pi 3 V1.2, I used a 128MB microSD card (to host the installer), a microSD to USB adapter, a no-name 30GB USB stick, a TTL to USB Converter and an RJ45 Ethernet cable.

All was done from a Macbook Pro using macOS 10.13.5. Preparation commands shouldn’t differ that much if using *BSD or Linux.

I booted both OpenBSD 6.3 and 6.3-current but hardware support was the same. No WiFi interface…

To be able to boot from the USB stick, the Raspberry has to be “patched”. This is done by enabling a flag in the OTP. You’ll have to insert the microSD card in the Mac and edit the BOOT/config.txt file adding a simple line of code.

# echo "program_usb_boot_mode=1" >> /Volumes/BOOT/config.txt

Insert the microSD in the RPI3 microSD slot, the USB stick in one of the RPI3 USB plug. Plug the ethernet cable in the RPI3. Connect the RPI3 and the Macbook using the USB to TTL Adapter.

From my Terminal, I used the following command to access the console :

# cu -l /dev/cu.usbserial -s 115200 | tee cu.log

Power the RPI3 using the microUSB power cable. I used a microUSB-USB cable and pluggued it into the USB3 of my Synology. It Worked ok. Although the console sometimes popped up voltage warnings.

Proceed to OpenBSD installation. Nothing special here. Network card will be smsc0 and can use DHCP. Using “Whole disk” will automatically create and populate an MSDOS partition to enable booting from the USB stick. At the time of writing, it is not possible to install OpenBSD on the microSD card ; there is no driver for it. Not sure but it seems eMMC is not supported either, yet. The only way to install OpenBSD is to use an USB boot-compatible storage.

Choose “Halt” in the end of installation. Unplug USB power. Remove the installation microSD.