Bug 2084362

Summary: kernel rpms not installing files in /boot
Product: [Fedora] Fedora Reporter: suchandra.spam+fedora
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 36CC: acaringi, adscvr, airlied, alciregi, bskeggs, daniel.mach, hdegoede, hpa, jarodwilson, jforbes, jglisse, jmracek, jonathan, josef, jrohel, kernel-maint, lgoncalv, linville, masami256, mblaha, mchehab, mhatina, packaging-team-maint, pkratoch, ptalbert, rpm-software-management, stanley.king, steved, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-16 16:37:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description suchandra.spam+fedora 2022-05-12 00:07:16 UTC
Description of problem:
Installing kernel-core using dnf doesn't install any of the kernel files in /boot (e.g. config, initramfs, vmlinuz, etc).  However this only occurs if /boot/efi is mounted, if /boot/efi is not mounted, all the files are installed. 


Version-Release number of selected component (if applicable):
ame        : dnf
Version     : 4.12.0
Release     : 1.fc36
Architecture: noarch
Install Date: Tue 10 May 2022 07:34:13 AM HST
Group       : Unspecified
Size        : 2274970
License     : GPLv2+
Signature   : RSA/SHA256, Thu 05 May 2022 11:34:49 AM HST, Key ID 999f7cbf38ab71f4
Source RPM  : dnf-4.12.0-1.fc36.src.rpm
Build Date  : Thu 05 May 2022 11:11:03 AM HST
Build Host  : buildvm-a32-14.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://github.com/rpm-software-management/dnf
Bug URL     : https://bugz.fedoraproject.org/dnf
Summary     : Package manager


How reproducible:
every time

Steps to Reproduce:
1. run dnf install kernel-5.17.5-300.fc36.x86_64  
2. looking at /boot shows the files are not installed
3. 

Actual results:
kernel files are not in /boot

Expected results:
kernel files should be present in /boot


Additional info:
I tried running restorecon /boot and umounting / remounting /boot and /boot/efi without success.  Not sure if this is related but after I updated to fedora 36 from fedora 35, I noticed that my esp partition was out of space.  I tried to remove some unused files without success and ended up creating a new esp partition and using that instead.  

However, that should not have caused this.   Also, rpm -q --verify kernel-core-5.17.5-300.fc36.x86_64 doesn't seem to raise any errors.  Here's a terminal session that shows the issue (note that there is a kernel-5.17.5-200.fc35 there but not the fc36. Also I got the same errors with the kernel-5.17.6-300.fc36 packages):

[root@hepcat ~]# ls /boot
config-5.17.5-200.fc35.x86_64  extlinux                                                 initramfs-5.17.6-300.fc36.x86_64.img  memtest86+-5.31                    System.map-5.17.6-300.fc36.x86_64
config-5.17.6-300.fc36.x86_64  grub2                                                    initrd-plymouth.img                   symvers-5.17.5-200.fc35.x86_64.gz  vmlinuz-0-rescue-68b4bf0ce410450c91ff2899bdfac7d2
efi                            initramfs-0-rescue-68b4bf0ce410450c91ff2899bdfac7d2.img  loader                                symvers-5.17.6-300.fc36.x86_64.gz  vmlinuz-5.17.5-200.fc35.x86_64
elf-memtest86+-5.31            initramfs-5.17.5-200.fc35.x86_64.img                     lost+found                            System.map-5.17.5-200.fc35.x86_64  vmlinuz-5.17.6-300.fc36.x86_64
[root@hepcat ~]# dnf install kernel-5.17.5-300.fc36.x86_64 
Last metadata expiration check: 0:02:36 ago on Wed 11 May 2022 01:57:45 PM HST.
Dependencies resolved.
=====================================================================================================================================================================================================================
 Package                                                Architecture                                   Version                                                  Repository                                      Size
=====================================================================================================================================================================================================================
Installing:
 kernel                                                 x86_64                                         5.17.5-300.fc36                                          fedora                                         163 k
 kernel-core                                            x86_64                                         5.17.5-300.fc36                                          fedora                                          46 M
 kernel-modules                                         x86_64                                         5.17.5-300.fc36                                          fedora                                          53 M

Transaction Summary
=====================================================================================================================================================================================================================
Install  3 Packages

