Bug 2277707 - boot loader configuration not updated after system upgrade
Summary: boot loader configuration not updated after system upgrade
Keywords:
Status: CLOSED DUPLICATE of bug 2274356
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 40
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-29 10:56 UTC by Thomas Köller
Modified: 2024-05-10 06:20 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-10 06:20:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Thomas Köller 2024-04-29 10:56:21 UTC
I recently upgraded my system using the 'dnf system-upgrade' command, first from F38 to F39 and then, shortly after, from F39 to F40. After working around bug #2274246, both updates went through without errors. However, I now noticed that the running kernel still was the one from F38:

[root@sarkovy ~]# uname -a
Linux sarkovy 6.8.4-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr  4 20:40:57 UTC 2024 x86_64 GNU/Linux

My system boots via EFI, with the ESP mounted at /boot/efi. Apparently, the kernel has been installed there:

[root@sarkovy ~]# find /boot -name '6.8.7-300.fc40.x86_64'
/boot/efi/45ef22de22ac4adbaf32ef187b2697b8/6.8.7-300.fc40.x86_64

However, the boot loader configuration has not been changed accordingly, and the F40 kernel does not show up in the boot menu.

Reproducible: Didn't try

Comment 1 Marta Lewandowska 2024-04-29 12:55:48 UTC
I have a fresh installation of f40 on a VM, and upgrading to the same kernel you have, installs that kernel in /boot, where I believe it should be (:

I understand that your /boot/loader/entries conf file is looking for the kernel in /boot, and that's why you're not seeing the kernel in the menu, but I think that's because the kernel's being installed in the wrong place, although I don't know why.

$ rpm -qf /usr/lib/kernel/install.d/
systemd-udev-255.4-1.fc40.x86_64
$ rpm -qf /bin/kernel-install
systemd-udev-255.4-1.fc40.x86_64

Maybe systemd folks can help.

Comment 2 Thomas Köller 2024-04-30 08:51:44 UTC
Investigating the issue I tried to reinstall the kernel-core package, I got the following error:

[root@sarkovy ~]# dnf reinstall kernel-core
Last metadata expiration check: 2:26:38 ago on Di 30 Apr 2024 08:19:23 CEST.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                             Architecture                                   Version                                                  Repository                                       Size
===================================================================================================================================================================================================================
Reinstalling:
 kernel-core                                         x86_64                                         6.8.7-300.fc40                                           updates                                          16 M
     replacing  kernel-core.x86_64 6.8.7-300.fc40

Transaction Summary
===================================================================================================================================================================================================================

Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
kernel-core-6.8.7-300.fc40.x86_64.rpm                                                                                                                                               11 MB/s |  16 MB     00:01    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              7.8 MB/s |  16 MB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                           1/1 
  Reinstalling     : kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                         1/3 
  Running scriptlet: kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                         1/3 
  Running scriptlet: kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                         2/3 
rm: cannot remove '/boot/efi/45ef22de22ac4adbaf32ef187b2697b8/6.8.7-300.fc40.x86_64/': Is a directory
/usr/lib/kernel/install.d/50-dracut.install failed with exit status 1.
error: %preun(kernel-core-6.8.7-300.fc40.x86_64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package kernel-core
  Running scriptlet: kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                         3/3 
error: kernel-core-6.8.7-300.fc40.x86_64: erase failed

  Cleanup          : kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                         3/3 
  Running scriptlet: kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                         3/3 

Reinstalled:
  kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                                                
Failed:
  kernel-core-6.8.7-300.fc40.x86_64                                                                                                                                                                                

Error: Transaction failed

Comment 3 Thomas Köller 2024-05-03 08:34:26 UTC
[root@sarkovy ~]# kernel-install inspect
        Machine ID: 45ef22de22ac4adbaf32ef187b2697b8
 Kernel Image Type: pe
            Layout: bls
         Boot Root: /boot/efi
  Entry Token Type: machine-id
       Entry Token: 45ef22de22ac4adbaf32ef187b2697b8
   Entry Directory: /boot/efi/45ef22de22ac4adbaf32ef187b2697b8/6.8.7-300.fc40.x86_64
    Kernel Version: 6.8.7-300.fc40.x86_64
            Kernel: /usr/lib/modules/6.8.7-300.fc40.x86_64/vmlinuz
           Initrds: (unset)                                                         
  Initrd Generator: (unset)                                                         
     UKI Generator: (unset)                                                         
           Plugins: /usr/lib/kernel/install.d/10-devicetree.install
                    /usr/lib/kernel/install.d/20-grub.install
                    /usr/lib/kernel/install.d/50-depmod.install
                    /usr/lib/kernel/install.d/50-dracut.install
                    /usr/lib/kernel/install.d/51-dracut-rescue.install
                    /usr/lib/kernel/install.d/60-kdump.install
                    /usr/lib/kernel/install.d/90-loaderentry.install
                    /usr/lib/kernel/install.d/90-uki-copy.install
                    /usr/lib/kernel/install.d/92-crashkernel.install
                    /usr/lib/kernel/install.d/95-kernel-hooks.install
                    /usr/lib/kernel/install.d/99-grub-mkconfig.install
Plugin Environment: LC_COLLATE=C.UTF-8
                    KERNEL_INSTALL_VERBOSE=0
                    KERNEL_INSTALL_IMAGE_TYPE=pe
                    KERNEL_INSTALL_MACHINE_ID=45ef22de22ac4adbaf32ef187b2697b8
                    KERNEL_INSTALL_ENTRY_TOKEN=45ef22de22ac4adbaf32ef187b2697b8
                    KERNEL_INSTALL_BOOT_ROOT=/boot/efi
                    KERNEL_INSTALL_LAYOUT=bls
                    KERNEL_INSTALL_INITRD_GENERATOR=
                    KERNEL_INSTALL_UKI_GENERATOR=
                    KERNEL_INSTALL_STAGING_AREA=/tmp/kernel-install.staging.XXXXXX
  Plugin Arguments: add|remove
                    6.8.7-300.fc40.x86_64
                    /boot/efi/45ef22de22ac4adbaf32ef187b2697b8/6.8.7-300.fc40.x86_64
                    /usr/lib/modules/6.8.7-300.fc40.x86_64/vmlinuz
                    [INITRD...]

Comment 4 David Tardon 2024-05-10 06:20:49 UTC

*** This bug has been marked as a duplicate of bug 2274356 ***


Note You need to log in before you can comment on or make changes to this bug.