FS#45480 - [systemd] The 'systemd' initcpio hook fails to provide the shell or sulogin binaries

Attached to Project: Arch Linux
Opened by felix (fstirlitz) - Friday, 26 June 2015, 22:01 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 18 June 2016, 13:05 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Dave Reisner (falconindy)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

The 'systemd' initcpio hook doesn't provide the shell or the sulogin binary, rendering systemd's fallback to an emergency shell useless.

While the 'base' hook provides a busybox shell, no initcpio hook provides the sulogin binary. Requiring a separate hook to make the emergency shell work is wrong anyway; the emergency shell is part of systemd's [built-in?] functionality, which you never know when you will need.

(By the way: shame on systemd for failing to give a proper error message in case /bin/sh is missing. All I got was a blinking cursor below a message stating "emergency shell started". Thanks, Pöttering.)

Steps to reproduce:
0. Set HOOKS="systemd $whatever" in your /etc/mkinitcpio.conf (skipping 'base')
1. Run mkinitcpio
2. Screw up your system so badly that systemd won't even mount the root partition on next boot
3. Reboot
4. Cry helplessly
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 18 June 2016, 13:05 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#36265 
Comment by felix (fstirlitz) - Saturday, 27 June 2015, 06:49 GMT
Apparently this mostly overlaps with task #36265 (searching for "sulogin" didn't find it), filed in July 2013. (And the bug is just as reproducible by adding 'systemd.unit=emergency.target' to the kernel command line. Also, another mystery solved: why keyboard doesn't work. The keyboard driver is not loaded at this point.)

But then, why is it still not fixed?! systemd is controversial enough as it is, and such irresponsible packaging can only make it worse for its supporters.
Comment by Evangelos Foutras (foutrelis) - Saturday, 27 June 2015, 17:36 GMT
You can't simply skip 'base' and then say that things should work.

From /etc/mkinitcpio.conf:

# 'base' is _required_ unless you know precisely what you are doing.

Not sure about sulogin and why it's needed, but a shell is provided unless you choose not to use the base hook.

(Edit: I guess  FS#36265  explains why sulogin is needed; ignore my previous statement about sulogin.)
Comment by felix (fstirlitz) - Saturday, 27 June 2015, 18:22 GMT
If the 'systemd' hook is supposed to be a replacement for 'base', as is claimed in some places[0][1], then it shouldn't depend on the thing it is meant to replace.

[0] <https://wiki.archlinux.org/index.php/mkinitcpio#Common_hooks>
[1] <https://projects.archlinux.org/svntogit/packages.git/commit/?h=packages/systemd&id=b1183f22cc93306ab1b9bb02b4a551cb4f972db3>
Comment by Raphael Scholer (rscholer) - Saturday, 25 July 2015, 20:16 GMT
Comment by Philipp (hollunder) - Saturday, 30 January 2016, 12:30 GMT
I was also just bitten by this.
I had put an external device into fstab. Worked fine at home. When on the road it was not there and boot failed. There was no way to boot anyway or edit fstab.
This is ridiculous.

Loading...