FS#53095 - [systemd] cannot boot into rescue shell on initramfs

Attached to Project: Arch Linux
Opened by Abdó Roig-Maranges (abdo) - Monday, 27 February 2017, 01:00 GMT
Last edited by Christian Hesse (eworm) - Saturday, 05 August 2017, 18:08 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When /etc/mkinitcpio.conf includes the systemd hook ad we boot with rd.systemd.unit=rescue.target, sulogin complains that it cannot open the password database, and no shell is available.

Additional info:
The problem is that /etc/nsswitch.conf now makes use of some systemd-provided nss modules, that need to be included in the initramfs. Those are: /usr/bin/libnss_{myhostname,mymachines,systemd}*

Steps to reproduce:
Add the systemd hook into mkinitcpio.conf and boot with rd.systemd.unit=rescue.target in the kernel command line
This task depends upon

Closed by  Christian Hesse (eworm)
Saturday, 05 August 2017, 18:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  systemd 233-1
Comment by Dave Reisner (falconindy) - Friday, 10 March 2017, 12:07 GMT
Adding myhostname makes no sense here, but mymachines and systemd are certainly important. compat is also needed. There's a more general problem though -- users could modify their nsswitch.conf and break this because the modules for passwd aren't dynamically added. Probably need to start using a static nsswitch.conf which we control in order to make this work reliably.

Slightly-related issue: the systemd nss modules are "difficult" to identify because they lack a generic .so prefixed symlink -- they're only versioned (e.g. libnss_systemd.so.2).
Comment by Abdó Roig-Maranges (abdo) - Friday, 10 March 2017, 12:36 GMT
> Probably need to start using a static nsswitch.conf which we control in order to make this work reliably.

I agree.
Comment by Dave Reisner (falconindy) - Saturday, 11 March 2017, 13:47 GMT
Should be fixed in systemd-233-1.

Loading...