Re: grubby --set-default LOLs at me

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Horsley writes:

On Sat, 07 Jan 2023 20:40:18 -0500
Sam Varshavchik wrote:

> But at boot the grub menu still highlights the most recently installed
> kernel, and that's what boots by default.

If you can stand looking through the scripts that are used to build
the grub.cfg (I think they may live in /etc/grub.d) you will find
massively unintelligible scripts implementing impossible to decode
logic to decide all kinds of things, including the default kernel.

--set-default does not update grub.cfg. The default kernel setting is … somewhere.

I distinctly recall there was an entry in /etc/default/grub that specified it. It's not there any more.

It is possible the actual default is determined by grub environment
file setting.

Well, yes. After some random poking:

grub2-editenv list

This shows the default kernel boot that grubby sets.

Except that it has absolutely no effect whatsoever. I see that grubby updates this. But grub, when it boots, completely ignores the default entry that's shown here.

I gave up trying to figure out how to get the scripts to do what
I wanted in an official fashion and just have a script that runs after
dnf to fix any stuff I don't want in the grub.cfg file.

This has all the telltale signs of grub's default boot kernel setting name's getting renamed or changed, but grubby was not updated, accordingly, so it thinks it's setting the default boot kernel, but grub doesn't read it. The environment file, /boot/grub2/grubenv, is just a generic name=value store, that you can toss any random names and values in there, from the looks of it.

While I was typing this out I remembered that the actual bootloader gets installed by grub-install. Perhaps grub and grubby were updated, but grub- install did not ran.

And after a "/sbin/grub-install /dev/sda", the default boot kernel setting, made by grubby, started working. Another Scooby-Doo mystery solved…

Attachment: pgpl2pquFJwYd.pgp
Description: PGP signature

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux