Every so often I have to boot Linux into single-user mode. I do this by waiting for the Grub2 menu, selecting the desired kernel, and pressing 'e'. Then I select the 'linux' statement, add '<space>1' to the end of the line, and boot with <Ctrl-X>.
This still works fine, but since upgrading to Fedora 34 I've noticed that the menu overrides I make in this manner are persistent. That is, if I add "1" to the end of the boot parameters for one boot, "1" will remain in effect until I explicitly remove it: press 'e' from the Grub2 menu, remove "<space>1", and press <Ctrl-X>.
This was rather scary when I first discovered this behavior. Booting into single-user mode without asking to do so is ordinarily associated with a serious system issue.
Was this a deliberate change? If so, where is it documented?
I'm not sure I totally like this change. In some situations, it could be handy to add a kernel parameter using the Grub2 menu and have it stick around from one boot to another, but sometimes the old behavior was good for a one-time "failsafe" change that would be reverted just by doing a normal reboot.
Contents of /etc/default/grub:
GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 acpi_enforce_resources=lax" GRUB_DISABLE_RECOVERY="true" GRUB_ENABLE_BLSCFG=true
Thanks, Dave
On Tue, 25 Jan 2022 16:04:57 -0600 Dave Ulrick d-ulrick@comcast.net wrote:
Every so often I have to boot Linux into single-user mode. I do this by waiting for the Grub2 menu, selecting the desired kernel, and pressing 'e'. Then I select the 'linux' statement, add '<space>1' to the end of the line, and boot with <Ctrl-X>.
This still works fine, but since upgrading to Fedora 34 I've noticed that the menu overrides I make in this manner are persistent. That is, if I add "1" to the end of the boot parameters for one boot, "1" will remain in effect until I explicitly remove it: press 'e' from the Grub2 menu, remove "<space>1", and press <Ctrl-X>.
I don't have an answer, but the last time I edited a boot entry, it did not have this behavior, the change was temporary. It sounds like a bug rather than a feature. If it was legitimate, it should also change GRUB_CMDLINELINUX in /etc/default/grub to reflect the change.
I don't recall seeing any discussion of a change like this, but I could have missed it.
On Wed, 26 Jan 2022 12:36:00 -0700 stan via users wrote:
I don't recall seeing any discussion of a change like this, but I could have missed it.
I haven't noticed this one either, but I do find a lot of the "helpful" stuff grub2 desperately tries to do for me annoying, so I have a script that runs at various points (like right after a dnf update which may have erased changes I make) to wack the grub.cfg file with a big hammer and remove all the annoying features.
On Wed, Jan 26, 2022 at 8:50 PM Tom Horsley horsley1953@gmail.com wrote:
I haven't noticed this one either...
I noticed this change. It turns out that
/etc/default/grub - contains default kernel options /boot/grub2/grubenv - has the entry saved_entry=<id> which refers to /boot/loader/entries/<id>.conf which contains kernel options for the entry (which are actually used) which get modified when editing kernel options via grub menu (thus becoming persistent)
Also /etc/default/grub - contains GRUB_ENABLE_BLSCFG=true which is documented at https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault