Recover from Boot Failures
It can be quite distressing when a computer fails to boot up normally! Here are some recovery mechanisms:
Roll back to an older version of the operating system (OS)
If the boot failure started happening after you updated the system, rolling back to the older version will generally fix it.
To do this:
- Power on or restart the machine.
- Repeatedly press Space until the OS version chooser appears (in white text in the center of the screen, against a black background).
- Press the down arrow key once to select the prior OS version, or a different one.
- Press Enter to boot into it.
If this fixes the issue, please report it at https://invent.kde.org/kde-linux/kde-linux/-/issues/, and attach the output of running journalctl --boot -1 --no-pager in a terminal window.
Boot the system in a different way by changing the kernel command line
If that does not work, you can change how the system boots by altering the kernel command line parameters to achieve various debugging approaches.
To edit the kernel command line:
- Power on or restart the machine.
- Repeatedly press Space until the OS version chooser appears (in white text in the center of the screen, against a black background).
- Press the e key.
- A text field with very long text in it will appear; this is the kernel command line.
Disable systemd extensions
If you have any systemd extensions active, and the boot failure started happening after you updated the content in any of them, this could be the cause. Temporarily disabling extensions should resolve the issue until you can debug what’s wrong with it.
To do this, add the following to the kernel command line:
systemd.mask=systemd-sysext.service
If this works, after logging in, debug what’s wrong with the extension and fix it. If you are unable to, disable it.
Bypass issues with the login screen or Plasma
If the login screen or plasma are failing to start or crashing in a loop, you can boot into a command-line environment that will bypass both of them, within which debugging is possible.
To do this, add the following to the kernel command line:
systemd.unit=multi-user.target
If debugging and troubleshooting determines that the problem was not caused by your own actions, open a bug report for the KDE Linux team to investigate.
Enter the emergency root shell
If even that does not work, you can perform command-line maintenance and repairs using the emergency root shell.
To access it:
add the following to the kernel command line:
systemd.debug_shell=on SYSTEMD_SULOGIN_FORCE=1Press Ctrl+Alt+F9 (note: on a laptop, you may also have to hold down Fn).
You are now in the emergency root shell. Every command you run will be executed as root, so be careful.
If debugging and troubleshooting determines that the problem was not caused by your own actions, open a bug report for the KDE Linux team to investigate.
Article contributed by Nate Graham under the CC-BY-4.0 license.