Bug 1900829
Summary: | Arguments from running system are used if --args is not specified | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Jan Stodola <jstodola> | |
Component: | grubby | Assignee: | Bootloader engineering team <bootloader-eng-team> | |
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | |
Severity: | medium | Docs Contact: | Jana Heves <jsvarova> | |
Priority: | high | |||
Version: | 8.3 | CC: | jsvarova, kperrier, lmanasko, mlewando, nfrayer, pjanda, rdulhani | |
Target Milestone: | rc | Keywords: | Triaged | |
Target Release: | 8.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | grubby-8.40-48.el8 | Doc Type: | Bug Fix | |
Doc Text: |
.`grubby` now passes arguments to a new kernel correctly
When you add a new kernel using the `grubby` tool and do not specify any arguments, or leave the arguments blank, `grubby` will not pass any arguments to the new kernel and `root` will not be set. Using the `--args` and `--copy-default` options ensures new arguments are appended to the default arguments.
|
Story Points: | --- | |
Clone Of: | ||||
: | 2127453 (view as bug list) | Environment: | ||
Last Closed: | 2023-11-14 15:50:32 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1879091, 1903942, 2127453 |
Description
Jan Stodola
2020-11-23 19:42:01 UTC
And it also doesn't help using an empty string for --args: [root@localhost boot]# grubby --add-kernel=/boot/my_kernel --initrd=/boot/my_initrd --args="" --title=empty_args An entry for kernel my_kernel already exists, adding /boot/loader/entries/2d33c9bc03a345b4990f71804c74e899-my_kernel.4~custom.conf [root@localhost boot]# grubby --info=/boot/my_kernel index=2 kernel="/boot/my_kernel" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet" root="/dev/mapper/rhel-root" initrd="/boot/my_initrd" title="empty_args" id="2d33c9bc03a345b4990f71804c74e899-my_kernel.4~custom" ... From man page of grubby-8.40-42.el8 --args=kernel-args When a new kernel is added, this specifies the command line arguments which should be passed to the kernel by default (note they are merged with the arguments of the default entry if --copy-default is used). When --update-kernel is used, this specifies new arguments to add to the argument list. Multiple, space separated arguments may be used. If an argument already exists the new value replaces the old values. The root= kernel argument gets special handling if the configuration file has special handling for specifying the root filesystem. which leads me in opinion that reporter is right and args shouldn't be copied by default (otherwise the option --copy-default doesn't make any sense) I would also note that when installing a new kernel (yum update| yum install some_new_kernel_package) users expects to have arguments copied to a new kernel. Reproduced with grubby-8.40-47.el8 [root@kvm-06-guest18 ~]# cd /boot/ [root@kvm-06-guest18 boot]# cp vmlinuz-4.18.0-494.el8.x86_64 kernel [root@kvm-06-guest18 boot]# cp initramfs-4.18.0-494.el8.x86_64.img initrd [root@kvm-06-guest18 boot]# grubby --add-kernel=/boot/kernel --initrd=/boot/initrd --title=no_args [root@kvm-06-guest18 boot]# grubby --add-kernel=/boot/kernel --initrd=/boot/initrd --args bla --title=some_args An entry for kernel kernel already exists, adding /boot/loader/entries/1a405ee0007847188d2ec98b45d16ef5-kernel.0~custom.conf [root@kvm-06-guest18 boot]# grubby --info /boot/kernel index=2 kernel="/boot/kernel" args="bla" initrd="/boot/initrd" title="some_args" id="1a405ee0007847188d2ec98b45d16ef5-kernel.0~custom" index=3 kernel="/boot/kernel" args="ro crashkernel=auto resume=/dev/mapper/rhel_kvm--06--guest18-swap rd.lvm.lv=rhel_kvm-06-guest18/root rd.lvm.lv=rhel_kvm-06-guest18/swap console=ttyS0,115200" root="/dev/mapper/rhel_kvm--06--guest18-root" initrd="/boot/initrd" title="no_args" id="1a405ee0007847188d2ec98b45d16ef5-kernel" Verified with grubby-8.40-48.el8 [root@kvm-06-guest18 yum.repos.d]# grubby --add-kernel=/boot/kernel --initrd=/boot/initrd --title=no_args [root@kvm-06-guest18 yum.repos.d]# grubby --add-kernel=/boot/kernel --initrd=/boot/initrd --args bla --title=some_args bla An entry for kernel kernel already exists, adding /boot/loader/entries/1a405ee0007847188d2ec98b45d16ef5-kernel.0~custom.conf [root@kvm-06-guest18 yum.repos.d]# grubby --info /boot/kernel index=2 kernel="/boot/kernel" args="bla" initrd="/boot/initrd" title="some_args" id="1a405ee0007847188d2ec98b45d16ef5-kernel.0~custom" index=3 kernel="/boot/kernel" args="" initrd="/boot/initrd" title="no_args" id="1a405ee0007847188d2ec98b45d16ef5-kernel" What do you think, Honzo? on s390x with grubby-8.40-47.el8: [root@rtt4 ~]# grubby --info /boot/my_kernel index=2 kernel="/boot/my_kernel" args="bla" initrd="/boot/my_initrd" title="some_args" id="1c534e15c4d0431a8442025814218543-my_kernel.0~custom" index=3 kernel="/boot/my_kernel" args="$kernelopts" initrd="/boot/my_initrd" title="no_args" id="1c534e15c4d0431a8442025814218543-my_kernel" on s390x with new grubby-8.40-48.el8: [root@rtt4 ~]# grubby --info /boot/my_kernel index=2 kernel="/boot/my_kernel" args="bla" initrd="/boot/my_initrd" title="some_args" id="1c534e15c4d0431a8442025814218543-my_kernel.0~custom" index=3 kernel="/boot/my_kernel" args="" initrd="/boot/my_initrd" title="no_args" id="1c534e15c4d0431a8442025814218543-my_kernel" It looks great, thanks Marta! Awesome. thank you. Setting Verified: Tested @jsvarova FYI, this is fixed now in RHEL-8 as well (it got fixed in RHEL-9 last release, so you can re-use the same text) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (grubby bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:7141 |