16.04 recovery shell works only for two minutes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
friendly-recovery (Ubuntu) |
Fix Released
|
High
|
Dimitri John Ledkov | ||
Bionic |
Fix Released
|
High
|
Dimitri John Ledkov |
Bug Description
Selecting "Rescue" shell from the "Advanced options" menu in grub enters the "friendly-recovery" service and allows to drop into a root shell. After ~120 seconds, systemd sees a timeout and starts another "friendly-recovery" whiptail process. This and the running shell now compete for tty access (input and output) thus making the shell nearly unusable.
Diagnosing this, it becomes clear that in the first root shell entered from friendly-recovery, "systemctl list-jobs" lists the generated "wait for disk" tasks for the /boot partition and the swap partition still to be running. Only when they run into a timeout, the next friendly-recovery is spawned. I'll attach a log session for such a boot that has two manual "logger" entries in it:
Feb 06 10:54:57 harry root[605]: now in root shell from friendly-recovery
...
Feb 06 10:56:41 harry root[1254]: now running in parallel
This clearly shows the timing of the startup.
I have no idea why the "wait for disk" units run into a timeout as the system boots correctly in the "non-rescue" mode. I'll further attach a "systemd-analyze blame" from a regular bootup to show that there is no trace of such a timeout to be found.
Furthermore i do have this behaviour on a real machine and on an (independent) VM, so affects more than the machine the bug was reported from.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: systemd 229-4ubuntu16
ProcVersionSign
Uname: Linux 4.4.0-62-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon Feb 6 11:02:37 2017
InstallationDate: Installed on 2015-03-27 (681 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
MachineType: Hewlett-Packard HP EliteBook 8460p
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
SystemdDelta:
[EXTENDED] /etc/systemd/
[EXTENDED] /lib/systemd/
[EXTENDED] /lib/systemd/
3 overridden configuration files found.
UpgradeStatus: Upgraded to xenial on 2016-12-01 (66 days ago)
dmi.bios.date: 12/22/2011
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68SCF Ver. F.22
dmi.board.name: 161C
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 97.4A
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-
dmi.product.name: HP EliteBook 8460p
dmi.product.
dmi.sys.vendor: Hewlett-Packard
Related branches
Changed in systemd (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
milestone: | none → ubuntu-17.02 |
importance: | Undecided → High |
status: | New → Confirmed |
tags: | added: rls-bb-incoming |
tags: | removed: rls-bb-incoming |
tags: | added: id-5aaa925072882f79f72239f6 |
Although I couldn't reproduce it in a VM, this reliably happens on both of my hardware installs, an old Thinkpad and an Asus Z87-based desktop. The recovery shell is completely unusable. Luckily Ctrl+Alt+Del still reboots the system cleanly.
The workaround seems to be to boot directly to the systemd rescue (or emergency) target, instead of recovery. This can be done simply by adding "rescue" or "emergency" to the default linux command line.