From Fedora Project Wiki
(bold CTRL+ALT+F9) |
(debug-shell is now packaged in systemd) |
||
Line 3: | Line 3: | ||
In case of boot-time problems with systemd, it is useful to have a root shell available for debugging. | In case of boot-time problems with systemd, it is useful to have a root shell available for debugging. | ||
{{admon/warning|This debug shell requires no authetnication and provides root privileges to anyone who has physical access to the machine. Turn in it on only as needed and disable afterwards.}} | |||
* Enable using <code>systemctl enable debug-shell</code> | |||
* Enable | |||
{{admon/tip|Manual enabling|If you find yourself in a situation where you cannot use systemctl (e.g. when setting this up from a different booted system), you can enable the service manually: | {{admon/tip|Manual enabling|If you find yourself in a situation where you cannot use systemctl (e.g. when setting this up from a different booted system), you can enable the service manually: | ||
<pre>cd $PATH_TO_FEDORA_ROOT/etc/systemd/system | <pre>cd $PATH_TO_FEDORA_ROOT/etc/systemd/system | ||
mkdir sysinit.target.wants | mkdir sysinit.target.wants | ||
ln -s | ln -s /usr/lib/systemd/system/debug-shell.service sysinit.target.wants/</pre>}} | ||
* Next time when booting, you will be able to switch to tty9 using '''CTRL+ALT+F9''' and have a root shell there available from an early point in the booting process. | * Next time when booting, you will be able to switch to tty9 using '''CTRL+ALT+F9''' and have a root shell there available from an early point in the booting process. | ||
You can use the shell for checking the status of services, reading logs, looking for stuck jobs with <code>systemctl list-jobs</code>, etc. | You can use the shell for checking the status of services, reading logs, looking for stuck jobs with <code>systemctl list-jobs</code>, etc. | ||
* When done, disable with <code>systemctl disable debug-shell</code>. | |||
{{admon/warning|Use this shell only for debugging!|Do not forget to disable debug-shell.service after you've finished debugging your boot problems. Leaving the root shell always available would be a security risk.}} | {{admon/warning|Use this shell only for debugging!|Do not forget to disable debug-shell.service after you've finished debugging your boot problems. Leaving the root shell always available would be a security risk.}} |
Revision as of 22:45, 10 January 2016
Setting up an early debug shell
In case of boot-time problems with systemd, it is useful to have a root shell available for debugging.
- Enable using
systemctl enable debug-shell
- Next time when booting, you will be able to switch to tty9 using CTRL+ALT+F9 and have a root shell there available from an early point in the booting process.
You can use the shell for checking the status of services, reading logs, looking for stuck jobs with systemctl list-jobs
, etc.
- When done, disable with
systemctl disable debug-shell
.