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.
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)
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...
To resolve this issue and force the system to use the new kernel, follow these steps:
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
sudo dnf remove kernel-6.5.6-300.fc39.x86_64
sudo dnf install kernel
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
Update the bootloader to recognize the new kernel:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
After rebooting, the system should load with the Fedora 40 kernel:
sudo reboot
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
This should resolve the issue of being stuck on the old kernel version despite the system upgrade.