Can't install a new kernel after upgrade from FC 40 -> 42

Hello,
After years of perfect upgrades, I encountered a problem while upgrading from fc40 to 42.
It appears that I have been running on the FC37 kernel for a while, even though the entire system was upgraded to 40 ( don’t ask me why ).
In any case,
My attempt to install the latest kernel leads to a problem I can’t solve.
Please help out.

ls /boot | grep vmlinuz
vmlinuz-6.5.12-100.fc37.x86_64
[root@dell5000 ~]# rpm -qa | grep kernel
kernel-modules-core-6.5.12-100.fc37.x86_64
kernel-core-6.5.12-100.fc37.x86_64
kernel-modules-6.5.12-100.fc37.x86_64
kernel-6.5.12-100.fc37.x86_64
kernel-modules-extra-6.5.12-100.fc37.x86_64
kernel-modules-core-6.14.9-300.fc42.x86_64
kernel-core-6.14.9-300.fc42.x86_64
kernel-modules-6.14.9-300.fc42.x86_64
kernel-6.14.9-300.fc42.x86_64
kernel-modules-extra-6.14.9-300.fc42.x86_64
[root@dell5000 ~]# uname -a
Linux dell5000 6.5.12-100.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Nov 20 22:28:44 UTC 2023 x86_64 GNU/Linux

Now removing and reinstalling the latest kernel packages:

dnf remove kernel-modules-core-6.14.9-300.fc42.x86_64 kernel-core-6.14.9-300.fc42.x86_64 kernel-modules-6.14.9-300.fc42.x86_64 kernel-6.14.9-300.fc42.x86_64 kernel-modules-extra-6.14.9-300.fc42.x86_64
Package                                                    Arch          Version                                                     Repository                            Size
Removing:
 kernel                                                    x86_64        6.14.9-300.fc42                                             updates                            0.0   B
 kernel-core                                               x86_64        6.14.9-300.fc42                                             updates                           76.1 MiB
 kernel-modules                                            x86_64        6.14.9-300.fc42                                             updates                           65.2 MiB
 kernel-modules-core                                       x86_64        6.14.9-300.fc42                                             updates                           38.9 MiB
 kernel-modules-extra                                      x86_64        6.14.9-300.fc42                                             updates                            2.6 MiB

Transaction Summary:
 Removing:           5 packages

After this operation, 183 MiB will be freed (install 0 B, remove 183 MiB).
Is this ok [y/N]: y
Running transaction
[1/6] Prepare transaction                                                                                                              100% |   7.0   B/s |   5.0   B |  00m01s
[2/6] Removing kernel-modules-extra-0:6.14.9-300.fc42.x86_64                                                                           100% |  10.0   B/s | 123.0   B |  00m12s
[3/6] Removing kernel-0:6.14.9-300.fc42.x86_64                                                                                         100% |   4.9 KiB/s | 100.0   B |  00m00s
[4/6] Removing kernel-modules-0:6.14.9-300.fc42.x86_64                                                                                 100% | 539.0   B/s |   2.3 KiB |  00m04s
[5/6] Removing kernel-modules-core-0:6.14.9-300.fc42.x86_64                                                                            100% |   9.6 KiB/s |   3.1 KiB |  00m00s
[6/6] Removing kernel-core-0:6.14.9-300.fc42.x86_64                                                                                    100% |  21.0   B/s |  17.0   B |  00m01s
Complete!


[root@dell5000 ~]# dnf update
Updating and loading repositories:
Repositories loaded.
Package                                                    Arch          Version                                                     Repository                            Size
Installing:
 kernel                                                    x86_64        6.14.9-300.fc42                                             updates                            0.0   B
 kernel-core                                               x86_64        6.14.9-300.fc42                                             updates                           76.1 MiB
 kernel-modules                                            x86_64        6.14.9-300.fc42                                             updates                           65.2 MiB
 kernel-modules-core                                       x86_64        6.14.9-300.fc42                                             updates                           38.9 MiB
 kernel-modules-extra                                      x86_64        6.14.9-300.fc42                                             updates                            2.6 MiB

