[systemd-devel] Too little information is shown when system enters emergency mode
Andrey Borzenkov
arvidjaar at gmail.com
Sun Oct 21 04:59:42 PDT 2012
This issue comes up relatively often on openSUSE forums. Users
complaint that when system drops in emergency, there is nothing that
would explain user why it happened or what to do. Typical situation is
https://bugzilla.novell.com/show_bug.cgi?id=782904.
openSUSE by default is using "splash quiet" kernel parameter. So the
first issue is, interpretation of "quite" changed in systemd. Now it
means suppress all output of systemd services. As result we have the
following (even without boot splash involved) when some device in
fstab is missing:
doing fast boot
Creating device nodes with udev
Waiting for device /dev/root to appear: ok
fsck from util-linux 2.21.2
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -a /dev/sda6
/dev/sda6: clean, 31805/705744 files, 344231/2819584 blocks
fsck succeeded. Mounting root device read-write.
Mounting root /dev/root
mount -o rw,acl,user_xattr -t ext4 /dev/root /root
[ 10.706463] piix4_smbus 0000:00:07.3: SMBus base address
uninitialized - upgrade BIOS or use force_addr=0xaddr
Welcome to emergency mode. Use "systemctl default" or ^D to enter default mode.
Give root password for login:
This is literally everything that user sees on console. My first
reaction was to add "systemctl --failed" as pre-exec to emergency.
Unfortunately:
linux-q652:~ # systemctl --no-pager --failed
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
JOB = Pending job for the unit.
0 units listed. Pass --all to see inactive units, too.
Everything is fine. This is understandable - we are now in different
transaction and as far as I understand, systemctl --failed shows only
results of currently active transaction (am I right?).
Only when "quiet" is turned off, do I really see something (again -
assuming we do not have bootsplash ...)
Started /boot/efi [ OK ]
Dependency failed. Aborted start of /mnt [ ABORT]
Dependency failed. Aborted start of Login Service [ ABORT]
Dependency failed. Aborted start of D-Bus System Message Bus [ ABORT]
Welcome to emergency mode. Use "systemctl default" or ^D to enter default mode.
So right now if anything goes extremely wrong we have baffled user
sitting before "emergency mode" prompt and not knowing what to do
next. Is it considered a problem by someone else? Would it be feasible
to turn off "quiet" and bootsplash immediately after any unit failed
during system boot?
Thank you
-andrey
More information about the systemd-devel
mailing list