Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
FreeBSD on the Raspberry Pi (cromwell-intl.com)
194 points by mariuz on Dec 5, 2022 | hide | past | favorite | 85 comments


For those interested, OpenBSD also works on the Rasp Pi. The Pi 4 is supported officially.

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.


Or it would, if the Pi 4 didn't have a street price of 100+ even for the 2GB model.

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.


When you add performance as a consideration, for just straight computing tasks, you might also want to consider a refurbished or used 1 liter PC. They'll have a 6th or 8th generation intel CPU and power draws usually below 60 watts. There are also some other alternatives like Orange Pi. Generally speaking, some of the other options don't have a PoE capability (my Pis are all PoE) and you lose the exposed GPIO pins. But if you're just running a web server and don't care about PoE or hooking an i2c device to it, used 1 liter machines aren't a bad way to go.


> and power draws usually below 60 watts

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.


Except 60 Watts of power is roughly the power-usage of a Lasko box-fan. A PC, even 10 years old, barely uses any power in the scope of things that are in our houses.

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.


Ahh I've accidentally been referring to all of these 1 litre PCs as "NUC"s - didn't realise there was a non-intel, generic name for it


Some also call them SFF (Small Form Factor) PCs but that term for me typically means the slightly larger desktop size PCs you could set a monitor on top of. The 1L PCs are more like the thin clients hospitals have bolted on their monitors.

ServeTheHome has a great ongoing series on "TinyMiniMicro" computers that make great little home servers.


SFF is about two, two and half stacked pizza boxes when it comes to Dell OptiPlex and Lenovo ThinkCentre. There is also USFF which is tiny, but still bigger than NUC.


There's a bunch of info about 1L PCs at ServeTheHome. Look for the 'tinyminimicro' tag: https://www.servethehome.com/introducing-project-tinyminimic...

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.


Just as a heads-up, OpenBSD isn’t a great low wattage OS. My NUC came with Ubuntu and sipped power at idle, but OpenBSD doesn’t idle well and (worse) doesn’t SpeedStep on mains power either.


Install and set obsdfreqd.


OpenBSD still supports it, regardless of whether users can actually purchase the hardware. I mean, it also supports loads of hardware that hasn't even been manufactured in years if not decades, so availability of the hardware on the market is hardly its limiting factor.


You can still get them at retail price but you have to put a mild amount of work into it.

https://rpilocator.com is an invaluable resource, especially this guide: https://rpilocator.com/tips-and-tricks.cfm


What's going on? I'm pretty sure I got 8GB one some time ago for peanuts?


High demand, low supply.


More like no supply.


There's lots of supply, but like 90% of it is going to corporations and backdoor deals before it hits retail shelves for consumers.

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.


From 2014-2017, I used small Linux-capable SBCs running BSD as a "router on a stick" for my home network.

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.

[0] https://www.nmedia.net/nsh/


I run OpenBSD on a NUC-like from Seeed studio for this. Don't recall which model, but has a decently strong Atom, dual GigE, plenty of memory and an NVME slot. And Rpi compatable GPIO, which has some interesting possibilities. Has worked flawlessly for several years.


Probably the Odyssey Blue, which uses a Celeron rather than an Atom CPU. I disabled the fan so it is silent, and the temperature stays very stable (and pretty low). It’s a wonderful device. I’ve programmed the Arduino and use it with Home Assistant (serial sensor). My Odyssey Blue is virtualised using Proxmox and also runs OpenWrt (router), Home Assistant, UniFi Controller, Plex, Transmission, CUPS, SAMBA and more. It still has plenty and ram and CPU left too, if I only I could think of anything else I want to run on it.


> Celeron rather than an Atom CPU

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.


Yes, it's a Seeed Odyssey. It's got a J4125.


Yeah, that's definitely an Atom (or Intel is calling them low power cores now). It's fine, you're clearly happy with the product and Atoms are generally ok (other than some issues with Bay Trail that resulted in an early end of service in early steppings), but the cores are roughly 50% the performance of contemperaneous mainstream cores, and it's often not totally clear when comparing a Celeron to another Celeron that one has half as powerful cores.


Funny, I connected up an old rPi 3 that I wasn't using just yesterday, and put OpenBSD on it for the first time. I wrote the miniroot iso to my SD card using one of those cheapy camera USB adapters on my desktop, then just installed to the SD card after the miniroot was loaded into memory.

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.


