Re: grub2 always defaults to old kernel despite correct configuration

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

 



On Fri, 2019-11-08 at 06:20 +0000, Not Random wrote:
> /etc/default/grub contains:
> GRUB_DEFAULT=saved
> which as you say is the default for Fedora.
> 
> There's no benefit in changing /etc/default/grub as it is already set
> correctly.

I think the problem is that just tells Fedora to use the previously
saved entry as its default, and there's other things (perhaps more than
one) that determine what will actually be the default.

In the old grub (which was easier to follow the instructions) if you
wanted a particular boot entry to be remembered as the default, you had
to add a save default instruction to that boot stanza.  As that stanza
was executed, it set itself as default and booted that kernel.  Any
other entry that didn't have that instruction, wasn't remembered.  I'm
not sure if grub2 behaves that way, too.

There's a boot once option, which means that you make a decision to
boot from some other kernel, without changing the saved default.  You
might boot from a rescue option to fix something, and not want that to
be the default, you'll like your next normal boot to do the usual
kernel.

There's a boot next option, which allows you to set which entry to boot
next time, after doing that the subsequent boot will be the default. 
That can be used for things like making the PC reboot into the UEFI
config mode.  Once you exit the config, it'll reboot and boot up to
your usual kernel.

Doing a bit of googling, /boot/grub2/grubenv file cannot be manually
edited.  Use the following command instead: 

[root@host ~]# grub2-set-default 0
[root@host ~]# grub2-editenv list
saved_entry=0

That 0 should mean the most recently installed kernel.

-- 
 
uname -rsvp
Linux 3.10.0-1062.4.1.el7.x86_64 #1 SMP Fri Oct 18 17:15:30 UTC 2019 x86_64
 
Boilerplate:  All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
 
_______________________________________________
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



[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