Created
December 6, 2016 06:47
-
-
Save AttilaSATAN/d514cda2511c2900cad4bbcd73e172d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diagnosing Shutdown Problems | |
Just like with boot problems, when you encounter a hang during shutting down, make sure you wait at least 5 minutes to distinguish a permanent hang from a broken service that's just timing out. Then it's worth testing whether the system reacts to CTRL+ALT+DEL in any way. | |
If shutdown (whether it be to reboot or power-off) of your system gets stuck, first test if the kernel itself is able to reboot or power-off the machine forcedly using one of these commands: | |
sync && reboot -f | |
sync && poweroff -f | |
If either one of the commands does not work, it is a kernel bug, not systemd. | |
Shutdown Completes Eventually | |
If normal reboot or poweroff work, but take a suspiciously long time, then | |
boot with the debug options: | |
systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M enforcing=0 | |
save the following script as /usr/lib/systemd/system-shutdown/debug.sh and make it executable: | |
#!/bin/sh | |
mount -o remount,rw / | |
dmesg > /shutdown-log.txt | |
mount -o remount,ro / | |
reboot | |
Look for timeouts logged in the resulting file shutdown-log.txt and/or attach it to a bugreport. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment