DEV Community

Ryan Westlund
Ryan Westlund

Posted on

How I just left FreeBSD

About a week ago I started my foray into Linux, coming from FreeBSD, by installing Fedora on a VPS to easify build system hell. Thought I'd share how things've gone.

First off, the Fedora VPS wasn't meant to be something I'd switch to, just a place to build with tools that didn't work well on FreeBSD and to get my feet wet with Linux. For actually switching, I knew I'd want a distro without systemd. I don't know enough to make the judgement personally but everyone I look up to shares the opinion that systemd sucks. The Fedora VPS served me well though, and there's at least one thing I found way nicer than the FreeBSD equivalent: dnf.

Firstly, dnf has colored output, making it much more pleasant to work with than FreeBSD's monotone pkg where you have to actually read text to know if it worked or pick through a dense block of information for the one thing you're interested in. The other thing is that dnf info and dnf repoquery can get info on uninstalled packages just like installed ones, which is something I've always wanted to have in pkg.

I don't remember exactly what pushed me over the edge to decide to install a Linux distro on a local computer, but I did so I began the distro hunt. I landed on Void Linux which I'd heard of before from Project Trident.

The selling points of Void Linux I saw were:

  • No systemd (but not sysvinit either)

  • LibreSSL

  • I'd heard it described as a "Linux / BSD hybrid".

  • Rolling release. The last time I touched a rolling release system was Gentoo years ago (when I was still a bit new to the Unix world). I wanted to give it a try.

The Void Debacle

The install process was easy except that I had to do manual partitioning, which I wasn't very confident in. But no worries - I'd made a backup of everything important on my FreeBSD partition, as I knew ahead of time there was probably no way to do this without losing the ability to boot into FreeBSD. Short interlude to explain how that situation came to be:

When I first got this laptop, it had Windows on its drive and I got a secondary drive I plugged in to put FreeBSD on. But the Lenovo BIOS didn't wanna boot that slot. It took me days to land on rEFInd as a solution, which involved installing rEFInd on the Windows drive such that rEFInd would be found by the BIOS and know how to transfer control to Windows or FreeBSD. But that meant FreeBSD depended on both drives, so overwriting even the Windows drive would probably take away my ability to boot it.

