Hello,
If I have several distributions on a single machine with several disks, should I have a single /boot/efi ?
Thank
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A ===========================================================================
On Wed, 2022-07-27 at 10:54 +0200, Patrick Dupre wrote:
If I have several distributions on a single machine with several disks, should I have a single /boot/efi ?
That is the general idea. It's part of the system bootloader, and different OSs put their bits in there.
You'll find your Linux kernels and their configs directly in: /boot That's where your OS expects to find them.
Deeper inside /boot/efi are the bits for booting it them. On my systems it's peculiarly double-nested (an EFI inside an efi).
/boot/efi/EFI/BOOT/ (efi files) /boot/efi/EFI/centos/ (for booting centos)
And on another PC:
/boot/efi/EFI/fedora/ (for booting fedora) /boot/efi/EFI/System/ (efi files)
There are plenty of other things in some of those directories too, which I'm sure will make multibooting fun, as they all have different ideas about what to shovel in. You'll have extra fun if there's two releases of Fedora installed on your system, as by default they'll just be called Fedora (not Fedora 35 or Fedora 36, for example).
I don't do multibooting any more, and I don't have Windows to see what it would put there.
On Wed, 27 Jul 2022 10:54:51 +0200 Patrick Dupre pdupre@gmx.com wrote:
If I have several distributions on a single machine with several disks, should I have a single /boot/efi ?
It will work as long as none of the installed distributions are duplicated, because that will duplicate the label. e.g. default fedora label is fedora, so if more than one is installed there will be problems, because efi expects to find fedora at /boot/efi/EFI/fedora.
On this list recently, someone said that the default label can be changed to solve this problem. I haven't researched that yet, higher priority items on my TODO list (firewalld failing, unable to boot latest kernel).
The other thing you can do is use systemd-boot, as it allows unlimited booting of distributions, same or otherwise, from the same efi partition, as long as they are booting efi.
Finally, to answer your question, I think that whenever a new disk is installed and partitioned, an efi partition should be created. This is another way to solve the problem of having multiple fedoras installed. Just use a different efi partition, and switch to it using the system BIOS when you want to boot the alternate fedora. Most BIOSs have keys that you can hit to enter the BIOS and set boot priority, on mine F2 or Del. Gives a backup means of booting if a disk should fail, as well.
On Wed, Jul 27, 2022, at 11:20 AM, stan via users wrote:
On Wed, 27 Jul 2022 10:54:51 +0200 Patrick Dupre pdupre@gmx.com wrote:
If I have several distributions on a single machine with several disks, should I have a single /boot/efi ?
It will work as long as none of the installed distributions are duplicated, because that will duplicate the label. e.g. default fedora label is fedora, so if more than one is installed there will be problems, because efi expects to find fedora at /boot/efi/EFI/fedora.
This should still be valid: https://fedoraproject.org/wiki/User:Sumantrom/Draft/dualboot_f33_btrfs
The gist is you can share a single ESP for two Fedoras. Since this location has static configuration it doesn't really matter that the two Fedora's will occasionally step on the bootloaders there, but yeah you could choose to configure the older version to not update shim and grub, thereby only ever using a single newer base shim and grub from the newer Fedora.
I imagine a conflict can arise if these are two Fedora variants of the *same* release. i.e. Workstation and KDE. It's possible an update on one results in removal of kernels referred to by the other. It really depends on how stale one of the variants is allowed to get, e.g. if they're months apart it might not be possible to boot the older variant, since its boot menu entries only refer to old kernels long since removed from /boot. There is a vmlinuz copy in /usr along with that versions modules, so you could get out of this situation with some effort, but you pretty much would want them on approximately the same update cadence to avoid the problem.
Another way you end up with multiple Fedoras with shared ESP and /boot is snapshotting, and significantly branching the snapshots, e.g. install Fedora 34, snapshot it and upgrade the snapshot to 35, snapshot that and upgrade the snapshot to 36, snapshot again and upgrade to Rawhide. Four Fedoras. There's more to it than this, you probably want some naming scheme for the snapshots like root35, root36, root37; you might want to adjust fstab in each, and you'll definitely need to edit the rootflags argument to boot a root for which a boot loader snippet doesn't yet exist (it will if you do a system upgrade because that will install a new kernel for that version, with a bls snippet containing a rootflags entry pointing to the currently active subvolume used as root. Anyway, it's slightly tricky but not endlessly.
On Wed, 27 Jul 2022 12:20:56 -0400 "Chris Murphy" lists@colorremedies.com wrote:
On Wed, Jul 27, 2022, at 11:20 AM, stan via users wrote:
On Wed, 27 Jul 2022 10:54:51 +0200 Patrick Dupre pdupre@gmx.com wrote:
If I have several distributions on a single machine with several disks, should I have a single /boot/efi ?
It will work as long as none of the installed distributions are duplicated, because that will duplicate the label. e.g. default fedora label is fedora, so if more than one is installed there will be problems, because efi expects to find fedora at /boot/efi/EFI/fedora.
This should still be valid: https://fedoraproject.org/wiki/User:Sumantrom/Draft/dualboot_f33_btrfs
Thanks for that link. That looks like a pretty good way to do multiple fedoras. I wonder if it wouldn't be better to have a separate /boot partition, instead of including it in the first install? That way, if the master Fedora becomes obsolete, it is a simple matter to replace the root and reuse the /boot. Separate boot might lead to issues of size if lots of fedoras are installed, though. And because it requires human input and behavior, the process is probably only around 3 sigma, so errors can be expected.