Bug 76124 - Systemd on initramfs won't get to emergency mode if root parameter is garbage
Summary: Systemd on initramfs won't get to emergency mode if root parameter is garbage
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-13 15:46 UTC by Mateus Rodrigues Costa
Modified: 2014-03-17 00:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Mateus Rodrigues Costa 2014-03-13 15:46:57 UTC
OS: Arch Linux 64-bits
systemd version: 210-3
mkinitcpio hooks: base systemd

If you change your boot entry root parameter to some garbage text (e.g. root=abc rw) then systemd running on initramfs will just hang and won't give you the option to use the emergency mode.
Comment 1 Mateus Rodrigues Costa 2014-03-16 23:30:06 UTC
Hi, I have updated systemd to 211-1 and mkinitcpio to 17-1 and this still happens.
mkinitcpio hooks: HOOKS="base systemd btrfs autodetect modconf block keyboard sd-vconsole resume filesystems"

Also, here is some more information:
This bug will happen to any non-dev device garbage root value and to not having a root value set.
During the boot process, if your root value is a /dev device that is not available (in this case, because it doesn't exist) systemd will wait 1min30s for it and, after time outing, you will get immediately to emergency mode.
However, if it not, then systemd may or may not take a long time to enter emergency mode, if it ever get to it.

IMO, you should be dropped immediately to the emergency mode after systemd notices it can't mount $root because it is invalid. I'm considering it a minor bug, but you may consider it a feature request or enhancement.
Comment 2 Lennart Poettering 2014-03-17 00:29:04 UTC
device probing on modern hardware is not deterministic, there's no fixed time by which hardware has to have shown up. Especially on things like USB or even network devices like iscsi it's entirely up to the devices to decide when they show up after the the bus has been powered on. Thus, systemd never can know whether a device simply hasn't shown up yet, or if it never ever will. Thus we cannot enter emergency mode after having figured out that a device is invalid, because we simply don't have that information. Thus the timeout of 90s which should be a reasonably safe bet for most hardware.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.