Re: Tripple boot Debian 12, Debian 13, Opensuse EFI
Felix Miata <mrmazda@earthlink.net> writes:
> Richmond composed on 2025-11-09 20:28 (UTC):
>
>> This problem reared its ugly head again. I decided, using Debian 12,
>> to add in the swap space used by Debian 13 temporarily. After I had
>> finished I recreated the swap space from debian 13 and updated the
>> swap in fstab and resume in /etc/initramfs-tools/conf.d/resume,
>> update-initramfs -u, on Debian 13. But they did not take effect
>> because I was using grub from Debian 12. So I re-installed grub from
>> Debian 13, and the changes took effect, but that meant I was using
>> the wrong grub.
>
>> This is a solution of sorts: to add a 40_custom entry to both
>> systems:
>
>> menuentry "Boot Debian 12 GRUB" { search --set=root --fs-uuid
>> b1edc363-c5a4-4a37-ac23-6fd31ad5d1a8 configfile
>> ($root)/boot/grub/grub.cfg }
>
>> menuentry "Boot Debian 13 GRUB" { search --set=root --fs-uuid
>> 7d5ab11e-e07b-4456-b31c-b13c1e0b7a8d configfile
>> ($root)/boot/grub/grub.cfg }
>
>> This allows either grub to boot the other grub. But it makes me
>> wonder why grub isn't independent of the OS which installed it?
>> Particularly sudo update-initramfs -u won't have any effect if the OS
>> is booted from a different OS's grub.
>
> A running OS doesn't track which bootloader started it.
>
> Examine /etc/default/grub for value of GRUB_DISTRIBUTOR=.
On 12 I have this:
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
On 13 I have this:
#GRUB_DISTRIBUTOR=`( . /etc/os-release && echo ${NAME} )`
GRUB_DISTRIBUTOR=Debian13
>If 12 matches 13, and
> you are UEFI booting, there is a fix.
I am UEFI booting, but they don't match.
> With UEFI, you can mismatch those values to keep them from usurping
> each other. The resulting value there, whether by script or any
> string value you please to within "" place there, e.g. "debian13",
> determines the name of the directory on the ESP partition from which
> they boot, both of which by default use directory debian via script.
At the moment I have this. I think 'debian' should go and leave debian12
and debian13. But debian and debian12 are identical.
/boot/efi/EFI# ls -l
total 24
drwx------ 2 root root 4096 Oct 31 2014 Boot
drwx------ 2 root root 4096 Dec 28 2023 debian
drwx------ 2 root root 4096 Sep 17 18:13 debian12
drwx------ 2 root root 4096 Nov 9 09:13 debian13
drwx------ 3 root root 4096 Jul 6 2014 Dell
drwx------ 4 root root 4096 Oct 31 2014 Microsoft
>You'll still need to use the UEFI BIOS BBS hotkey, or use BIOS setup to
> change the default, or use efibootmgr to change priority prior to
> shutdown or reboot, any time you wish to boot using a different
> bootloader than the last used.
What I don't understand is why grub can't get all the information at
boot time about the OS it is about to boot. It has access to the file
system, so if it is going to boot an 'other' debian, it could pick up
the necessary configurations from the 'other' partition, where it is
more likely to be correct.
I've changed the timeout below from zero to 5 to see if that helps.
efibootmgr
BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0008,0005,0006,0007,0003,2001,0002,2003,2002
Boot0000* UEFI Onboard LAN IPv4
Boot0001* UEFI Onboard LAN IPv6
Boot0002* HDD1-1 (ST1000LM024 HN-M101MBB)
Boot0003* Windows Boot Manager
Boot0004* USB
Boot0005* debian
Boot0006* opensuse-secureboot
Boot0007* debian12
Boot0008* debian13
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
Reply to: