If you're interested in the PC Engines APU2 line and what the differences are between models, I've covered it in a previous post here.
I recently purchased a new PC Engines APU2E4 to use as a home router. I purchased the kit, which includes the board, case, and power supply from CorpShadow. I also ordered the DB9F to USB adapter (Silicon Labs CP2104), so I don't need to get a separate null modem connector. They're the only PC Engines distributor in Canada listed on the PC Engines website. I had a great experience with CorpShadow, they also sell a lot of other small single board PCs, so check them out if you live in Canada.
I also ordered a 128 GB mSATA SSD, as it significantly out-performs any SD card you might put in the machine. While it's not necessary, and an SD card would be much cheaper, I find the improved read and write speeds are worth it. I got it from Canada Computers, as they seemed to have the best price on one. mSATA SSDs are surprisingly not as common as one might think on PC parts websites. And even when they have one, I've found most sites will only carry one brand.
The first step was to install the heat sync onto the CPU. This is described on the PC Engines website. The heat sync is effectively just a block of aluminum that you use to thermally bridge the CPU to the enclosure. They're connected with, what I assume is, thermally conductive double sided tape, which they provide for you.
After the CPU is stuck to the enclosure using the tape and the board
is screwed in place, I installed the mSATA SSD into the first
expansion slot labelled
mSATA. Then I screwed the top of the case
on, plugged the antenna holes with the provided rubber stoppers, and
screwed the bolts back on the RS232 port. These things are really easy
to put together!
I downloaded the AMD64
installXX.fs image from the OpenBSD download
page and burned it onto a spare USB drive I had lying around using
sudo dd if=installXX.fs of=/dev/sdb bs=4M sync
/dev/sdb is the location of the target USB drive, found
lsblk command. After that I inserted the drive into the
USB port on the APU2.
I then plugged one end of the DB9F end of the serial adapter into the
APU2, and the USB end into my PC. My desktop runs Fedora, so I had to
cu utility using
sudo dnf install cu
I then dialed it up using the serial adapter with the command
sudo cu -s 115200 -l /dev/ttyUSB0
I plugged in the power connector into the APU2, and I saw the boot info in my terminal! It's really cool that these things use SeaBIOS and Coreboot.
It automatically booted from the USB device, and I got dropped into
boot> prompt. Instead of pressing enter like normal, I
boot> stty com0 115200 boot> set tty com0
The first command sets the baud rate for the serial connection. The
second command tells the OpenBSD installer to set the default TTY to
the serial port
COM0. Without these, the machine will start to boot,
fail to find an output, and reboot.
After that the installation went along as a normal install would. I
wasn't connected to the internet, but I already knew what IP was
assigning it, so I entered that manually when asked. I also installed
the sets from the USB. To do that, when prompted for the location of
the sets, type
disk, when asked if it's already mounted type
then select the default partition and path, and continue without
signature. The signature isn't required since it's part of the install
media (assuming you verified the signature of the install media).
After the install was done, I moved it to where I will be leaving it
to run, plugged in the power and ethernet, and SSH'd in. At that point
fw_update(1) to pull in any extra firmware I might need, and
syspatch(8) to keep myself up to date with security patches. I was also
sure to add my user to the
doas.conf(5) config file.
I kept the serial adapter connected and plugged it into another OpenBSD machine I have right next to it, so if I ever have any trouble booting, I can always SSH into the other machine and dial into the serial connector to work things out without having to physically plug the APU2 into my laptop.
To connect to the serial device through the other OpenBSD machine, I just run
doas cu -s 115200 -l /dev/cuaU0
You can always find the serial device through plugging the adapter in
dmesg. You can also allow non-root users to dial into
serial devices by adding your user to the
doas usermod -G dialer <user>
Finally to complete the build, I added the OpenBSD sticker!