Mitsunee

Fedora Linux Fallback Kernel

Nov 14th, 2024 (edited)
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

These instructions assume you are unable to boot a new kernel version but have been able to boot into an older version

Troubleshooting Steps

Try temporarily editing the grub config on the broken kernel (Hold shift while booting, press e on the kernel in question) by replacing splash and quiet with nomodeset. This disables some graphics, making it possible to see console output during the boot process. You should now be able to see what the error actually is when booting the broken kernel.

cannot find libsystemd-core-*

But into your older working Kernel and run sudo dracut --rebuild-all --force and try the new kernel again.

Locking Kernel to current version

Install versionlock:

sudo dnf install dnf-plugins-extras-versionlock

This package allows locking the kernel version we booted into to prevent it being uninstalled when upgrading.

Lock the kernel version and set it as default with grubby:

sudo dnf versionlock add kernel-$(uname -r)
sudo grubby --set-default=/boot/vmlinuz-$(uname -r)

You will now forever boot into the kernel you are currently booted into by default.

Updating

When installing system upgrades with dnf you may want to confirm with grubby that your default kernel is still set:

sudo grubby --default-kernel

Releasing the lock

When you receive a new kernel version via updates try booting into that one. If it works set that as new the default and remove the version lock on the old kernel with:

sudo dnf versionlock clear

You can also use versionlock list to view all locked packages.

Add Comment
Please, Sign In to add comment