On 3/27/25 12:37 AM, Felix Miata wrote:
Robert McBroom composed on 2025-03-27 00:02 (UTC-0400):
Felix Miata wrote:
Simplest: remove Grub from B, or disable Grub on B. Only one Grub per PC is
needed. After each new kernel is installed to B, update Grub on A with os-prober
enabled and with GRUB_DISABLE_SUBMENU="y" in /etc/default/grub. Even that 
frequent
Grub maintenance effort isn't needed if you configure your Grub to boot using
kernel and initrd symlinks instead of specific kernel and symlink versions.
I don't have any dual boot PCs. Mine are all multiboot, 10 or more GNU/Linux
installations per PC on most. Fewest has 4. 2 have more than 40 each.
Could you give an example?
Example of what exactly?

# grep menuentry /boot/grub2/custom.cfg | wc -l
31
# grep -A6 dora /boot/grub2/custom.cfg
menuentry "Fedora 42 defkernel on P22" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt22 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60
         initrd  /boot/initrd
}
--
menuentry "Fedora 41 defkernel 3 on P25" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt25 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd
}
--
menuentry "Fedora 39 defkernel 3 on P15" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt15 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd
}
--
menuentry "Fedora 40 defkernel 3 on P18" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt18 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd
}
--
menuentry "Fedora 42 oldkernel 3 on P22" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt22 --label 
<filter>
         linux   /boot/vmlinuz-old root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3Re:
         initrd  /boot/initrd-old
}
--
menuentry "Fedora 42 test kernel 3 on P22" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt22 --label 
<filter>
         linux   /boot/vmlinuz-tst root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd-tst
}
# fdisk -l /dev/nvme0n1 | grep nux | wc -l
26
# ls -gGh /disks/f39/boot/initrd-*
lrwxrwxrwx 1 36 Dec 30 17:22 /disks/f39/boot/initrd-cur -> 
initramfs-6.11.9-100.fc39.x86_64.img
lrwxrwxrwx 1 37 Oct 30 23:22 /disks/f39/boot/initrd-old -> 
initramfs-6.10.13-100.fc39.x86_64.img
lrwxrwxrwx 1 36 Aug 12  2024 /disks/f39/boot/initrd-old2 -> 
initramfs-6.9.12-100.fc39.x86_64.img
# ls -gGh /etc/grub.d/*cust*
menuentry "Fedora 40 defkernel 3 on P18" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt18 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd
}


-rwxr-xr-x 1 216 Feb 11  2017 /etc/grub.d/07_custom
-rwxr-xr-x 1   0 Aug  9  2018 /etc/grub.d/40_custom
-rwxr-xr-x 1   0 Aug  9  2018 /etc/grub.d/41_custom
#
Because of 07_custom, which is merely a copy of the OEM/upstream 41_custom,
the Grub bootloader displays the stanzas from custom.cfg first in the bootmenuentry 
"Fedora 40 defkernel 3 on P18" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt18 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd
}
--
menuentry "Fedora 40 defkernel 3 on P18" {
         load_video
         set gfxpayload=keep
         search --no-floppy --set=root --hint-baremetal=ahci0,gpt18 --label 
<filter>
         linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
         initrd  /boot/initrd
}


menu presented, followed by those from auto-generated entries in grub.cfg.

40_custom or a copy of it renamed could be used as initial template instead,
to contain the custom stanzas instead of using a custom.cfg file (AIUI).

see also:
<https://forums.opensuse.org/t/how-to-have-a-custom-uefi-grub-menu-for-a-multiboot-system/133541>


There is much hidden. Symlinks don't track to the changes that an update does to /boot

menuentry "Fedora 40 defkernel 3 on P18" {
        load_video
        set gfxpayload=keep
        search --no-floppy --set=root --hint-baremetal=ahci0,gpt18 --label 
<filter>
        linux   /boot/vmlinuz root=LABEL=<filter> noresume audit=0 
ipv6.disable=1 net.ifnames=0 consoleblank=0 preempt=full mitigations=off 
video=1440x900@60 3
        initrd  /boot/initrd
}
--

What activity goes on in <filter>? Something picks up the names on the new 
kernel in an update.
You are naming the partitions by labels in your own scheme which can be 
understood and mapped to your custom.cfg.

Something then has to pick up the /boot/initramfs... of a new upgrade and cycle 
it into the rotation in the storage space of

/disks/f39/boot/...

Can see how all can be done with extensive editing but not easily.




--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to