Bug 2120476 - all recent BLS snippets have "rhgb quiet rhgb quiet" in them
Summary: all recent BLS snippets have "rhgb quiet rhgb quiet" in them
Keywords:
Status: CLOSED DUPLICATE of bug 2118292
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-23 03:41 UTC by Chris Murphy
Modified: 2022-08-23 14:03 UTC (History)
5 users (show)

Fixed In Version: grub2-2.06-51
Clone Of:
Environment:
Last Closed: 2022-08-23 14:01:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Chris Murphy 2022-08-23 03:41:24 UTC
Description of problem:

Double "rhgb quiet" entries in every f37 snippet since I did a dnf system upgrade

Version-Release number of selected component (if applicable):
grub2-common-2.06-52.fc37.noarch

How reproducible:
So far always

Steps to Reproduce:
1. update the kernel
2.
3.

Actual results:

rhgb quiet rhgb quiet


Expected results:

One set is enough

Additional info:

Suspect. If one set is already in the cmdline, then won't line 22 add another set?
https://src.fedoraproject.org/rpms/grub2/blob/rawhide/f/0276-BLS-create-etc-kernel-cmdline-during-mkconfig.patch

Lines 151-189 in /etc/grub.d/10_linux look like a kludge - I'm not following why we need /etc/kernel/cmdline - this isn't present on new clean installs, or following kernel updates. Yet my laptop has one, and its content is being wrongly favored for new BLS snippets...

The actual root for my system is subvol=root37, that's what the mount command says, that's what /proc/cmdline says, but when I add a new kernel, the BLS snippet has rootflags=subvol=root36 so it boots the wrong root. And the only file that has a reference to root36 on it is /etc/kernel/cmdline...

Comment 1 Chris Murphy 2022-08-23 13:30:24 UTC
# grep -Rn "subvol=root36" /etc
/etc/kernel/cmdline:1:root=UUID=b0cdab05-5632-4170-9610-d6ae158f8ec3 ro rootflags=subvol=root36 rhgb quiet  rhgb quiet

# grub2-editenv list
saved_entry=799c3cd1115b414cbe5c030fc6dc0d16-5.19.3-300.fc37.x86_64
boot_success=1
boot_indeterminate=1

# dnf install kernel-6.0.0-0.rc2.19.fc38.x86_64.rpm kernel-core-6.0.0-0.rc2.19.fc38.x86_64.rpm kernel-modules-6.0.0-0.rc2.19.fc38.x86_64.rpm

# cat 799c3cd1115b414cbe5c030fc6dc0d16-6.0.0-0.rc2.19.fc38.x86_64.conf
title Fedora Linux (6.0.0-0.rc2.19.fc38.x86_64) 37 (Workstation Edition Prerelease)
version 6.0.0-0.rc2.19.fc38.x86_64
linux /boot/vmlinuz-6.0.0-0.rc2.19.fc38.x86_64
initrd /boot/initramfs-6.0.0-0.rc2.19.fc38.x86_64.img
options root=UUID=b0cdab05-5632-4170-9610-d6ae158f8ec3 ro rootflags=subvol=root36 rhgb quiet rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora


/dev/nvme0n1p5 on / type btrfs (rw,noatime,seclabel,ssd,discard=async,space_cache=v2,subvolid=433,subvol=/root37)

If I rename cmdline to cmdline.bak and reinstall this kernel...

# cat 799c3cd1115b414cbe5c030fc6dc0d16-6.0.0-0.rc2.19.fc38.x86_64.conf
title Fedora Linux (6.0.0-0.rc2.19.fc38.x86_64) 37 (Workstation Edition Prerelease)
version 6.0.0-0.rc2.19.fc38.x86_64
linux /boot/vmlinuz-6.0.0-0.rc2.19.fc38.x86_64
initrd /boot/initramfs-6.0.0-0.rc2.19.fc38.x86_64.img
options root=UUID=b0cdab05-5632-4170-9610-d6ae158f8ec3 ro rootflags=subvol=root37 rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora
[root@fovo entries]# 


If I add --rpmverbosity=debug, there's no reference to "cmdline" at all, so I guess this isn't verbose enough to troubleshoot scriptlets.

OK looks like grubby is creating /etc/kernel/cmdline... so somehow things got confused there.

Comment 2 Chris Murphy 2022-08-23 13:59:02 UTC
Once grubby creates /etc/kernel/cmdline, its contents are favored over grub-mkconfig logic which correctly grabs the current subvol=root37 and the single set of "rhgb quiet" from /etc/default/grub GRUB_CMDLINE_LINUX line. 

The issue may be interaction between grubby and Fedora bls additions to /etc/grub.d/10_linux (lines 151-189). If there's a lightweight, that'd be great. I expect what's really needed is a stricter BLS compliant implementation that's upstreamed to GRUB, and then deprecate our legacy grafted on bits.

Comment 3 Robbie Harwood 2022-08-23 14:01:06 UTC
This should have stopped happening with grub2-2.06-51, which stopped adding it to cmdline twice.  (If it's already there, it'll need to be manually deduplicated.)

Comment 4 Robbie Harwood 2022-08-23 14:03:46 UTC

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


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