Bug 2119907 - [regression] rpm -ivh kernel-core-<version> kernel-modules-<version> doesn't install vmlinuz-<version> to /boot/
Summary: [regression] rpm -ivh kernel-core-<version> kernel-modules-<version> doesn't ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-19 21:47 UTC by Felix Miata
Modified: 2025-02-13 16:35 UTC (History)
24 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
'journalctl -b -3 | grep -B1 -A9 dracut' including an rpm -ivh kernel* installation process (319.05 KB, text/plain)
2022-08-19 21:47 UTC, Felix Miata
no flags Details
journal section from installing kernel 6.6.3 on F39 on host fi965 (273.04 KB, text/plain)
2023-12-01 13:41 UTC, Felix Miata
no flags Details

Description Felix Miata 2022-08-19 21:47:30 UTC
Created attachment 1906604 [details]
'journalctl -b -3 | grep -B1 -A9 dracut' including an rpm -ivh kernel* installation process

Description of problem:
'rpm -ivh kernel-core-<version> kernel-modules-<version>'
doesn't add anything to /boot/ except for initramfs-<version>

Version-Release number of selected component (if applicable):
rpm-4.18.0-0.beta1.4.fc37.x86_64
dracut-057-1.fc37.1.x86_64

How reproducible:
Every time, save once out of 9 PCs.

Steps to Reproduce:
1-include in /etc/dnf/dnf.conf kernel* in its exclude= line
2-fetch a matched kernel core & modules rpm set from a Fedora mirror
3-rpm -ivh kernel-core-<version> kernel-modules-<version>

Actual results:
initramfs for new kernel is the only file found added in /boot/

Expected results:
5 files, including new kernel and initramfs, are found added in /boot/

Additional info:
1-grub2 and grub2-efi* are not installed (or needed, or wanted)
2-announced in https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org/message/UHBTGIK4G3GPK77YWXP3F56OAAK6CTAE/ which was with kernel 5.19.0-0.rc8.20220729git6e2c0490769e.62.fc37.x86_64 but may have begun with an earlier kernel
3-With every rpm kernel installation it has been necessary to copy the appropriate vmlinuz, initially from the rpm, later from the /lib/modules/ tree, and append its version string to the copied filename
4-Reproduced on all except one of ~9 36>37 upgrades on various x64_64 multiboot PCs. Whatever is or was unique among installed, related packages or configuration in the exception I don't know. Primary differences among my installations is the hardware, little among software or hardware independent configuration. There were errors from dracut processing (I believe) in the exception:
...kunit_do_failed_assertion
...__kunit_test_suites_exit
...__kunit_test_suites_init
...kunit_binary_assert_format
5-The attachment may be from my first encounter with this issue.

Comment 1 Ondrej Vasik 2022-09-02 06:46:36 UTC
Definitely wrong component, basesystem is just metapackage with no content - used to install basic package in the right order. I'll try to re-assign to dracut for further re-assignment - as I believe they can reassign it to the right place.

Comment 2 Felix Miata 2022-09-04 19:15:02 UTC
Reproduced on yet another fresh upgrade from F36, host gb970, on which the only grub* installed is grubby-deprecated-8.40-67.fc36.

Comment 3 Felix Miata 2022-11-23 06:19:33 UTC
This problem apparently exists on all my F37 installations, more than a dozen total, even when kernel package is installed along with kernel-core and kernel-modules. Today: host gx780, on legacy/MBR boot system.

Comment 4 Pavel Valena 2022-11-25 11:03:36 UTC
dracut is only responsible for creating initramfs, since that has been triggered and the file is present, let's move this to kernel. Feel free to reassign in case I'm mistaken.

Comment 5 Aoife Moloney 2023-11-23 00:21:22 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Felix Miata 2023-12-01 02:38:52 UTC
It appears this may be avoided by including GRUB_ENABLE_BLSCFG=false in /etc/default/grub in F39, but not in F38.

