Fedora 40 Stuck on Kernel 6.5.6 After Upgrade

2024-10-02

How to fix the issue of Fedora 40 booting with the old kernel (6.5.6) after upgrading from Fedora 39.

>

You will see specific versions mentioned in this guide, but that's only because it reflects my situation. You can still follow this solution regardless of your version.

# 🚨 The Scenario

I installed Fedora 39 almost a year ago, and Fedora 40 was released a few months ago. I decided to update the system using dnf system-upgrade, and everything seemed fine until I rebooted.

After that, every time I started the system, I saw this message:

[ !! ] This OS version (Fedora Linux 39 (GNOME Edition) dracut-059-16.fc39 (initramfs)) is past its end-of-support date (2024-05-14)

I checked the OS version with cat /etc/fedora-release, and it confirmed Fedora 40:

Fedora release 40 (Forty)

## 🤔 What's going on?

Although Fedora 40 is listed, the system is still running the old kernel from Fedora 39. This happens when the kernel isn't updated during the dnf system-upgrade process, so the system continues to boot with the outdated kernel.

You can confirm this by running uname -a:

Linux fedora 6.5.6-300.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC...

### 🛠️ How to fix it

To resolve this issue and force the system to use the new kernel, follow these steps:

  1. Check your installed kernels by running rpm -q kernel:
kernel-6.5.6-300.fc39.x86_64
kernel-6.10.10-200.fc40.x86_64
kernel-6.10.11-200.fc40.x86_64
  1. Remove the old kernel (Fedora 39 kernel 6.5.6):
sudo dnf remove kernel-6.5.6-300.fc39.x86_64
  1. Install the new Fedora 40 kernel, if not installed:
sudo dnf install kernel
  1. Set the latest kernel as the default:

From the first step, get the latest installed kernel and set it as the default:

sudo grub2-set-default kernel-6.10.11-200.fc40.x86_64
  1. Rebuild the bootloader:

Update the bootloader to recognize the new kernel:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  1. Reboot your system

After rebooting, the system should load with the Fedora 40 kernel:

sudo reboot
  1. Verify the kernel version

After rebooting, confirm that the system is now running the Fedora 40 kernel by checking the version, use uname -r:

6.10.11-200.fc40.x86_64 # Latest Fedora 39 kernel

## 🎉 Conclusion

This should resolve the issue of being stuck on the old kernel version despite the system upgrade.

All posts

kosu.me 🐧 - 2024