Officially, dual-booting or multi-booting Endless OS alongside another Linux distribution is Not Supported. This is because there are differences in the way that Endless OS is designed (compared to other Linux distributions) that make it a little tricky to multi-boot, and so far we have not devoted engineering resources to solving this problem (it is not exactly a project that aligns with the key interests of Endless OS Foundation).
However, if you're able to take these technical challenges into your own hands, it is of course possible to make this work. The example below is intended to be informative and adapted to your own needs. Of course, be aware that the result is an unsupported installation and you get to keep the pieces if it breaks.
The main challenge is that booting Endless OS involves more complex logic at the bootloader stage than other Linux distros. Specifically:
root=
parameter pointing to our root filesystem, so that the bootup process knows where to find the main system files as it proceeds.You can figure out any appropriate way to address these points, although the easiest way (as suggested below) is just to ensure that Endless's bootloader gets run as part of the Endless OS bootup process; it will then take care of all the details for you.
Install Fedora first. During installation, create an unused, sufficiently sized partition for Endless OS. No need to format it at this stage.
Boot into your new Fedora installation.
Download the Endless OS disk image that you wish to install. In this example I'm using eos-master-amd64-amd64.210323-233352.base.img.xz
.
Decompress the Endless OS image, e.g. with
$ unxz eos-master-amd64-amd64.210323-233352.base.img.xz
This image includes multiple partitions. Create loop devices for them e.g. using kpartx
.
# kpartx -a eos-master-amd64-amd64.210323-233352.base.img
Mount the first partition from that image, which is Endless OS's EFI System Partition (ESP).
# mkdir endless-boot
# mount /dev/mapper/loop0p1 endless-boot
Copy Endless's EFI bootloaders into Fedora's ESP, which is the one being used to boot your system.
# cp -a endless-boot/EFI/endless /boot/efi/EFI
Copy the Endless root filesystem from the 3rd partition loop device to the partition you set aside in step 1, I'm using the /dev/sda3
target partition in this example.
# dd if=/dev/mapper/loop0p3 of=/dev/sda3 bs=1M
You do not have to worry about resizing the filesystem to fill the remaining space in the partition, that will be done automatically on first boot.
Create a grub snippet to add an Endless OS menu item, which will launch the Endless OS bootloader. This can be done by creating a file at /etc/grub.d/11_endless
with the following contents:
#!/bin/bash
cat <<"EOF"
menuentry 'Endless OS' {
chainloader ($boot)/efi/endless/grubx64.efi
boot
}
EOF
Remember to mark this file executable:
# chmod a+x /etc/grub.d/11_endless
Regenerate Fedora's grub bootloader configuation with the Endless OS item added.
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Clean up
# umount endless-boot
# rmdir endless-boot
# kpartx -d /dev/loop0
Reboot your system. You will now be presented with a boot menu where you can choose between Fedora & Endless OS.
If your system continues to boot straight into Fedora, without showing the grub menu, try running the following command (under Fedora) to configure Fedora's grub bootloader to show the boot menu every time.
# sudo grub2-editenv - unset menu_auto_hide
From what I can see, this should not be necessary, because there is logic to always show the boot menu if extra boot entries were added. However, in my initial testing (Fedora 32?), the menu did continue to hide itself by default, and the above step was necessary. Upon later reinstallation with Fedora 35, the additional step was not necessary.