(By this time, my Windows installation had died spontaneously several months ago, seemingly from lack of use. Fuckin' Windows, well, not like I still cared about it anyway.)

So I did the base install alright. Then I had to figure out how to set up a usable system. I wanted it to use Wayland, as the ability to finally join the Wayland bandwagon was one of my main attractions to Linux over FreeBSD.

xbps, Void's package manager, disappointed the crap out of me. Just running xbps-install commands in sequence caused broken dependency errors that made xbps refuse to install anything else. The obvious thing to do was never the correct thing, and I gost lost in a maze of cryptic errors just trying to install weston. xbps literally reminded me of Cabal.

In retrospect, I was probably a fool for not going with Trident. Having a fully functional system out of the box would've made this easier.

Then something really weird happened. I changed root's default shell to fish (since I live as root) and to do so, I of course ran which fish. I was surprised to see that fish had apparently been installed in /sbin, but I trusted it and chsh'ed to that.

And, like a dumbass, I logged out just with my last shell just to prove it would be fine.

It wasn't. Somehow, I couldn't log in after that. The correct username and password were telling me 'login incorrect'. I became sure that as wrong as it sounded, it was caused by changing root's shell. I booted into recovery mode and set root's shell back to /bin/sh, and sure enough that fixed it. Weird.

I did eventually get Weston installed. I was thrilled. However, I soon realized it wasn't going to be a usable environment for me. I'd gone for it because it was the only Wayland compositor I'd heard of so I assumed it'd be at least easy to get working, but unless I was missing something, it was extremely primitive - didn't even have the snap-window-to-side-to-make-it-take-half-the-screen thing - which meant my immediate next task was to find a satisfactory Wayland desktop environment.

I found a list somewhere of about 12. Ideally I wanted a tiled one (I'm a lover of dwm), but it wasn't a strict requirement since at this point I still planned to reinstall FreeBSD after this was over and using it for my main platform-independent work.

There were a few that were packaged in xbps, but none that sounded at all satisfactory except Hikari, which I wasn't able to set up. The internet was a treasure trove of outdated documentation.

Several of the remaining Wayland compositors on the list - which I knew I'd had to build from source - were abandoned, most of them not marked as such on the list, and I had further issues trying to build them. You know how make is. Manual dependency hunting and all that.

At one point I was deleting some packages that I'd installed as dependencies of stuff I didn't end up going with, (because I loathe the feeling of dead weight on my system,) and I didn't think I was doing anything dangerous but apparently I inadvertently uninstalled some base system essentials and wrecked the installation.

I tried booting in recovery mode again, but everything was wrecked. Utterly wrecked. The FS was read-only and the mount program was missing. Extremely frustrated and hating xbps with all my guts, I gave up and returned to distro hunting.

The Artix debacle

I looked at a few more, including NixOS, GUIX and Alpine, and ultimately landed on Artix, a spinoff of Archlinux that didn't have systemd.

At first I tried to do a manual install again, since after all I'd just end up deleting the desktop environment , . Manual install proved nightmarish and badly documented (is everything on the internet always outdated?), but this time I had the good sense to resort to a desktop distro of Artix: an ISO that came with Cinnamon installed.

Even then I ran into problems installing it. Just following the steps and some of the packages failed to install - but of course the installation proceeded, making me think they were either non-fatal errors or things I could go back and install later, and it installed everything else over like 30 minutes and then told it had failed and no packages had been installed. What?!? If those errors up there failed the whole thing, why did you you keep on building other packages and printing success messages? Finally I realized the installation failures were caused by network outages caused by NetworkManager interfering with the manual network setup I'd done. The install worked after I disabled NetworkManager (and dealt with another undocumented issue involving importing maintainers' GPG keys; I needed to install archlinux-keyring before everything else).

Partitioning was another difficulty, as Artix's installer doesn't seem to support GPT partition schemes unless you do it all yourself. I tried to do the partitioning manually, but it didn't work - it produced an environment my BIOS refused to boot (with no error message), so eventually I just gave up and let it do an automatic MBR scheme.

Finally. The install worked. Or at least, the easy part. Now I had to deal with those same Wayland compositor difficulties. At least this time I wouldn't be using a package manager that would break its leg doing the most innocent of things.

I was in luck though: Sway was packaged for Artix, one of the ones that had sounded great (it's tiling) but not been packaged for Void.

I installed Sway from pacman and used Linux happily ever after.

Just kidding.

Sway could work, but it had a hard rule against running as root - not even a flag to allow it. Ugh. I would have to build it from source after all. I was not about to come all this way only to give up my single-user way of life.

Except this time, I was able to! I edited out the check, recompiled and installed Sway.

Alt Text

Turns out, Sway is even more powerful than I could've hoped for! Advantages over dwm include dynamically reloading the config (dwm had to be recompiled!), window stacking and tabbing mode, moving window boundaries with the mouse, and more. Love it.

I've even converted to Alacritty over xfce4-terminal. Alacritty's lack of tabs would've been unacceptable under dwm's reign, but I think Sway's additional features cover that need well enough. And Alacritty is written in Rust! Nice to see someone not using C for everything these days.

I managed to get everything else set up with quite a bit less trouble than that.

But I have to say the single biggest advantage over my old FreeBSD system is that trackpad tapping is dead! Good riddance! I wasn't able to disable this on the old system; I couldn't get FreeBSD to detect the trackpad properly and realize there was even a difference between a tap and a click. Now the problem is solved out of the box. I think it has to do with Wayland as it was still tapping in the Cinnamon install.

So that's where I stand: FreeBSD is gone, and I don't plan to reinstall it even as a secondary OS. I'm missing two things relative to it: SIGINFO and ZFS, but Wayland and the associated miracles are worth it.

Discussion (0)