Bug 2038520 - grub2-mkconfig doesn't update BLS snippets' options line
Summary: grub2-mkconfig doesn't update BLS snippets' options line
Keywords:
Status: CLOSED DUPLICATE of bug 2036199
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
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-01-08 05:21 UTC by Chris Murphy
Modified: 2022-01-09 17:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-09 17:37:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Chris Murphy 2022-01-08 05:21:48 UTC
Description of problem:

grub2-mkconfig leaves BLS snippets untouched

Version-Release number of selected component (if applicable):
grub2-common-2.06-11.fc36.noarch
grub2-efi-ia32-2.06-11.fc36.x86_64
grub2-efi-ia32-cdboot-2.06-11.fc36.x86_64
grub2-efi-x64-2.06-11.fc36.x86_64
grub2-efi-x64-cdboot-2.06-11.fc36.x86_64
grub2-pc-2.06-11.fc36.x86_64
grub2-pc-modules-2.06-11.fc36.noarch
grub2-tools-2.06-11.fc36.x86_64
grub2-tools-efi-2.06-11.fc36.x86_64
grub2-tools-extra-2.06-11.fc36.x86_64
grub2-tools-minimal-2.06-11.fc36.x86_64


How reproducible:
always

Steps to Reproduce:
1. grub2-mkconfig -o /boot/grub2/grub.cfg
2.
3.

Actual results:

/boot/loader/entries/*conf files are left unmodified, the modification date even remains unchanged

Expected results:

The options line should be updated to reflect the current root=UUID and other parameters set in /etc/default/grub


Additional info:

Comment 1 Chris Murphy 2022-01-08 05:29:08 UTC
# ll
total 8
-rw-r--r--. 1 root root 419 Jan  5 17:39 6c03c7693d2a4d31b637aa64c86d1e77-0-rescue.conf
-rw-r--r--. 1 root root 363 Jan  5 17:37 6c03c7693d2a4d31b637aa64c86d1e77-5.16.0-0.rc8.55.fc36.x86_64.conf
# cat 6c03c7693d2a4d31b637aa64c86d1e77-5.16.0-0.rc8.55.fc36.x86_64.conf
title Fedora Linux (5.16.0-0.rc8.55.fc36.x86_64) 36 (Workstation Edition Prerelease)
version 5.16.0-0.rc8.55.fc36.x86_64
linux /vmlinuz-5.16.0-0.rc8.55.fc36.x86_64
initrd /initramfs-5.16.0-0.rc8.55.fc36.x86_64.img
options root=live:CDLABEL=Fedora-WS-Live-rawh-20220104-n-0 rd.live.image quiet rhgb
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora


the options line is malformed due to another bug so i'm expecting grub2-mkconfig will replace this options line with 
root=UUID=cf6276a9-2cb8-4f7e-8b16-13bf44135241 rootflags=subvol=root rhgb quiet

But it remains untouched.

Comment 2 Adam Williamson 2022-01-08 07:26:47 UTC
This kinda looks like https://bugzilla.redhat.com/show_bug.cgi?id=2036199 to me. What are the IDs in /etc/machine-id and /etc/machine-info ?

Comment 3 Chris Murphy 2022-01-08 22:51:12 UTC
$ cat /etc/machine-id 
4f198b1c52784cf8b0035994fa913939
$ cat /etc/machine-info 
KERNEL_INSTALL_MACHINE_ID=6c03c7693d2a4d31b637aa64c86d1e77
$ rm -f /etc/machine-info
$ reboot
$ grub2-mkconfig -o /boot/grub2/grub.cfg

Problem remains.

Comment 4 Chris Murphy 2022-01-08 23:15:56 UTC
Testing two systems lacking /etc/machine-info

grub2-common-2.06-10.fc35.noarch doesn't have this problem
grub2-common-2.06-11.fc36.noarch has this problem

Both fc35 and fc36 have os-prober-1.77-8.fc35.x86_64.

Comment 5 Adam Williamson 2022-01-08 23:51:12 UTC
You have to re-do kernel-install and then grub2-mkconfig after wiping /etc/machine-info. Just re-doing grub2-mkconfig is no good. grub2-mkconfig always looks at /etc/machine-id, it doesn't know about /etc/machine-info. It's kernel-install that's the problem - it's using the value from /etc/machine-info , which does not match the one in /etc/machine-id which grub2-mkconfig expects. So you need to re-run kernel-install after wiping /etc/machine-info; it will then use the value from /etc/machine-id, write it into /etc/machine-info, and create config snippets with that ID in them rather than the other one. You can wipe the files with the other ID in afterwards.

Comment 6 Chris Murphy 2022-01-09 17:37:43 UTC
(In reply to Adam Williamson from comment #5)

Confirm all of that. And the resulting /boot/loader/entries has a new set of conf files containing the /etc/machine-id value instead of /etc/machine-info. The conf files with machine-info's ID were being ignored by grub2-mkconfig by design. So now the convolution makes sense. But this bug is now a dup of 2036199.

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


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