FreeBSD on the Raspberry Pi
cromwell-intl.com
cromwell-intl.com
https://www.openbsd.org/arm64.html
https://dev.to/spacial/installing-openbsd-7-on-raspberry-pi-...
This makes it a great choice for a small node requiring security.
We're getting to the point where buying a barebone x86 system on Aliexpress is cheaper than some of these ARM development boards, definitely not something I saw coming.
ServeTheHome has a great ongoing series on "TinyMiniMicro" computers that make great little home servers.
Those guys tend to buy new; although you can easily find used (but still very capable) models on Fleabay, &c. for cheaper. Usual caveats apply; but I've had good experiences after checking sellers carefully.
Manufacturers also have factory-refurbished sales websites, usually separate from their normal website (lease-returns from their financial services arm). Those come with short warranties, and an option to extend them. They are also nicely cleaned up and re-boxed, sometimes with accessories.
I have one from Fleabay and another from Dellrefurbished. Both have been running great for nearly 3 years.
That isn't really in the same class as the Pi though, it seems the various models use somewhere in the range of 1-6watt max.
The 5W of a Rasp. Pi is extremely awkward in practice. Its "a lot smaller" than a PC for sure, but not small enough to make AA-batteries usable or otherwise a portable computer. And if you're using 18650 Li-ion cells, well... that's called a laptop / typical computer in the 30W to 60W range anyway.
There's something to be said about ESP32 / ESP8266 which actually gets you to that sub-1W level where AA batteries are viable. Its just a new set of opportunities. As it is, Rasp. Pi4 really doesn't feel much different to me (from a power-usage perspective) compared to laptops, or even PCs.
Ever since the pi foundation took that $45M investment and added their first outside shareholders about a year an a half ago it's been all downhill from there in terms of consumer supply.
https://rpilocator.com is an invaluable resource, especially this guide: https://rpilocator.com/tips-and-tricks.cfm
It could be that I have a faulty cable.
Oh it's on an rpi3 . Maybe the serial connection only works on 4? The documentation doesn't say.
Basically these instructions:
https://dev.to/spacial/installing-openbsd-7-on-raspberry-pi-...
But...
This was a while ago. It looks like the instructions for OpenBSD have changed?
https://www.openbsd.org/arm64.html
Maybe I'll try again soon...
No, you can switch to a glass console by typing 'set tty fb0' at the 'boot>' prompt.
Very satisfying seeing the serial TTY come up with the familiar ASCII spinner. My plan is to configure this to connect to wifi, establish a VPN connection to somewhere, then set it up to dispense an IP address and function as a NAT for anything plugged into its ethernet port.
At first I was running FreeBSD on a Rasberry Pi 2 (not the Model B version). There was some bug at the time that made Vim unusable over a serial terminal, so in spite of it always working and never requiring a reboot, I decided to look for another solution.
The solution was OpenBSD running on a Beaglebone Green. It was actually easier to set up, just as stable, and the pf syntax was even simpler.
Were I to go with a similar setup today, I'd prefer something that:
- has multiple NICs
- can be tuned to boot very fast
- capable of rolling-back updates/changes
- runs NSH[0]
The 3rd point is something NSH could facilitate for the network configuration. For system-level changes, I suppose the best I could do on OpenBSD is use CARP between two OpenBSD systems, and switch between the two as I apply and test updates.
This isn't very helpful as Intel calls some mainstream core based processors Celerons, and some atom core based processors Celerons.
The current trick is J before the four digit number is Atom based, U after the four digit number is mainstream laptop core. G before gives you mainstream desktop core for Pentium, and I think Celeron as well. But really just put the model number into search, go to the Ark page and see that it's products formerly Blah and then look up Blah to see what that actually means. Yay marketing.
The Linux desktop experience on this single core device is horrific.
What is MUCH more impressive is RiscOS on it. It flies. The whole OS is written in assembler. It's fast. It's a what-if of computing. https://www.riscosopen.org/content/downloads/raspberry-pi if you're curious to take a look.
Curiosity of RiscOS aside, those single core 700 MHz devices I would only advise using them in terminal mode, no desktop, whether Linux, FreeBSD or something else.
That's just not true. It's full of C code, even the HAL, which is a good thing by the way: https://gitlab.riscosopen.org/RiscOS/Sources/HAL/HAL_OMAP5/-...
Even though I had no plans to run Linux on the original Model B, I saved the "NOOBS" SD card that came with it. It contained presumably "known-to-work" versions of Arch, RaspBMC, Pidora, OpenELEC, RISC and Raspbian. I knew that those offerings would probably balloon in size, or some might possibly disappear, as the RPi project progressed.1 It was early days for the RPi and I was not sure I would be able to easily access those old versions going forward. It is wonderful see one can still conveniently get them (kudos to RPi Foundation):
https://downloads.raspberrypi.org/NOOBS/images/
Based on past experience with computers and software, I concluded that years later the most recent versions of these OS for the RPi would not run smoothly on an old Model B. To be truthful, I still have not tried. Maybe I am wrong, but it sounds like running, e.g., the latest Raspbian on an old Model B would not be a pleasant experience.
Being someone who prefers "terminal mode" over the alternatives, I have always used NetBSD. It was perhaps the first BSD to boot the RPi. It was certainly the first BSD, perhaps the first OS for the RPi, to come with sshd pre-configured so that one could use the RPi "headless" without the need for a serial cable.
Most importantly, AFAIK, NetBSD was the only OS for the RPi that, by default, allowed the SD card to be removed after boot. I recall reading so many comments about SD card wear-and-tear but I have never run the RPi with an SD card mounted R/W. Normally I only use the SD card slot for booting and run the computer with the slot empty.
1. Original NOOBs was 1.1GB. Latest NOOBS is 2.7GB.
When I first used a pi about 10 years ago, I was surprised at the poor performance. I thought about the X desktops I used 10 years before that (so 20 years ago), and about how their hardware was much worse than a pi. Yet it worked better.
I think there's a few reasons for that.
- Most obviously, software has bloated. This should be less so on a non-DE setup like I typically use, but, seems to be the case still. Within that, I can divide into:
-- actual software bloat. Something like gtk+ is nowhere near as lean as it used to be
-- the fact that the modern web is much more resource intensive than it used to be. It wasn't feasible to browse the web despite being a better CPU than I used for the web many years ago.
-- I think I was using framebuffer based graphics drivers, at full HD. So maybe I paid a price for that, and a proper GPU accelerated X would do better
- SD cards are slow. Maybe disk access over USB would do better.
Sad but true. Browsers (and Electron-style apps) gorge on CPU and memory and then want more. Office 365 on a 3 GHz x86 seems about as responsive as desktop Word would have been on an 8 MHz 68K.
> I think I was using framebuffer based graphics drivers, at full HD. So maybe I paid a price for that, and a proper GPU accelerated X would do better
Makes a big difference.
> SD cards are slow. Maybe disk access over USB would do better
USB is much better (as long as it's not a slow USB flash drive.) Also Linux distributions constantly write to the filesystem, which is annoying and probably contributes to the issue that turning off or rebooting a Pi can destroy the SD card.
Most people can skip to the section on prebuilt images and note that the default user account is `freebsd` with the same as the password. And the `root` account has password `root`.
Finally `freebsd-update`* will not work and so you must flash a new image to update. Images are updated approximately weekly.
FreeBSD makes this much easier (rigid directory structure simplifies where what to backup) than if you had to do the same with Linux but it is still a chore backing up installed programs and config files.
[0] https://wiki.freebsd.org/arm/Raspberry%20Pi
* apparently working as of fbsd 13 on arm64 (?rpi3+ but not on 0,1,2 this article is on the rpi1). See nreilly reply below.
From Rpi3 onwards then?
It works (arm64 >FBSD13), my DNS server is RPI3 and FB13.1, all Tier 1 platforms support binary updates:
Boot your Pi from USB and there is no SD corruption to worry about. This has been out of beta and officially supported for over 2 years now. I've never had an issue with power adapter compatibility but understand some had issues when the RPi 4 was released due to it requiring more amperage than previous models. Not really a concern with modern USB C adapters and if you are really concerned just buy the official power supply or one of the multitudes sold on Amazon as for the RPi.
As for overheating, I have had a RPi 4 stuffed in a crowded wiring box with no air flow in my unconditioned garage running non-stop without overheating for a few years now. I live in a climate where it is over 90 degrees Fahrenheit every day June - early September with a good part of late July - late August being over 100. I also have a 4 node RPi cluster which has been running for years without any overheating issues. The cluster nodes do have 5v fans running at 3.3v to reduce noise. I installed these when originally setting up the cluster but would be confident removing them. At this point it just isn't worth the effort to do so.
Are other ARM single-board computers easier for you to buy in India? I have several from Pine64, CubieBoard and Hardkernel that work well.
That'd be ideal replacements. Similar spec to SBCs with a touchscreen and battery backup. But WiFi not ethernet.
Rpilocator tracks stock and has found some sites stick things regularly once a week but if you don't buy within 10-20 minutes of the in stock alert, you'll miss it.
Even Upton said he thinks the supply will be getting better to the point it'll be fully stocked again within one year.
For the last few years anyone doing "Circuit/Micro-Python with GPIO" switched to ESP32 a long time ago, and the "I need a small PC" people just went back to using small PCs.
I don't understand why this shortage has continued for so long - is it because they keep the price low?
Beyond that, you still get all the other ZFS goodness for management, snapshots, compression, zvols, error detection, send/recv, and so forth. Best of all, you can always throw another disk at it and convert to a mirror if the situation changes.
The great thing about zfs is the portability Linux to BSD and vice versa, feature flags noted. I've done it many times on racked servers.
The sad thing about the radxa card is that it presents as usb. You don't want to run any raid-like fs over usb if you can avoid it.
It gets a little tricky when you start talking about GPIO requirements. There are things like the ASUS tinkerboard [2] but it's much more expensive than a Pi.
[1] https://arstechnica.com/gadgets/2022/11/used-thin-client-pcs...
That said, what am I talking about costs about 500. There's some overlap but it's not exactly the same market.