Spring naar inhoud

Herstellen na opstartfouten

Het kan erg vervelend zijn als een computer niet normaal opstart! Hier zijn enkele herstelmechanismen:

Rol terug naar een oudere versie van het besturingssysteem (OS)

Als het opstartprobleem zich voordoet nadat u het systeem hebt bijgewerkt, lost het terugzetten naar de oudere versie het probleem meestal op.

Om dat te doen:

  1. Schakel de machine in of herstart deze.
  2. Houd de spatiebalk ingedrukt totdat de versiekiezer van het besturingssysteem verschijnt (in witte tekst in het midden van het scherm, tegen een zwarte achtergrond).
  3. Press the down arrow key once to select the prior OS version, or a different one.
  4. 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

Be careful with the options presented here! If you are not a technical expert and don’t know what you’re doing, using these tools can easily make the problem even worse.

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:

  1. Schakel de machine in of herstart deze.
  2. Houd de spatiebalk ingedrukt totdat de versiekiezer van het besturingssysteem verschijnt (in witte tekst in het midden van het scherm, tegen een zwarte achtergrond).
  3. Press the e key.
  4. A text field with very long text in it will appear; this is the kernel command line.

Disable systemd extensions

Add systemd.mask=systemd-sysext.serviceto the kernel command line and then press Enter.

This is useful 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.

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

Add systemd.unit=multi-user.target to the kernel command line and then press Enter.

This is useful 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.

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

  1. Add systemd.debug_shell=on SYSTEMD_SULOGIN_FORCE=1 to the kernel command line and press Enter.
  2. Wait for the screen to turn black and stay that way for a few seconds.
  3. Press 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.

Roll back /etc

It’s possible for /etc to be modified when booted into a particular build in a way that makes it incompatible with older builds.

This can manifest as bizarre issues after rolling back the OS, such as black screens or login passwords not being accepted.

To recover, replace the broken /etc with an older, working one as follows:

  1. Get a shell via either of the above methods and run the following commands:
  2. sudo mv /etc /etc.broken
  3. sudo btrfs subvolume snapshot $(ls -d -1 /.etc.* | tail -2 | head -1) /etc
  4. systemctl reboot

These manual steps should become unnecessary once https://invent.kde.org/kde-linux/kde-linux/-/issues/505 is implemented.

Verdere informatie

See https://systemd.io/DEBUGGING for more debugging options. KDE Linux uses systemd exclusively, so everything on that page is relevant.


Artikel bijgedragen door onder de licentie CC-BY-4.0.