Is it still necessary to do the serial console procedure to install it on the RaspberryPi? If that's the case does anyone know why I can do a simple `dd` with a FreeBSD image to the SD card and boot the RaspberryPi but not with an OpenBSD image? I tried once OpenBSD in my laptop and was extremely happy with with it. Then for some reason that I can't remember I switched to FreeBSD which also makes me very happy.


> Is it still necessary to do the serial console procedure to install it on the RaspberryPi?

No, you can switch to a glass console by typing 'set tty fb0' at the 'boot>' prompt.

https://cdn.openbsd.org/pub/OpenBSD/7.2/arm64/INSTALL.arm64


I couldn't connect to the pi using the serial console. Linux detects it and it gets logged in dmesg but the telnet doesn't seem to work.

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.


Er, serial and telnet are very different things; what exactly are you doing?


Oh sorry I meant `screen`

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...


Try Minicom.


I recently powered on my model 1 B for the first time to see what it was like.

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.


> The whole OS is written in assembler.

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/-...


That's some quite nicely written C!


On my Linux and BSD machines I tend to run small X setups, without Gnome or anything.

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.


> It wasn't feasible to browse the web despite being a better CPU than I used for the web many years ago.

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.


What exactly does "Linux desktop experience" mean. For example, what distribution and what version of Linux for the RPi was used in the test.

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.


Here[0] is an actual link discussing freebsd on the raspberry pi.

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.


FreeBSD update does work fine. This started with aarch64 being promoted to a Tier 1 architecture in FreeBSD-13.


That's a good point.

From Rpi3 onwards then?


Yes aarm64 since RELEASE 13


>Finally `freebsd-update`* will not work and so you must flash a new image to update. Images are updated approximately weekly.

It works (arm64 >FBSD13), my DNS server is RPI3 and FB13.1, all Tier 1 platforms support binary updates:

https://www.freebsd.org/platforms/


Title is somewhat misleading IMO; the page does discuss setting up FreeBSD on a Pi, but it's mostly about setting up samba on top of that.


Bad links inside. Should point to https://wiki.freebsd.org/arm/Raspberry%20Pi


Not only that but one of those GDPR dialog boxes that forces you to untick thirty different "legitimate interest" buttons then click through to the vendor list and give up. I thought these vampires were bound by law to require one or two clicks to opt out?


