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

Re: Tripple boot Debian 12, Debian 13, openSUSE EFI



Richmond composed on 2025-09-17 18:14 (UTC+0100):

> This is using GPT partition layout and UEFI boot.

> I had Debian 12 and Opensuse dual booting, with Debian 12 having its own
> Grub, and opensuse having its own grub, so I could choose which system
> from the UEFI ? firmware settings on grub.

> Then I installed a new system running Debian 13. During the installation
> it installed grub, but afterwards I could not find Debian 12 anymore. My
> attempts to re-install grub didn't work well and I ended up with only
> Debian 13 booting without any grub menu, or opensuse booting with
> grub. I had to in the end use the usb rescue system to re-install grub
> from the Debian 12 system. Why did this all go so wrong? Why would
> Debian 13 boot without displaying Grub, even though it had a timeout of
> 5 seconds?

How many ESP partitions do you have? All distros I'm aware of that are installed
in UEFI mode require special steps to be taken when more than one installation of
a distro type is done, all share one ESP, and you wish each installation's
bootloader to continue to be able to be used to boot that installation subsequent
to other installations of that distro. IME:

Debian always names its directory /boot/efi/EFI/debian
Fedora always names its directory /boot/efi/EFI/fedora
Mageia always names its directory /boot/efi/EFI/mageia
openSUSE always names its directory /boot/efi/EFI/opensuse
Ubuntu always names its directory /boot/efi/EFI/ubuntu

Get the idea? Each stomps on itself, unless you take a few simple steps in advance
of installing a same name subsequent to avoid that happening, before adding a
second or more installations of a named distro. None of my ESPs currently have
directories containing any of the above listed names.

If Grub2 is the bootloader, then to avoid:

1-assign a unique string value to GRUB_DISTRIBUTOR= in /etc/default/grub, to
either replace an existing value, or to add one where it is blank
2-regenerate the bootloader menu (e.g. grub2-mkconfig -o /boot/grub2/grub.cfg)

What this does is change the applicable name of the directory the distro's
bootloader files go into in /boot/efi/EFI/, so that overwriting does not occur
except by whatever distro put the originals there in the first place.

I learned to do this too long ago to remember what may happen as a result to the
originally assigned /boot/efi/EFI/ directory name, whether it gets left behind as
obsolete, or removed. It shouldn't matter, but I suggest removal if left behind,
lest to provide UEFI firmware an additional opportunity to get confused by a
multiboot environment.

It's fixable in your case in same manner, just a bit more work via rescue boot or
chroot to apply the renaming.

How it works precisely when not using Grub2 I'm not privy to, as all my PCs are
_multiboot_, and I'm not switching any of them to any other bootloader from what
is already installed. Thus, I have no experience that would give me an idea how to
unique-ify /boot/efi/EFI/ directories for the other bootloaders, though I'm sure
the same principle applies with them.
-- 
Evolution as taught in public schools is, like religion,
	based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata


Reply to: