[arch-general] Optimizing boot
Rodrigo Rivas
rodrigorivascosta at gmail.com
Wed Apr 30 17:26:48 EDT 2014
On Wed, Apr 30, 2014 at 12:28 PM, Paul Gideon Dann <pdgiddie at gmail.com> wrote:
> Since we're on the topic, does anyone have a clue how I can find out why systemd hangs for
> ages when I shut down or reboot? The display server is shut down, I'm placed in a TTY with a
> "shutting-down" message, but then it looks like it's waiting for something that never happens,
> and then I think I see something flash past about a watchdog timeout before it proceeds. If I
> could get rid of that hanging step, it would save me waiting 60 seconds or however long each
> time I reboot (which is infrequently enough that it's only been a mild annoyance so far).
>
> What's the correct way to diagnose this? I don't think systemd-analyze can handle
> shutdown. Could this be an initrd thing?
Although the original problem has already been solved, I'll post my
trick to debug this kind of issues with systemd:
* Before doing the thing that causes the problem run as root
`systemctl start debug-shell`. If the problem is in the boot sequence,
then run `systemctl enable debug-shell` and then restart.
* That unit will open a root shell in TTY9, so beware of the security
issues if you let that enabled. This shell will be enabled from the
early boot until the final shutdown.
* When the system hangs, switch to TTY9, with Alt+F9 or Ctrl+Alt+F9
and get access to the debug shell. There you can run `systemctl
list-jobs` or `journalctl -b` to see what is wrong with your system.
HTH
-
Rodrigo
More information about the arch-general
mailing list