No supply of any RPi computers in India for almost 2 years now. :(


I think it's easier to just source (used)office desktops and x86-based thin clients at this stage. There are only upsides to it e.g. no SD corruption, power adapter compatibility issues, overheating problems, etc., so long that you don't need the exact Pi form factor or Pi HAT interface compatibility.


> There are only upsides to it e.g. no SD corruption, power adapter compatibility issues, overheating problems

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.


No GPIO.


No supply of them in the UK either.

Are other ARM single-board computers easier for you to buy in India? I have several from Pine64, CubieBoard and Hardkernel that work well.


I wish we had more control over cheap smartphones.

That'd be ideal replacements. Similar spec to SBCs with a touchscreen and battery backup. But WiFi not ethernet.


Some can do Ethernet through a dongle!


Samsung with 3rd party roms this always worked, I was surprised to dind out vanilla android on a picel doesn't. I have no insight as to what driver is missing or why it wouldn't always be there.


Not able to source others in India. But am very much interested in RPi4 for my home automation project. Seems like the wait is going to take few months or years.


rpilocator.com tracks them. Jeff Greeling has a couple of good YouTube videos on the problem. Sometimes, if you're willing to wait, you can put in an order on a site like digikey and you'll eventually get some at list price. But yeah, no one can get them at list price. And for what scalpers are charging, or the BS 'starter kit' that you might be forced to buy, get a used thin client PC. The other options, like Nvidia's CM4 style board, are just as hard to find or just as scalped.


DigiKey seems to be the best bet, at least for some models. It may take 1-3 months but they do seem to fill back orders consistently.

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.


Here in Europe kubii does preorders for list price. I got my 400 with 3 or so weeks waiting. But yeah they really have to start solving this issue otherwise raspberry is just going to become obsolete.


Pi is done already.

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.


Same in the US. I've used rpilocator.com extensively and never seem to be fast enough. ¯\_(ツ)_/

I don't understand why this shortage has continued for so long - is it because they keep the price low?


Continuously reload Adafruit's page from 10:30-10:45am Central Wednesday and Thursday.


that is not correct. i had a raspberry pi (4b, 8gb) delivered (for a friend) in india this january. although this information is quite old now, so might be outdated.


yup, seems to be a worldwide problem.


FreeBSD, LISP,Emacs, and a mountain top solitude ? Is this the Zen, we all seek even come if we don't know it ??


Everytime I read one of these I wonder..."where'd you get a raspi?"


Hopefully this will also fuel interest to have OpnSense and XigmaNAS fully ported to ARM. RasPIs scarcity aside, there are many ARM boards from other vendors that could benefit from the port. All it needs is driver support for one of these boards, or similar ones.

https://www.aliexpress.us/item/3256804400925663.html

https://www.aliexpress.us/item/3256804337466480.html


Does WiFi work yet?


I like the idea. Would there be any expected performance differences between running ZFS on a Pi using FreeBSD instead of Ubuntu?


This is rasbperry pi 1 the post is about. It's not a super computer. Running updates and unpacking archives chokes the SD and CPU on official raspbian with ext4. It only has 512MB of memory, so ZFS would be killing it.


Yeah, the pi 1 is really slow for a lot of things these days. While the post mentioned they started this on a pi 1B+, everything else is about running things on model 3 units.


Yes, regardless whether RPI1 or 3. These boards are quite weak. I wouldn't want file system to one of the biggest bottlenecks on a running system. I had BRTFS on rpi3 before and don't recommend it. Both FS are CoW.


It sounds like FreeBSD also works on the Pi 3 and Pi 4:

https://wiki.freebsd.org/arm/Raspberry%20Pi


I'd love to know this too. I have a zfs over 4 drives with the radxa sata hat, running ubuntu and I'd much rather run FreeBSD if I could. (Pi4, 8gb)

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.


That feels like something we'd need to actually benchmark for real to test.


ZFS without mirrored disks is kinda pointless.


No it's not; you still get detection of errors (just without correction), compression, arbitrary filesystems in a single pool, and snapshots. ZFS is great regardless of RAID.


Exactly, that's why my offline/off-site backups are all zfs, well and encryption and compression (zstd-19), at least i know that something is damaged an can (or not) get it from another backup.


You can always set copies=2 to work around block-level failures on important datasets.

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.


I suppose it might look pointless if you need to jump through the hoops to get it running. In FreeBSD ZFS is properly integrated, and ZFS is a perfectly fine default root filesystem; there's no reason not to use it, except eg very memory-constrained virtual machines.


Are there any Raspberry Pi competitors that people like? I've see a few referenced in different articles but I don't have any idea how reliable or useful they are.


That will depend on what your project requires. There are a large number of Pi users that could get by with a simple x86 desktop-class PC or thin client [1] which, as the article points out, can have pretty similar wattage and compute power compared to say running 3-4 Pis.

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...

[2] https://www.amazon.com/dp/B07WPVVZNH


Power usage is the problem. Running a machine that uses 10x more power to accomplish same task that a Pi could is an issue.


To clarify, yes it takes more power than a single Pi. But for any projects where someone would be running _multiple_ Pi's, then the power usage is close if not equal. These machines are able to run the workload of 3-5 Pi's with roughly equal power budgets of 3-5 Pi's.


There are a number of machines using 5800u @ 15W. That's hardly 10x more power. They are only slightly bigger but offer a quite a bit more performance, let alone features.

That said, what am I talking about costs about 500. There's some overlap but it's not exactly the same market.


15W for the whole system or just the AMD 5800U CPU?


The boards from Libre Computer are great because they work with mainline Linux and EFI, meaning you can boot any distro, be it Fedora, Debian etc. and directly use the latest distro kernels. You don't need a special image e.g. with a bootloader setup or some custom kernel that gets outdated quickly and never updated. It's really great to be able to not worry about the OS and kernel updates because you can follow what you would also do on your laptop or x86 server.

https://libre.computer/products/


I'm having success with Orange Pi One using Armbian to build images. Not going to be as performant as a Pi 4 by any stretch but at $25 a pop I can't complain




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: