Finally, systemd!

Posted on August 24, 2015 with tags , . See the previous or next posts.

Even though Debian has moved to systemd as default a long while ago now, I’ve stayed with sysv as I have somewhat custom setups (self-built trimmed down kernels, separate /usr not pre-mounted by initrd, etc.).

After installing a new system with Jessie and playing a bit with systemd on it a couple of months ago, I said it’s finally time to upgrade. Easier said than starting to actually do it ☹.

The first system I upgraded was a recent (~1 year old) install. It was a trimmed-down system with Debian’s kernel, so everything went smoothly. So smoothly that I soon forgot I made the change, and didn’t do any more switches for a while.

Systemd was therefore out of my mind until this recent Friday when I got a bug report about mt’s rcS init script and shipping a proper systemd unit. The first step should be to actually start using systemd, so I said - let’s convert some more things!

During the weekend I upgraded one system, still a reasonably small install, but older - probably 6-7 years. First reboot into systemd flagged the fact that I had some forced-load modules which no longer exist, fact that was too easy to ignore with sysv. Nice! The only downside was that there seems to be some race condition between and ntp, as it fails to start on boot (port listen conflict). I’ll see if it repeats. Another small issue is that systemd doesn’t like duplicate fstab entries (i.e. two devices which both refer to the same mount point), while this works fine for mount itself (when specifying the block device).

I said that after that system, I’ll wait a while until to upgrade the next. But so it happened that today another system had an issue and I had to reboot it (damn lost uptimes!). The kernel was old so I booted into a newer one (this time compiled with the required systemd options), so I had a though - what if I take the opportunity and also switch to systemd on this system?

Caution said to wait, since this was the oldest system - installed sometime during or before 2004. Plus it doesn’t use an initrd (long story), and it has a split /usr. Caution… excitement… caution lost ☺ and I proceeded.

It turns out that systemd does warn about split /usr but itself has no problems. I learned that I also had very old sysfs entries that no longer exist, and which I didn’t know about as sysv doesn’t make it obvious. I also had a crypttab entry which was obsolete, and I forgot about it, until I met the nice red moving ASCII bar which—fortunately—had a timeout.

To be honest, I believed I’ll have to rescue boot and fix things on this “always-unstable” machine, on which I install and run random things, and which has a hackish /etc/fstab setup. I’m quite surprised it just worked. On unstable.

So thanks a lot to the Debian systemd team. It was much simpler than I thought, and now, on to exploring systemd!

P.S.: the sad part is that usually I’m a strong proponent of declarative configuration, but for some reason I was reluctant to migrate to systemd also on account on losing the “power” of shell scripts. Humans…