✍🏾 Trouble with kernels, Rollback default kernel guide ! systemd-boot + Grub | A thread!

Some folks are experiencing issues with certain kernels, this is a quick and dirty guide to make a different kernel the default to get you by through the tough times.

@Mods if this is not the right place for this guide please move or remove.

I use systemd-boot so that’s be first. ( Note: I have used Grub in the past, so i remember a thing or two. . . :wink:

Here are some quick steps to boot your your machine to an earlier kernel if you are having trouble with the current 6.7.11 kernel.

systemd-boot options :

Identify the EFI boot entry for the kernel you want to boot into: You need to find the EFI boot entry corresponding to the kernel version you want to switch to. These entries are usually managed by systemd-boot.

You can find the available EFI boot entries with:
bootctl list

This command will list all the available boot entries, including their titles, IDs, and paths.

Set the selected kernel as the default boot option: Once you identify the EFI boot entry for the desired kernel version, you can set it as the default boot option using:

bootctl set-default <boot_entry_id> Replace <boot_entry_id> with the ID of the EFI boot entry for the kernel you want to boot into.for me it looks like :
id: ecc5b5e914994eb48de9d5fda2cd1ae6-6.7.7-200.fc39.x86_64.conf

Reboot your system: After setting the default boot entry, reboot your system:

reboot

and you are good to go ! :party:


Grub

To roll back to a previous kernel using grubby, you’ll need to know the version number of the kernel you want to boot into. You can find this information by listing the available kernel entries in the GRUB configuration. Here’s how you can do it:

  1. List the available kernel entries using the grubby command:
    grubby --info=ALL | grep kernel

This will show you a list of all kernel entries along with their version numbers. Identify the version number of the kernel you want to boot into. Set the selected kernel as the default boot option:

grubby --set-default /boot/vmlinuz-<version>

Replace <version> with the version number of the kernel you want to boot into.

Reboot your system: After setting the default boot entry, reboot your system:

reboot

and you are good to go ! :party:

3 Likes

Thanks for this!

For a one time boot you can do
You can also do sudo grubby --info=ALL | grep -i 'index\|title'

index=0
title="Fedora Linux (6.8.4-300.fc40.x86_64) 40 (Forty Prerelease)"
index=1
title="Fedora Linux (6.8.2-300.fc40.x86_64) 40 (Forty Prerelease)"
index=2
title="Fedora Linux (6.8.1-300.fc40.x86_64) 40 (Forty Prerelease)"
index=3
title="Fedora Linux (0-rescue-f4b9f95c37ac496b94dc82a600296c5c) 40 (Forty Prerelease)"

sudo grub2-reboot 1

Would do a 1 time boot of Fedora Linux (6.8.2-300.fc40.x86_64

2 Likes