Comment 7 Felix Miata 2023-12-01 13:41:33 UTC
Created attachment 2002329 [details]
journal section from installing kernel 6.6.3 on F39 on host fi965

Screen I/O from a kernel installation that results in vmlinuz-6.6.3-200.fc39.x86_64 not appearing in /boot/ copied or symlinked from /usr/lib/modules/<version>/vmlinuz on host fi965 moments ago.:
# time rpm -ivh kernel-6.6.3-200.fc39.x86_64.rpm kernel-core-6.6.3-200.fc39.x86_64.rpm kernel-modules-6.6.3-200.fc39.x86_64.rpm kernel-modules-core-6.6.3-200.fc39.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-modules-core-6.6.3-200.fc3################################# [ 25%]
   2:kernel-core-6.6.3-200.fc39       ################################# [ 50%]
   3:kernel-modules-6.6.3-200.fc39    ################################# [ 75%]
   4:kernel-6.6.3-200.fc39            ################################# [100%]
cp: cannot stat '/lib/modules/6.6.3-200.fc39.x86_64/bls.conf': No such file or directory
sed: can't read /boot/loader/entries/11352b14084942c18a21a5586db0b5b3-0-rescue.conf: No such file or directory
/usr/lib/kernel/install.d/51-dracut-rescue.install failed with exit status 2.
warning: %posttrans(kernel-core-6.6.3-200.fc39.x86_64) scriptlet failed, exit status 2

real    1m32.843s
user    1m22.518s
sys     0m11.485s
#

Comment 8 Aoife Moloney 2024-05-07 15:47:45 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Felix Miata 2024-05-11 00:21:31 UTC
I'm still forced to manually create kernel presence in /boot/ in F39 and F40 on all my bootloader-absent (aka all) installations.

Minutes ago on x86_64 host ara88:
# rpm -qa | egrep 'boot|grub'
systemd-bootchart-234-3.fc40.x86_64
efibootmgr-18-6.fc40.x86_64
# time rpm -ivh kernel-6.8.9-300.fc40.x86_64.rpm kernel-core-6.8.9-300.fc40.x86_64.rpm kernel-modules-6.8.9-300.fc40.x86_64.rpm kernel-modules-core-6.8.9-300.fc40.x86_64.rpm
...
# ls -gG /boot/
total 133918
drwx------ 3     2048 Jan 23 19:00 efi
-rw------- 1 45116316 Dec 25 13:14 initramfs-0-rescue-4921feeb9b8e48d6a4b638b4bfa19e1a.img
-rw------- 1 15849936 Feb 13 21:38 initramfs-6.6.14-200.fc39.x86_64.img
-rw------- 1 15937852 Mar 27 19:38 initramfs-6.7.10-200.fc39.x86_64.img
-rw------- 1 16071044 May 10 20:10 initramfs-6.8.9-300.fc40.x86_64.img
lrwxrwxrwx 1       36 Mar 27 19:40 initrd -> initramfs-6.7.10-200.fc39.x86_64.img
lrwxrwxrwx 1       36 Mar 27 19:40 initrd-prv -> initramfs-6.7.10-200.fc39.x86_64.img
lrwxrwxrwx 1       36 Feb 13 21:40 initrd-prv2 -> initramfs-6.6.14-200.fc39.x86_64.img
lrwxrwxrwx 1       55 Sep 26  2020 initrd-rescue -> initramfs-0-rescue-4921feeb9b8e48d6a4b638b4bfa19e1a.img
drwxr-xr-x 3     2048 Jan 20  2020 loader
lrwxrwxrwx 1       46 Feb 13 21:38 symvers-6.6.14-200.fc39.x86_64.xz -> /lib/modules/6.6.14-200.fc39.x86_64/symvers.xz
lrwxrwxrwx 1       46 Mar 27 19:38 symvers-6.7.10-200.fc39.x86_64.xz -> /lib/modules/6.7.10-200.fc39.x86_64/symvers.xz
lrwxrwxrwx 1       45 May 10 20:10 symvers-6.8.9-300.fc40.x86_64.xz -> /lib/modules/6.8.9-300.fc40.x86_64/symvers.xz
-rwxr-xr-x 1 14670952 Dec 25 13:13 vmlinuz-0-rescue-4921feeb9b8e48d6a4b638b4bfa19e1a
-rwxr-xr-x 1 14678120 Jan 25 19:00 vmlinuz-6.6.14-200.fc39
-rwxr-xr-x 1 14794568 Mar 17 20:00 vmlinuz-6.7.10-200.fc39
lrwxrwxrwx 1       23 Mar 27 19:40 vmlinuz-prv -> vmlinuz-6.7.10-200.fc39
lrwxrwxrwx 1       23 Feb 13 21:40 vmlinuz-prv2 -> vmlinuz-6.6.14-200.fc39
lrwxrwxrwx 1       49 Sep 26  2020 vmlinuz-rescue -> vmlinuz-0-rescue-4921feeb9b8e48d6a4b638b4bfa19e1a
#
The reason 6.6.14 and 6.7.10 kernels (and the symlinks for booting) are there is because I put them there myself after prior kernel installations omitted putting any vmlinuz* in /boot/, except sometimes vmlinuz-0-rescue....

