17 10 | 2014

Trying systemd [ OK ] Switching back to SysV [ OK ]

Written by Tanguy

Classified in : Homepage, Debian, Command line, Grumble

Since systemd is now the default init system under Debian Jessie, it got installed to my system and I had a chance to test it. The result is disappointing: it does not work well with cryptsetup, so I am switching back to SysV init and RC.

The problem comes from the fact that I am using encrypted drives with cryptsetup, and while this is correctly integrated with SysV, it just sucks with systemd, where the passphrase prompt is mixed up with service start messages, a bit like that (from memory, since I did not take a picture of my system booting):

Enter passphrase for volume foobar-crypt:
[ OK ] Sta*rting serv*ice foo**
[ OK ] ***Starting service bar**
[ OK ] Starting service baz****

The stars correspond to the letters I type, and as you can see, as the passphrase prompt does not wait for my input, they get everywhere in the boot messages, and there is no clear indication that the passphrase was accepted. This looks like some pathological optimization for boot speed, where even interactive steps are run in parallel with services startup: sorry, but this is just insane.

There may exist ways to work around this issue, but I do not care: SysV init works just fine with no setup at all, and I since have no real need for another init system, systemd as a replacement is only acceptable if it works at least as fine for my setup, which is not the case. Goodbye systemd, come back when you are ready.

14 comments

friday 17 october 2014 à 17:05 asdf said : #1

thanks for that. would have stumbled into it, too.

stupid question, systemd being the default in debian jessie, how do you switch back to sysv? I was already looking into ditching debian, which I would rather not like to do.

friday 17 october 2014 à 17:10 Konstantin Khomoutov said : #2

You could install Plymouth to get the requests to the user serialized: <http://web.dodds.net/~vorlon/wiki/blog/Plymouth_is_not_a_bootsplash/>

This is mentioned in another recent systemd-related post aggregated on Debian Planet: <http://changelog.complete.org/archives/9241-update-on-the-systemd-issue> (the relevant remark is at the bottom).

friday 17 october 2014 à 17:11 Gunnar Wolf said : #3

Hi Tanguy,

I switched over my laptop, which uses a whole encrypted device via LUKS. It is still stable Wheezy, plus the backported systemd, but I wanted to get a feeling of the changes. It worked almost flawlessly — I just had to modify a detail in my /etc/fstab (IIRC systemd-remount-fs.service was failing), but it works quite reliably since.

Maybe if you gave more details on what failed for you?

friday 17 october 2014 à 17:13 Konstantin Khomoutov said : #4

@asdf, that should amount to doing

# apt-get install sysvinit-core systemd-shim

The latter is only needed iff you have any program wishing to use any of the services provided by systemd.

friday 17 october 2014 à 17:24 Tanguy said : #5

@Konstantin Khomoutov : No way. SysV init does not use it and it works just fine, so there is no actual reason why systemd would need it. And anyway, if it does, that should be indicated in its Depends or Recommends field. As I said, I have no need for systemd, so if it replaces SysV init, either it does so in a fine way with no configuration or additional packages to install manually, which is not the case, or I will get back to SysV.

@Gunnar Wolf : systemd prompts for my encrypted drive passphrase but does not wait for me typing it; instead it continues starting services and the passphrase I type gets mixed in the startup messages.

friday 17 october 2014 à 17:42 Tanguy said : #6

@Konstantin Khomoutov : Okay, by curiosity, I tried that. It is a bit better with Plymouth, but while regular service startup messages no longer appear while I am typing the passphrase, there are still messages about a cryptsetup passphrase job waiting, which get into my typing of the passphrase. So, it is better, but if it sucks less, it still sucks. Back to SysV init again.

friday 17 october 2014 à 17:57 Joachim Breitner said : #7

Luckily, I had already plymouth running before switching to systemd, so despite using cryptsetup, it worked just fine.

friday 17 october 2014 à 21:22 Derek said : #8

You only encrypt some of your drives. If your whole drive is encrypted, the initramfs must wait before systemd launches, and the password dialog is smooth. If you haven't encrypted your whole drive... Well, someone with access to your system could very well just subvert your root FS. Why haven't you encrypted your whole drive?

friday 17 october 2014 à 23:01 Ralf said : #9

That's weird, on my system systemd does not even print all these status messages. So even if it would ask the password later (I have the root encrypted), it shouldn't be a problem. Did you removem "quiet" from the kernel parameters?

saturday 18 october 2014 à 00:23 pywy said : #10

Hi tanguy, I have the same issue as you with systemd. I hame my /home LVM volume encrypted, and systemd does not integrate it very well through boot process.
@Derek Having only /home encrypted saves me some CPU time on my old hardware ;)

saturday 18 october 2014 à 11:43 Karellen said : #11

Odd, I've not seen that. I've got one computer using cryptsetup to manage an encrypted root, and a different one with only an encrypted /var (/home bind-mounts to /var/local/home) also with cryptsetup, neither of them have plymouth, and I don't get any interruptions when entering my passphrase under systemd.

monday 20 october 2014 à 14:52 mirabilos said : #12

@Ralf: why would anyone *not* remove “quiet” from the kernel command line (other than “using *buntu” ofc). I like to see what’s going on.

friday 07 august 2015 à 01:31 mark said : #13

Systemd will eventually consume the alternatives.

friday 21 august 2015 à 14:29 P.G. said : #14

"Systemd will eventually consume the alternatives." — mark

Correction, Red Hat will eventually consume the alternatives. Everything else will be some kind of clones with a custom look (like Debian at the moment and the only thing it lacks to achieve that goal is a Debian Enterprise Edition.)

Write a comment

What is the second letter of the word xbxj? : 

Archives