Total download size: 100 M
Installed size: 141 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): kernel-5.17.5-300.fc36.x86_64.rpm                                                                                                                                             357 kB/s | 163 kB     00:00    
(2/3): kernel-core-5.17.5-300.fc36.x86_64.rpm                                                                                                                                        5.4 MB/s |  46 MB     00:08    
(3/3): kernel-modules-5.17.5-300.fc36.x86_64.rpm                                                                                                                                     5.3 MB/s |  53 MB     00:10    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                9.4 MB/s | 100 MB     00:10     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                             1/1 
  Installing       : kernel-core-5.17.5-300.fc36.x86_64                                                                                                                                                          1/3 
  Running scriptlet: kernel-core-5.17.5-300.fc36.x86_64                                                                                                                                                          1/3 
  Installing       : kernel-modules-5.17.5-300.fc36.x86_64                                                                                                                                                       2/3 
  Running scriptlet: kernel-modules-5.17.5-300.fc36.x86_64                                                                                                                                                       2/3 
  Installing       : kernel-5.17.5-300.fc36.x86_64                                                                                                                                                               3/3 
  Running scriptlet: kernel-core-5.17.5-300.fc36.x86_64                                                                                                                                                          3/3 
  Running scriptlet: kernel-modules-5.17.5-300.fc36.x86_64                                                                                                                                                       3/3 
  Running scriptlet: kernel-5.17.5-300.fc36.x86_64                                                                                                                                                               3/3 
  Verifying        : kernel-5.17.5-300.fc36.x86_64                                                                                                                                                               1/3 
  Verifying        : kernel-core-5.17.5-300.fc36.x86_64                                                                                                                                                          2/3 
  Verifying        : kernel-modules-5.17.5-300.fc36.x86_64                                                                                                                                                       3/3 

Installed:
  kernel-5.17.5-300.fc36.x86_64                                     kernel-core-5.17.5-300.fc36.x86_64                                     kernel-modules-5.17.5-300.fc36.x86_64                                    

Complete!
[root@hepcat ~]# ls /boot
config-5.17.5-200.fc35.x86_64  extlinux                                                 initramfs-5.17.6-300.fc36.x86_64.img  memtest86+-5.31                    System.map-5.17.6-300.fc36.x86_64
config-5.17.6-300.fc36.x86_64  grub2                                                    initrd-plymouth.img                   symvers-5.17.5-200.fc35.x86_64.gz  vmlinuz-0-rescue-68b4bf0ce410450c91ff2899bdfac7d2
efi                            initramfs-0-rescue-68b4bf0ce410450c91ff2899bdfac7d2.img  loader                                symvers-5.17.6-300.fc36.x86_64.gz  vmlinuz-5.17.5-200.fc35.x86_64
elf-memtest86+-5.31            initramfs-5.17.5-200.fc35.x86_64.img                     lost+found                            System.map-5.17.5-200.fc35.x86_64  vmlinuz-5.17.6-300.fc36.x86_64
[root@hepcat ~]# rpm -q --verify kernel-core-5.17.5-300.fc36.x86_64
[root@hepcat ~]# rpm -qp --verify kernel-core-5.17.5-300.fc36.x86_64

Comment 1 suchandra.spam+fedora 2022-05-12 00:09:02 UTC
I'd be happy to help track this down since it makes kernel updates a bit of a hassle to do otherwise.

Comment 2 Lukáš Hrázký 2022-05-16 13:29:18 UTC
The files in /boot are installed via scriptlets, reassigning to the kernel team.

Comment 3 Stan King 2022-05-16 15:34:16 UTC
I'm seeing this bug on the older of two EFI-boot systems that I've upgrade to Fedora 36.  Its /boot/efi seems to have a different structure than the system that's a more recent Fedora install.

"rpm -qv --verify kernel-core-5.17.6-300.fc36.x86_64" reports 6 missing files in /boot.

Attempting a re-install of that kernel gets the following message from the last Scriptlet:

  kdump: kernel 5.17.6-300.fc36.x86_64 doesn't exist

Maybe these messages from yesterday's 35-to-36 upgrade will be helpful:

2022-05-15T12:29:14-0400 INFO /usr/lib/kernel/install.d/51-dracut-rescue.install: line 76: /boot/efi/loader/entries/811248d43c61490081be71c7be022d55-0-rescue.conf: No such file or directory
kdump: kernel 5.17.6-300.fc36.x86_64 doesn't exist
warning: %posttrans(kernel-core-5.17.6-300.fc36.x86_64) scriptlet failed, exit status 1

2022-05-15T12:29:14-0400 ERROR Error in POSTTRANS scriptlet in rpm package kernel-core


Let me know if I can gather any more info that might be helpful, including from the system which upgraded without error.

Comment 4 Justin M. Forbes 2022-05-16 16:37:37 UTC

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