Transaction Summary:
 Installing:         5 packages

Total size of inbound packages is 129 MiB. Need to download 129 MiB.
After this operation, 183 MiB extra will be used (install 183 MiB, remove 0 B).
Is this ok [y/N]: y
[1/5] kernel-0:6.14.9-300.fc42.x86_64                                                                                                  100% | 247.0 KiB/s | 208.2 KiB |  00m01s
[2/5] kernel-core-0:6.14.9-300.fc42.x86_64                                                                                             100% |   2.0 MiB/s |  19.1 MiB |  00m09s
[3/5] kernel-modules-extra-0:6.14.9-300.fc42.x86_64                                                                                    100% |   2.4 MiB/s |   2.9 MiB |  00m01s
[4/5] kernel-modules-core-0:6.14.9-300.fc42.x86_64                                                                                     100% |   2.4 MiB/s |  40.3 MiB |  00m17s
[5/5] kernel-modules-0:6.14.9-300.fc42.x86_64                                                                                          100% |   2.5 MiB/s |  66.9 MiB |  00m27s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[5/5] Total                                                                                                                            100% |   4.7 MiB/s | 129.4 MiB |  00m27s
Running transaction
[1/7] Verify package files                                                                                                             100% |   3.0   B/s |   5.0   B |  00m02s
[2/7] Prepare transaction                                                                                                              100% |   6.0   B/s |   5.0   B |  00m01s
[3/7] Installing kernel-modules-core-0:6.14.9-300.fc42.x86_64                                                                          100% |  18.4 MiB/s |  39.5 MiB |  00m02s
[4/7] Installing kernel-core-0:6.14.9-300.fc42.x86_64                                                                                  100% |  33.0 MiB/s |  28.1 MiB |  00m01s
[5/7] Installing kernel-modules-0:6.14.9-300.fc42.x86_64                                                                               100% |   4.8 MiB/s |  65.6 MiB |  00m14s
[6/7] Installing kernel-0:6.14.9-300.fc42.x86_64                                                                                       100% |   8.1 KiB/s | 124.0   B |  00m00s
[7/7] Installing kernel-modules-extra-0:6.14.9-300.fc42.x86_64                                                    100% [==================] |   0.0   B/s |   2.7 MiB |  00m00s
>>> Running post-transaction scriptlet: kernel-core-0:6.14.9-300.fc42.x86_64                                                                                                   
>>> Non-critical error in post-transaction scriptlet: kernel-core-0:6.14.9-300.fc42.x86_64                                                                                     
>>> Scriptlet output:                                                                                                                                                          
>>> /usr/lib/kernel/install.d/51-dracut-rescue.install: line 91: /boot/efi/loader/entries/97ce362a22da4f40ac8fa6793bfafcf2-0-rescue.conf: No such file or directory            
>>> /usr/lib/kernel/install.d/51-dracut-rescue.install failed with exit status 1.                                                                                              
>>>                                                                                                                                                                            
>>> [RPM] %posttrans(kernel-core-6.14.9-300.fc42.x86_64) scriptlet failed, exit status 1                                                                                       
Complete!

Well indeed, not even the directory exists:

ls -l /boot/efi/loader/entries/
ls: cannot access '/boot/efi/loader/entries/': No such file or directory
[root@dell5000 ~]# ls -l /boot/efi/loader/
ls: cannot access '/boot/efi/loader/': No such file or directory
[root@dell5000 ~]# ls -l /boot/efi/
total 16
drwx------ 11 root root 4096 Jun 15 23:10 97ce362a22da4f40ac8fa6793bfafcf2
drwx------  5 root root 4096 Mar 13 20:00 EFI
-rwx------  1 root root   34 Mar 20 20:00 mach_kernel
drwx------  3 root root 4096 Mar 20 20:00 System

Appreciate your suggestions.

Looks related: F39 kernels fail to install when /boot/efi/$machineid is present

1 Like

to resolve the issue, I followed the steps in the article.