Biz & IT —

Debian 8: Linux’s most reliable distro makes its biggest change since 1993

The controversial "systemd" comes to an OS known for stability.

Debian prefers to name everything after <em>Toy Story</em> characters.
Debian prefers to name everything after Toy Story characters.
Disney / Debian

Debian 8—nicknamed "Jessie" after the cowgirl character in Toy Story 2 and 3—debuted last week, but it feels overdue. The release was in development within the Testing channel for quite a while, and, if you recall, Debian Linux consists of three major development branches: Stable, Testing, and Unstable. In order for a new iteration of Debian to officially go public, work must progress through each stage (starting in Unstable, ending in Stable). But it wasn't until the official feature freeze for this release in November 2014 that the contents of Testing really became what you'll actually find in Debian 8 today.

If all that sounds complicated and slow, that's because it is. In fact, that's kind of the point.

Debian Stable is designed to be, well, stable. The foundation of Debian is built upon long development cycles and a conservative approach to application updates.

So as a general rule, Debian Stable lags behind pretty much every other distro on the market when it comes to package updates. If you want the latest and greatest, Debian Stable simply isn't the distro for you. While Debian 8 may bring a ton of new stuff to Debian, it has almost nothing the rest of the Linux world hasn't been using for, in some cases, years. What's more, many things in Debian 8 are still not going to be the latest available versions.

The Debian family tree.
Enlarge / The Debian family tree.
However, Debian 8 has one giant exception to that general rule: systemd. More on that momentarily.

Why use Debian? There are plenty of philosophical reasons: the legendary Debian social contract, the community, and all included software in the repos happens to be free (as in freedom), long a hallmark of Debian.

The more practical appeal of Debian lies in its legendary stability. I've been running Debian servers since 2005 (Sarge) and have never had a server crash. This dependability is part of the reason Debian is the base for dozens of downstream distros.

Not everything downstream uses the Stable channel as its base. In fact, it's worth noting that perhaps the most famous project downstream from Debian, Ubuntu, is built off the package base in the Unstable channel. Still, Debian Stable remains one of the most popular Linux distros. This is particularly true for Web servers where, according to stats from W3Techs.com (which should be taken with a grain, if not a generous helping, of salt), Debian accounts for the largest percentage of Linux servers on the Web: 32.3 percent.

All of this makes Debian Stable updates a much bigger deal than faster moving distros like Ubuntu or Fedora.

And because Debian 8 makes the leap to systemd, the new version just might be the biggest change in Debian since the first release back in 1993. Debian is justifiably famous for being so stable you could blindly type apt-get dist-upgrade on a production box and get away with it. This time, though, there's systemd to contend with.

What's new in Debian 8

There is far more to Debian 8 than we can cover; there's probably more than even John Siracusa would be willing to cover. Debian's official release notes report that 24,573 software packages have been updated (that is, 66 percent of the distro), but amid that firehose of updates, systemd stands out.

systemd

Unless you've been living under a rock, you've probably caught wind of systemd in the last year or two. Most likely what you heard was froth-mouthed exclamations about how it's either the second coming of the Penguin or else the NSA-backed devil incarnate. There are, it seems, no moderate opinions about systemd. The debate surrounding it has been anything but civil, even in the orderly Debian community.

To understand why, you need to understand how your operating system starts up and runs all the various processes it runs. Pardon the analogy, but just as there was "one ring" in Middle Earth that controlled all the rest, in Linux one application controls all the others. This is the init (short for initialization) system. The init system is the first process started when you boot and the last to shut down. In the time between startup and shutdown, the init system acts as the master controller of all processes, and it's traditionally assigned the process ID 1.

There are quite a few init systems out there, but most Linux distros (Slackware and Gentoo being notable exceptions) have been using SystemV. SystemV is outdated and riddled with crufty, often no longer needed code. It's long overdue for a replacement. Few debate that, but start asking what should replace it and you'll soon see the knives come out.

Systemd is designed to replace SystemV, providing an init system that's cleaner, faster, and considerably easier to use. At least, that's the sales pitch.

Behold, systemd.
Enlarge / Behold, systemd.

Most of the contention about systemd arises because systemd isn't just an init system. Rather, it's an init system that wants to manage more than processes. If your distro of choice opts to run systemd with all the bells and whistles, it will be running some 69 binaries. Some call that monolithic, but systemd creator Lennart Poettering disputes that charge, arguing that what people don't like is that systemd all ships as a single tarball. It's all updated and maintained in a single codebase.

The very centralized nature of the project is what led Canonical founder Mark Shuttleworth to call systemd "hugely invasive." He went on to say "one of the ideas in systemd that we think is really bad is to bring lots of disparate pieces of technology into a single process. So lots of formerly-independent pieces of code, which happen to be under the control of folks driving systemd, have been rolled into that codebase."

Shuttleworth later acknowledged that "it's still possible to build independent packages of the different pieces from that code," which has long been Poettering's response to the monolithic charge. But there's no denying that systemd throws out the Unix philosophy of small things with narrowly defined functionality—that doesn't mean it's bad though.

Much of the debate about systemd is academic at this point because here's a truth that you'll discover in Debian 8, Ubuntu 15.04, and just about every other major distro around: systemd is here.

You can disable it and boot with SysV if you like, but systemd isn't going away. Your long-term options are to either embrace it, cast your lot with Devuan, or make the switch to FreeBSD.

For me, since systemd appears to be here to stay, and it's the default starting with Jessie, it was time to roll up my sleeves and RTFM.

While testing, my experience with systemd was decidedly mixed. On the desktop, I hardly notice it. I doubt anyone using desktop Linux for everyday tasks like e-mail, Web browsing, office docs, photo editing, and the like will either know or care that they're running systemd. I have encountered a couple of problems with the systemd journal feature when running Debian 8 in a virtual machine, but on actual hardware the same problem has not come up.

Debian 8 on the server is a different story, though. I've been slowly migrating my sites to Jessie-based servers over the past six months and have had a few hiccups here and there. For example, while systemd likes to say it's fully compatible with older init scripts, that's not completely true.

In my case, enough has gone wrong that I suggest you don't jump in immediately with both feet.

Before you even think of upgrading a server to Debian 8, be sure to read through the systemd incompatibilities list. In particular, note that if you use tools like /sbin/chkconfig you'll quite possibly be getting incorrect or at the very least incomplete information when systemd is in charge. Also note that systemd services are "executed in completely clean contexts," which means not even $HOME is set. If you have init scripts depending on such variables, they will break.

There's also systemd's journal tool, and it takes some getting used to if you're more familiar with syslog. That said, you can run syslog alongside journal if you prefer not to switch up your workflow too much.

In fact, you can still run Jessie without systemd. All you need to do is use preseed to replace systemd with sysvinit at the end of the install (check out the Debian wiki for details). This method works well enough on the server, but don't try it with a desktop environment installed.

Ultimately after finding some new systemd service scripts for the handful of things I need—Nginx, Gunicorn, and some other Web app tools—and figuring out how to set up the journal to actually log useful information, I've managed to upgrade to Jessie. On one hand, no one likes changes, and I could have done without learning a new syntax for init scripts (though systemd files are at least much easier to read and write). But once you're over the migration hurdles and headaches, I've found systemd is, well, just fine.

Channel Ars Technica