Comment 10 Felix Miata 2024-11-29 10:25:55 UTC
File 20-grub-install from package grub2-common copied to /etc/kernel/install.d/ works around this in F40, F41 & Rawhide. Grub* packages should not be necessary on bootloader-free installations. That script, or some relevant portion of it, or something more specific to task of placing traditional kernel-related boot files in /boot/ when kernel is installed, should have  a more appropriately named source and filename.

Comment 11 Pavel Valena 2024-12-01 00:04:53 UTC
Interesting. The upstream has reworked the install.d/ scriplets in the dracut package. The plan / idea in general was to move part (more than it's now) of the functionality to grub's install.d/ scriplets. I guess nobody kept in mind this scenario - but we'll see when this is updated in Fedora as well (currently it's reverted).

This will require further [dracut et al] upstream discussion.

-- Thanks for the information!

Comment 12 Felix Miata 2025-02-13 16:35:33 UTC
Following is a typical kernel installation transaction on multiboot system with no need for installed bootloader on Fedora installation, and with comment #10 workaround employed:
# rpm -qa | grep grub
# rpm -ivh kernel-6.12.13-200.fc41.x86_64.rpm kernel-core-6.12.13-200.fc41.x86_64.rpm kernel-modules-6.12.13-200.fc41.x86_64.rpm kernel-modules-core-6.12.13-200.fc41.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-modules-core-6.12.13-200.f################################# [ 25%]
   2:kernel-core-6.12.13-200.fc41     ################################# [ 50%]
   3:kernel-modules-6.12.13-200.fc41  ################################# [ 75%]
   4:kernel-6.12.13-200.fc41          ################################# [100%]
/etc/kernel/install.d/20-grub.install: line 120: grub2-get-kernel-settings: command not found
/etc/kernel/install.d/20-grub.install: line 132: grub2-probe: command not found
/etc/kernel/install.d/20-grub.install: line 132: grub2-probe: command not found
/etc/kernel/install.d/20-grub.install: line 135: grub2-mkrelpath: command not found
dirname: missing operand
Try 'dirname --help' for more information.
# ls -gGrt /boot/initram* /boot/vmlinuz-6*
-rwxr-xr-x 1 16312680 Dec  4 19:00 /boot/vmlinuz-6.11.11-200.fc40.x86_64
-rw------- 1 19216672 Dec 29 17:12 /boot/initramfs-6.11.11-200.fc40.x86_64.img
-rwxr-xr-x 1 16611688 Feb  7 19:00 /boot/vmlinuz-6.12.13-200.fc41.x86_64
-rw------- 1 19366944 Feb 13 11:13 /boot/initramfs-6.12.13-200.fc41.x86_64.img
#


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