FC37 to FC39 upgrade fails. FC39 kernel not in boot menu. Boots into FC37

I have upgraded using DNF over many versions and on many computers. This is the first major fail on an upgrade. Following the DNF procedure to upgrade, all went well and all FC39 packages installed. On the first reboot after the post install process, there was no FC39 kernel in the boot menu.

The FC39 rpm is installed and I even tried a dnf reinstall to see if it would add it to the grub menu. No success. grubby doesn’t show FC39.

My only issue that showed up was necessary space for kicad on the upgrade.

How do I get the FC39 kernel into the grub menu?

Can you show the contents of the file /etc/default/grub .

No problem.

cat /etc/default/grub
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-2e0ad798-4e73-4b78-a902-7e8d02cf124e nomodeset rhgb quiet video=vesa:off rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
GRUB_DISABLE_RECOVERY="true"

GRUB_ENABLE_BLSCFG=true

A search show that there is a kernel for FC39 on the system

./usr/lib/modules/6.5.11-300.fc39.x86_64/vmlinuz

This machine has been upgraded recently from FC33 to FC35 to FC37. All worked as expected and I was using yesterday with FC37.

I followed the procedure for upgrading using dnf which I have done over the years on multiple machines.

Fedora system upgade using dnf

I don’t know if it will help but in the /boot directory, there is a symlink to

lrwxrwxrwx. 1 root root 46 Nov 11 19:24 symvers-6.5.11-300.fc39.x86_64.xz → /lib/modules/6.5.11-300.fc39.x86_64/symvers.xz

I also found this
-rwx------. 1 root root 35973272 Nov 11 19:24 /boot/efi/1a7fd46e52044d0b903f101cf47a634d/6.5.11-300.fc39.x86_64/initrd

So, it looks like something just didn’t complete the installation of the kernel.

Bingo!

The existence of the directory /boot/efi/1a7fd46e52044d0b903f101cf47a634d triggers the update to generate systemd-boot configuration. In previous version it did not always do that.

You should remove that directory and its contens, and re-run the kernel-install.

The exact command to do that you can find by running

rpm -q --scripts kernel-core | grep add

Example

/bin/kernel-install add 6.5.9-300.fc39.x86_64 /lib/modules/6.5.9-300.fc39.x86_64/vmlinuz || exit $?
/bin/kernel-install add 6.5.10-300.fc39.x86_64 /lib/modules/6.5.10-300.fc39.x86_64/vmlinuz || exit $?
/bin/kernel-install add 6.5.11-300.fc39.x86_64 /lib/modules/6.5.11-300.fc39.x86_64/vmlinuz || exit $?

Re-installing the latest kernel-core package would do the same thing except downloading it again from the repository.

Followed the command and ran
sudo /bin/kernel-install add 6.5.11-300.fc39.x86_64 /lib/modules/6.5.11-300.fc39.x86_64/vmlinuz || exit $?

Now grubby shows
kernel=“/boot/vmlinuz-6.5.11-300.fc39.x86_64”

Will have to wait until tomorrow to test if it works on reboot as I did the above remotely.

I thank you for your help.

That directory had pointers to very old kernels as well so it has been there for years.

Probably, the ls -l command would have shown how old it was.

Yes, the ls -l command showed that they were from when the computer was first built. I think they were FC25 or FC26 which were also a clue. :slight_smile:

I booted and it is working. Now to configure the computer as I was waiting for FC39. My son was using this computer until he got his laptop for University. He was using Windows for gaming so Linux was not run on it until a month or so ago when I started the upgrade process, 2 versions at a time.

Just to add to this. A computer I am about to upgrade to FC39, has one of these directories with 29 sub directories with various kernels. Something to check before doing the upgrade.

My guess is that you have been bitten by this bug F39 kernels fail to install when /boot/efi/$machineid is present and 2248624 – kernel-core not installed properly after dnf system-upgrade from f37 to f39