💾 Archived View for tozip.chickenkiller.com › 2022-05-30-trying-freebsd.gmi captured on 2022-07-16 at 13:56:12. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Created 2022-05-30
Being a bit bored, I figured I'd try to install FreeBSD on both my Raspberry Pi and amd64 machine, with Wifi.
My first attempt at getting Wifi working caused my Pi to hang on reboot. I went on the hunt on the interwebs to see what the problem might be. It took me down a series of rabbit-holes. It was a frustrating experience. Like many things in computing, the solution turned out to be relatively simple /once/ you've actually figured out the solution.
What follows is likely to be an incomplete list of things to do.
Type:
dmesg
and scan through the results. I saw:
rtwn0: <Realtek 802.11n WLAN Adpater ...> on usbus1
So far, so good. Alternatively, try:
sysctl net.wlan.devices
which slao revealed that it was rtwn0.
Type
wpa_passphrase YOUR_SSID YOUR_PASSWORD > /etc/wpa_supplicant.conf
You will of course need to use your own values for the SSID and PASSWORD.
They will need to contain lines similar to:
wlans_rtwn0="wlan0" ifconfig_wlan0="DHCP WPA"
You will need to substitute "rtwn" with whatever wifi device was identified in step 1.
Type:
service netif restart
Try pinging an IP address on your LAN. If that works, then try pinging an address on the internet (e.g. "example.com") to see if addresses are being resolved.
Check to see that these settings survive a reboot.
I was interested in trying to program in Zig. On amd64, I could simply:
pkg install zig
This didn't work on my Raspberry Pi. So I'm asuming that the state of packaging on the Pi is much less than on amd64. I was using a Pi 1, which may not be garnerning much interest these days. A more recent Pi would presumably have more support.
Being a bit cheesed off with vi, I decided to install vim on FreeBSD. Its package dependencies are gettext-runtime, indexinfo, libffi, mpdecimal, python38, readline.
So what we're saying is that vim requires arbitrary precision decimal floating point arithmetic. Hmmm. I assume python38 is pretty heavyweight. In the end I decided not to install vim just now, and stick to vi, and see what that buys me.
Back on Debian Stable, I decided to see how to mess around with my nameservers. I installed resolvconf, which I think was unnecessary. This is the big question: who or what is in charge of networking? Is it resolvconf, NetworkManager, something in systemd (I presume this is the real answer)? But which part of systemd? I mean, there's so much stuff to choose from. Maybe resolvectl. No, wait, "resolvctl no included in Bionic". No, wait again. Arch says that you can use resolvctl, or systemd-resolved. So many choices. So many likely wrong choices.
On FreeBSD, it's sooooo easy. You can configure a lot of stuff in /etc/rc.d. And remember, I'm a n00b when it comes to FreeBSD.
Come to think of it, what problem is systemd actually solving? I mean FreeBSD works, right? Slackware works, right? So what's the point?
systemd standardizes configuration
Does it? As the joke goes: the great thing about standards is that there are so many to choose from. Why not just copy what Slackware does? Slackware has its "standard" way of initialising a system. It seems to me that systemd is a standard only because it calls itself a standard, and its adoption rate.
systemd is modular
Is it? More modular than Slackware? In what way? It seems like systemd is a big hairball of complexity. So not modular.
systemd does not suffer broken scripts
Well, write them properly. systemd will also not work if you write faulty units. Just as you can write Fortran in any language, you can write faulty anything. Isn't there something we could do to make init scripts simpler and more reliable without throwing the baby our with the bathwater and inventing a whole new system?
When I was thinking about playing around with a new distro, I narrowed the choice to either Slackware or a BSD. I figured that FreeBSD was a much bigger ecosystem over the other BSDs, making FreeBSD a more natural choice. I am somewhat familiar with Slackware. Slackware provides a moderate amount of software out of the box, but it's by no means complete. You're probably going to want to round it out with sbopkg. But then I'd need to compile it from source, and there's no dependency management. I figured that FreeBSD has a wider selection of stuff that I can install in binary form, as well as get their dependencies. So I figured that FreeBSD would edge out Slackware in that important respect, and decided to give FreeBSD a go.