OpenBSD

2021/10/30

I’ve tried installing & using OpenBSD 7.0 on my Pinebook Pro. I’ve previously used OpenBSD on a small VPS just to try it out, and I was quite impressed.

Unfortunately installing on the pinebook has been significantly more rocky than installing various linux flavours, and the performance isn’t quite good enough for me to continue using it. I hope to revisit in future as I like the philosophy of the project. Support for the pinebook and aarch64 hardware in general seems quite new for OpenBSD so it’s likely to continue to mature as more knowledgable users try it out and fix things.

I’ll write up my installation process, with gotchas, as there were a couple.

Prerequisites

I started with a pinebook running Manjaro ARM installed to the eMMC. I had a couple of 32GB micro SD cards available, a few USB mass storage devices to hand, and the USB serial converter for the pinebook pro. I have another regular x86 laptop running Manjaro also, with SD card reader. The USB serial converter is necessary since the OpenBSD installer can’t drive the display.

I wanted OpenBSD installed to the eMMC device.

Process

  1. Back up all your stuff. This process will wipe your entire pinebook.
  2. Read the official installation instructions
  3. Read this blog post about installing on an older version. I find narratives like this easier to read and follow than the official docs.

Create the installer

  1. Download all the files from this FTP folder. You need mostly all of them, mirrors are available around the world.
  2. Use dd to copy the install70.img to an empty SD card
sudo dd if=install70.img of=/dev/mmcblk2 bs=4M conv=fsync status=progress
  1. Copy everything else from that folder to a standard USB memory stick. This is important because unless you have a USB ethernet, you won’t be able to download those files during the installation process, as the WiFi chip isn’t supported.
  2. Download and unzip the u-boot package. The u-boot that Manjaro ARM installs isn’t capable of booting OpenBSD.
  3. Use dd to copy in the u-boot files to the appropriate location on the SD card
sudo dd if=share/u-boot/pinebook-pro-rk3399/idbloader.img of=/dev/mmcblk2 seek=64
sudo dd if=share/u-boot/pinebook-pro-rk3399/u-boot.itb of=/dev/mmcbkl2 seek=16384
sync
  1. Download all the files from this FTP folder and copy them all to the standard USB memory stick in a subfolder (e.g. firmware). This is required additional non-free firmware to get the wifi working.

Wipe the eMMC

  1. The u-boot that Manjaro ARM installs isn’t capable of booting OpenBSD. It hangs on a line about ‘ochi0’ and won’t proceed. So, you need to wipe u-boot off the eMMC before the installer will boot! To do this, take another micro SD card, write your favourite supported linux build for the pinebook pro, and use gparted to make a new parttion table for the eMMC card.

Enable USB serial interface

  1. Turn off your Pinebook, follow the disassembly guide and toggle the headphone / serial console switch. Put the case back together. Try not to lose the screws.

Install OpenBSD

  1. Insert the SD card with OpenBSD.
  2. Connect the USB serial to your headphone jack and another computer (mine is a x86 laptop running Manjaro)
  3. Start up screen or similar program to connect to the serial interface
sudo screen /dev/ttyUSB0 115200
  1. Connect the USB mass storage device with other files on it.
  2. Power on the pinebook. If everything went well, you should see OpenBSD installer prompt eventually in your screen session.
  3. Follow the on-screen instructions to install. I had to choose a few non-default options:

a. Change the install disk to sd1. You can use ? to show disk info, sd1 was the eMMC card for me.

b. When prompted to install filesets, choose ‘disk’ rather than network, ‘no’ for ‘is the disk already mounted’ and ‘sd2’ for the disk. This corresponded to my USB mass storage device.

  1. When the install is complete, reboot. I had to hold the power button, it seems OpenBSD can’t trigger the actual power off. You need to leave the SD card in, as u-boot isn’t installed to the eMMC module!

Install firmware and u-boot

  1. Power on the pinebook again. Login as root over your serial console connection.
  2. Mount the USB mass storage, something like mount /dev/sd2i /mnt, and use fw_update with -p option to use the firmware files on the USB rather than try to get them from the internet.
  3. Configure your wireless card by adding /etc/hostname.bwfm0 file with the following content
nwid <network-ssid> wpakey <password>
inet autoconf
  1. Reboot. You should now have access to the internet to install stuff!
  2. Install u-boot-aarch64 package pkg_add u-boot-aarch64 and run through similar instructions as before to write the files to the appropriate place on the eMMC card this time. Note the files are stored in /usr/local/share… and the eMMC card is now something like /dev/rsd0!
  3. Reboot again, this time removing the SD card. You should be able to boot without it now.

Enable graphics

  1. Enable xenodm with rcctl enable xenodm
  2. Reboot. You should now get graphical login!

From here the OpenBSD manual pages and various guides/blogs should help you build the system you want.

I installed gnome as my desktop, but this has proven too slow without hardware acceleration (which OpenBSD still lacks on Pinebook Pro)

I hope these instructions were useful, if you have a comment or correction please let me know via martin (at) mfashby.net.