Quote:
Originally Posted by jozmak
My question is: Is there any chance of leaving the already existing bootloader in the boot partition but somehow booting the other distro from it without getting replaced with the fresh disto's bootloader all the time?
|
Hi, the answer is yes.
With BIOS, the system was simpler, but you could only install one bootloader at a time. As we know, the last distro replaced anything in MBR by its own bootloader.
However, with UEFI it is completely different. The hard disk filesystem itself is different and the EFI partition is much much larger than MBR. This was mainly done to accomodate drivers, but the EFI partition can be used to host all your bootloaders. If you have Windows and 2 Linux distros, you can have a bootloader for each one of them on the EFI partition.
Now, how does your computer know what to boot? Simple, every bootloader is in the form of an EFI binary (.efi file) which is registered in the UEFI firmware settings (BIOS basically). That is, somewhere in the BIOS, the computer keeps track of the bootloaders present on the EFI partition and their boot priority, i.e. which one to boot by default.
So, you can have the Windows bootloader (usually Microsoft/Boot/bootmgfw.efi), a GRUB for one distro (e.g. ubuntu/grubx64.efi), another GRUB for a second distro (e.g. Linux/grubx64.efi), or LILO for yet another distro (e.g. Slackware/elilo.efi), and so on ...
The key is to have your EFI binary registered in the UEFI firmware settings. You can check this by using
Code:
# modprobe efivarfs
# modprobe efivars
# efibootmgr -v
It will also give you the order of boot. Normally you can see this list of option at boot if you press one of the Fn keys (e.g. F12, whatever it is on your machine).
On some machines you can change the boot order inside the BIOS itself. But in order to register EFI binaries you need efibootmgr.
If you want more information, I invite you to read the man pages for efibootmgr. You can also check out:
https://docs.slackware.com/howtos:sl...d_on_slackware
This page describes the installation and use of rEFInd, which is a bootloader manager. Yes, you can go as far as installing a program on the EFI partition which will chainload your different bootloaders. I'm not telling you to install refind, I just recommend you read that page to learn a bit about how UEFI works; there are also useful commands in there in case you're multi-booting. It also explains how to register an EFI binary under section "rEFInd Manual Install".