grub seems to now ignore the settings in /etc/default/grub. What is needed to restore the function of setting a specific boot option?
On Tue, Jul 06, 2021 at 10:11:01AM -0400, Robert McBroom via users wrote:
grub seems to now ignore the settings in /etc/default/grub. What is needed to restore the function of setting a specific boot option?
I've noticed that GRUB2 on Fedora uses BootLoaderSpec (see this page: https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault ), however, if you (or an RPM scriptlet) uses the 'grubby' command to change the kernel parameters, in the individual /boot/loader/entries/ files, the 'options $kernelopts' line is replaced with the full kernel options, and they're never updated again even if you change the /etc/default/grub settings. FWIW, the nvidia packages use grubby in an RPM post script, so people who use those often run into this.
It looks like this has been reported: https://bugzilla.redhat.com/show_bug.cgi?id=1651686
I'm not sure if Fedora needs to do a better job documenting this behavior, or if it should just be fixed so people aren't confused by this. Maybe something like "These settings only affect when the system is loaded and changing them won't affect a running system's grub" in the /etc/default/grub file?
On 7/6/21 11:32 AM, Jonathan Billings wrote:
On Tue, Jul 06, 2021 at 10:11:01AM -0400, Robert McBroom via users wrote:
grub seems to now ignore the settings in /etc/default/grub. What is needed to restore the function of setting a specific boot option?
I've noticed that GRUB2 on Fedora uses BootLoaderSpec (see this page: https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault ), however, if you (or an RPM scriptlet) uses the 'grubby' command to change the kernel parameters, in the individual /boot/loader/entries/ files, the 'options $kernelopts' line is replaced with the full kernel options, and they're never updated again even if you change the /etc/default/grub settings. FWIW, the nvidia packages use grubby in an RPM post script, so people who use those often run into this.
It looks like this has been reported: https://bugzilla.redhat.com/show_bug.cgi?id=1651686
I'm not sure if Fedora needs to do a better job documenting this behavior, or if it should just be fixed so people aren't confused by this. Maybe something like "These settings only affect when the system is loaded and changing them won't affect a running system's grub" in the /etc/default/grub file?
I typically have several different OS in stanzas in /etc/grub.d/06_custom. They don't go through
/boot/loader/entries/
GRUB_DEFAULT
in /etc/default/grub would select the system I wanted to use for a session from the menuentry until edited. typically these were CENTOS systems that had the legacy support the codes I use needed. That functionality appears to have been lost.
On Tue, Jul 6, 2021 at 8:11 AM Robert McBroom via users users@lists.fedoraproject.org wrote:
grub seems to now ignore the settings in /etc/default/grub. What is needed to restore the function of setting a specific boot option?
Whatever is in /etc/default/grub will be set in each BLS snippet if you run grub2-mkconfig -o /etc/grub2.cfg
New kernels will get whatever is currently in /proc/cmdline.
If you use grubby with --update-kernel=ALL then all possibilities are modified regardless of Fedora release version (grubenv or BLS snippets or grub.cfg as the case may be).
https://fedoraproject.org/wiki/GRUB_2?rd=Grub2#Changing_kernel_command-line_...
-- Chris Murphy