November 4, 2017

The Ideal Distribution

There are, at the time of writing, about 35 distributions which support the Raspberry Pi according to DistroWatch. This includes linux distributions, and a few BSD flavours too. Picking one should be easy, given what seems like a broad range of options. But... things are never what they seem.

I have some very exacting requirements for a linux distribution I use.

  1. The distribution must have a rolling release model

    Many distributions targeting enterprise adoption usually standardize on a specific kernel / LibC version, and never change that for the lifetime of the release. Upgrade between releases is typically very effort-intensive, and common software packages are almost never upgraded when a major release happens. Critical fixes are backported to the originally released versions only.

    I understand why this model is used. Corporates who develop and/or use applications atop a distribution never like to have the rug pulled out from under them. What seems like a minor bug-fix upgrade of a library would suddenly break that one critical application that everyone needs. Or a kernel upgrade would suddenly mean that specific hardware does not have drivers any more.

    But, none of these apply to me. Yes, I would have to do some tweaking of scripts using deprecated API's, but this is my dominion. I control, and I manage. And I demand that I always have the latest software, and do not have to do periodic upgrades.

    On distrowatch, filtering by rolling release yields just 7 distros. But this is not strictly true.

    • Many Linux distributions have both a fixed and rolling release (Alpine, for example)
    • Even in more staid distributions like Debian (and therefore Ubuntu/Raspbian etc.), there is the option of changing the repo to "testing", which gives a reasonable facsimile of a rolling release
    • The BSD's keep their ports / pkgsrc cutting edge. Only the core OS is on a fixed release cycle. (As an aside, even that last statement about BSD's isn't exactly true. I can upgrade even core OS at any point, but I have to build world from scratch.)
  2. The distribution must have a variant without GUI on default install

    I hate having a distribution which tells me that I must have a GUI, but I can remove it if I don't want it. I much rather prefer a system where I start with a bare minimal clean slate of sorts, and then add exactly the stuff I need.

    Thankfully, many distributions have a "minimal" or "server" variant, which gives me exactly this.

  3. The distribution must have binary package repositories and management system

    Almost all distributions have this, with Gentoo being the single exception. An additional nice-to-have feature here would be the ability to build from source into a package, and install using the packaging system. This too, most distributions provide with varying levels of usability.

  4. I would prefer not to have to deal with SystemD

    I am ambivalent towards SystemD. I've grown up using the old SysV/BSD init style, but I am not averse to change if it is for the better. I understand why SystemD was put in place, and the advantages that it brings to the table.

    • I am not particularly thrilled with having to deal with Unit files
    • I like the management ease that SystemD gives, and the clever use of DBus to simplify dependencies
    • I love the journal interface, and the unification of log files under the journal.
    • Some things I find very grating, like the use of "@" in a service name to pass parameters.

    It would be hypocritical of me to want an rolling release and cutting edge versions, but also a 40+ year old init system.

With the above stipulations, I have narrowed down to just a handful of distributions.

Arch Linux

Arch is rolling release, and non-GUI is the default. It has a good binary packaging system, and capability to build from source (ABS). The vast package collection under AUR is also worth mentioning. SystemD is the default and is tightly integrated into the distribution. That said, and OpenRC version of Arch linux can be used, without SystemD. But this version isn't officially supported, and many of the packages don't bother with supporting an OpenRC compliant init script.

Arch Linux has a separate ARM distribution at ArchLinux|ARM, with custom images for a considerable number of ARM devices. The ARM release generally lags behind the x86-64 release of Arch, but not by too much.


I am an old BSD user, specifically FreeBSD. I switched from Linux to FreeBSD as my primary OS about 20 or so years ago, when linux was at kernel version 2.6. Distributions were primitive then. (Slackware was the most popular one!) and kernel development was a tall order. Developing a device driver as a loadable module was painful on linux; FreeBSD 4.x made it laughably easy.

I stayed on BSD until work forced me back to Linux, right around the time kernel 4.0 was being released. I was shocked to see that the tables had turned quite the other way. Corporate backing and widespread adoption had made Linux a huge success story. FreeBSD was struggling to remove the GIANT LOCK.

Still, FreeBSD actually meets most of my requirements. The core operating system isn't on a rolling release and it is rather messy to upgrade major release versions (like 10 to 11). But all packages and the ports tree are kept cutting edge, and building from source is a breeze. The binary packaging system is excellent.

Debian (and Raspbian)

Debian doesn't do rolling release, but meets all the other requirements, after a fashion. SystemD is the default, but they support an OpenRC based distribution. A minimal install variant exists (not for Raspbian, though). Generally, Debian doesn't track cutting-edge software versions, but they tend to be not too far behind. Building from source is a fairly involved process, at least when I had tried it. The learning curve was quite high, and I ended up installing without packaging. Another nightmare scenario.

Alpine Linux

I discovered Alpine entirely by accident. I had opened Slashdot one day out of sheer boredom, after I had stopped reading it for years. The first headline there was a release announcement for Alpine 3.6. I had never heard of Alpine, so quickly glanced at the page.

Which was fortuitious, since Alpine is the only distribution which hits the perfect sweet spot and meets every one of my requirements.

  • Rolling release, check. (Not the default, though. One has to change to the "edge" repos.)
  • Minimal? CHECK!
  • Binary packaging? Check!
  • OpenRC is the default! SystemD isn't even an option!

And an added bonus, there is no GLibC. The resulting system is so fast and lightweight, it's unbelievable.

In later articles, I will go into more detail on the setup of each of these operating systems, and the trials and tribulations I faced at each turn.