Project

General

Profile

Bug #8098

Emergency shutdown goes back to Greeter

Added by sajolida almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Elevated
Assignee:
Category:
-
Target version:
Start date:
10/13/2014
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

Steps to reproduce:

  • Start Jessie 1205dd3
  • Take off the USB stick

Result:

  • Goes back to Greeter screen. I can even log in again :)

Associated revisions

Revision f3161bbe (diff)
Added by Tails developers almost 5 years ago

Repair emergency shutdown on boot medium removal (Closes: #8098).

The GDM unit file has a Restart=always directive, which is good in the general
case. However, it breaks our emergency shutdown on boot medium removal feature.
Let's disable it, then.

Also, the kexec-load initscript normally silently exits unless systemd is
currently running a reboot job. This is not the case when the emergency shutdown
has been triggered, so let's remove this check. (And besides, to be able to run
this check after the boot medium has been removed, we would have to lock way
more files in memory).

History

#1 Updated by intrigeri almost 5 years ago

  • Status changed from New to Confirmed

#2 Updated by intrigeri almost 5 years ago

Now that we're installing udisks, the symptoms are slightly different, but basically the net result is the same. I suspect that pkill gdm3 in udev-watchdog-wrapper is causing systemd to want to restart the gdm3 service. We could try to remove Restart=always from its unit file, and see what happens.

#3 Updated by intrigeri almost 5 years ago

Indeed, commenting out the two lines that start with Restart in /lib/systemd/system/gdm.service avoids the "back to the Greeter" effect. But I see lots of "SQUASHFS error", and the system seems to be frozen. Next step: add basic debugging to do_stop so that we know at which point it fails.

#4 Updated by intrigeri almost 5 years ago

  • Status changed from Confirmed to In Progress
  • Assignee set to intrigeri
  • % Done changed from 0 to 10

Removing the test for "systemd is pid 1 and is currently running a reboot job" in /etc/init.d/kexec-load seems to fix emergency shutdown. Hopefully it doesn't break regular shutdown.

#5 Updated by intrigeri almost 5 years ago

  • % Done changed from 10 to 20

Pushed a fix, that seems to work in a few cases. Next steps: test more cases.

#6 Updated by intrigeri almost 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 20 to 100

Now works fine. What's displayed on the screen may be a bit less nice than what we had in Wheezy, but it'll do fine at least for the time being.

Also available in: Atom PDF