Dr. Brian Robert Callahan

academic, developer, with an eye towards a brighter techno-social life



[prev]
[next]

2025-12-16
Let's run FreeBSD 15.0-RELEASE on a Raspberry Pi Zero 2 W

This is more for me to remember what I did, but it might be helpful for you too.

I needed a Raspberry Pi Zero 2 W for a research project I am doing with some graduate students. It needed to run FreeBSD and with 15.0-RELEASE having just been released and claiming support for the device, I figured now was a good time to pull the trigger on one.

I ended up purchasing this one because it had everything I needed. I also happened to have a 5V/3A power supply and used that instead of the 5V/2.5A power supply provided in the kit. I chose this particular kit because it came with all the adapters needed and an overkill SD card for this project.

Setup

I tried out the pre-flashed Raspberry Pi OS image already on the SD card, but with the device only having 512 MB of RAM, the OS felt pretty unresponsive and was heavily swapping even though I wasn't doing anything. I feel like it would be difficult to use the default OS on this device but I bet it's great on one of the devices with several gigabytes of RAM.

So I turned everything off, and flashed the RPI (3/4) SD Card image found on the download page onto the kit-provided SD card. The documentation says this is the one you want for the Zero 2 W. Flashed it, put it in the device, hooked up an HDMI cable to a monitor and a keyboard to the USB port and... while I got video, it didn't boot.

Finding the right keyboard

I have an old Macally keyboard that doubles as a USB hub, as it has two additional USB ports on it. This is great, because as of now, FreeBSD does not support the on-board WiFi. I have a UGREEN USB Ethernet adapter that identifies itself as an axe(4) device. Yes it's only 10/100 Ethernet, but realistically I don't need anything more than that. This adapter has served me well for years on both FreeBSD and OpenBSD machines, so I was hoping it would just work here.

Second attempt

Now I am using the Macally keyboard with the Ethernet adapter plugged into one of the keyboard's USB ports. Turn it on and... still nothing.

Finding a solution

This was a bit of an odd solution, but I thought maybe I should boot from a USB key instead. I do that with my Raspberry Pi 3B+. So I flashed the same SD card image onto a USB key, plugged that into the other USB port on the keyboard and... it boots! Notably, it boots from the SD card, which is fine by me.

This is because the keyboard doesn't activate until FreeBSD is fully loaded, so I can't type into U-Boot and I also cannot press the Enter key to start booting a little more quickly. But the keyboard does work just fine once you get to the FreeBSD login prompt.

The Ethernet adapter was detected and used automatically, so the machine had an IP address and was ready to go as soon as I logged in.

Conclusion

I am very happy with the setup. Even with needing a USB hub, it's fine. My graduate students can happily work on their research project.

Top

RSS