Re: grubby --set-default LOLs at me

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

 



Hi

On Sun, 08 Jan 2023 18:46:09 +1100 Stephen Morris wrote:

>  From a google check for the default grub kernel boots it seems that if 
> you add the following two statements into /etc/default/grub and then run 
> grub2-mkconfig grub will use the last selected kernel as the default 
> boot kernel.

> |GRUB_SAVEDEFAULT=true GRUB_DEFAULT=saved|

Right: I do that since the switch to grub2.

In addition I add a script in /etc/kernel/postinst.d/ to force a
grub2-mkconfig at each new kernel install.

---------------------------------------------------------------
#!/bin/bash -p

PATH=/sbin:/bin:/usr/sbin:/usr/bin

# Regenerates grub.cfg in posttrans of a kernel installation.

date=$(date '+%Y-%m-%d_%H%M%S')

grub2conf=/boot/grub2/grub.cfg

cp -pf $grub2conf $grub2conf-$date

grub2-mkconfig -o $grub2conf || {
    # grub2-mkconfig is safe: do not install if it fails.
    echo '*** /sbin/grub2-mkconfig failed. Aborting'
    exit 1
}

# Suppress the current saved_entry: potentially wrong since one
# rebuilds grub.cfg.
grub2-editenv - unset saved_entry
---------------------------------------------------------------

-- 
francis
_______________________________________________
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