6

A message like this one is often shown on shutdown:

"A stop job is running ..." (nfs mount)

This apparently even happens when the NFS server did not go away. But even if the connection to the NFS server was lost, systemd is effectively preventing the system from shutting down. It is not possible anymore to ssh into the system and it's not possible to switch to another tty either. Hitting Ctrl + Alt + F2 does switch to a black screen with a cursor, but there's no login prompt. The user is forced to reboot the system forcefully, risking data corruption on those filesystems that are still mounted.

How can the tty console login be enabled at that time during the shutdown process?
It should be possible to log in as root and do umount -l or whatever might be necessary to allow the system to continue the shutdown process normally.

(This question is not about NFS, it's just a common example. An NFS mount does actually hang by design if the server went away. This question is about the fact that while this "stop job" is blocking the shutdown process, it is not possible to log in and enter commands to take care of the situation.)

3
  • Haven't encountered this with systemd yet, but have seen it with sysvinit scripts. Does typing Control-C kill the job that's hung? Jul 8, 2016 at 2:05
  • @MarkPlotnick: Tried all kinds of shortcuts, pretty sure Ctrl + C was one of them and it didn't do anything. The person sitting in front of the computer should be able to get a shell and stop such a process, whether systemd or sysv.
    – basic6
    Jul 15, 2016 at 14:48
  • A related question is unix.stackexchange.com/questions/310737 .
    – JdeBP
    Jan 25, 2019 at 17:13

1 Answer 1

0

do this ahead of time by issueing:

   systemctl enable debug-shell.service  # to activate F9-sh

go to Ctrl Alt-F9 debug root shell. maybe launch bash from sh there for convenience.

By actual shutdown time it is too late to still log in, however.

So to answer your question: It cannot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .