How to multiboot and what's inside /boot/efi

Hi there!

I have two partitions for Linux systems (besides /home, swap and Windows 10’ partititions) using GPT on a big disk with Win10 preinstalled (and shrinked its partition).

I installed Lubuntu on (hd0,5) without problems, and GRUB is in /dev/sda1 (I suppose) because /dev/sda1 is an EFI partition.

My problem is that I can install a second distro on (hd0,6) but cannot boot into it. How do I insert a second distro into my GRUB file?

I do not want to erase my original GRUB because an entry for System Setup is included, and that is important for me.

Once I finish the installation process, and depending on which distro is, GRUB is installed in /dev/sda1 or /dev/sda (as the distro installation process reports). So I thought to edit the GRUB config file in distro 1 (/dev/sda5), but it doesn’t work. In one of my many tries, I corrupted the booting so I had to use boot/repair to fix it.

Here comes my second problem: now I have many files in /boot/efi and I do not know what should I keep and what to dispose. What should be in this directory?

Here is my partition table, just in case:

sda1 | FAT32 EFI SYSTEM_DRV (boot,esp flags)
sda2 | ? msftres
sda3 | NTFS Windows10 msftdata
sda4 | NTFS WINRE_DRV hidden,diag
sda5 | ext4 Lubuntu system
sda6 | ext4 Other Linux
sda7 | ext4 /home
sda8 | swap

Hi LobaLuna,

From first glance I’d say that sda6 contain your other distro installation. What does the

# efibootmgr

Shows from the booted Lubuntu system?

Hi sandmann!

Thanks for your response. Here’s the output:

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2001,0001,0004,0002,2002,2003
Boot0001* ubuntu
Boot0002* ArcoLinux
Boot0004* Windows Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

That ubuntu, I do not know. It appeared there as soon as I installed Lubuntu… (is it Lubuntu itself?)

Please don’t take Arcolinux into account. I tried to install it, then uninstalled it. Then, Solus, then Debian… In fact I still don’t know what will be: Debian or Solus or Manjaro or some other Arch, or whatever.

Is it the same thing no matter what I finally install, isn’t?

And yes, in (hd0,6) or /dev/sda6 is where I would place the second distro. Right now I have a failing Debian system.

Hi LobaLuna,

So if I get it right, you have an MS boot option, a Lubuntu one, and an installed Arch that will not show up in the grub menu to boot into?

Hi sandmann

To be precise, I have a MS boot option, a Lubuntu one, an installed but failing to boot Debian that doesn’t either show in grub menu, and a Setup option to enter into BIOS.

The Arcolinux folder still remains int /boot/efi/EFI. I really don’t understand why the Debian installer didn’t put a debian folder there, and why Arcolinux still sits there despite I overwrote a Debian installation later on…

/boot/efi is a separate partition (hd0,1)

Do you see this a difficult case?

Hi LobaLuna,

I don’t think this is a difficult case, we are still installing some software and editing some configuration files, as always.

Let’s clear the goal: do we want to drop the Arch entry from EFI, or do we want the Arch to appear in the grub menu (hopefully making it bootable)?

Hi sandmann

I already stated what I want in first entry.
I know that you are in good willing, but I feel that you are not taking me seriously.

I want grub to show two Linuxes, MS Win 10 and Setup.
Currently, I have old distros not working: Solus, and ArcoLinux. MS Win 10 is not on the menu. I can only boot into Lubuntu

Right now it is Debian installed but ArcoLinux and Solus shows in grub menu. I will wipe out Debian to install some Arch distro.

Hi LobaLuna,

No offense intended. To add new entries to GRUB, you can follow our dual boot guide. At the end of the guide, you’ll find an example configuration file that adds MS to the grub menu. You can add another distro’s boot option the same way, if you know the partition in is installed on.

To drop items from the menu that aren’t needed anymore, you could search for their configuration files by the name of the menu item. For example, if your grub menu shows an “ArcoLinux” item, you could use grep to find the relevant configuration file:

# grep -Rli “arcolinux” /etc/grub.d/

Remember to run update-grub after any modification, as the guide states.

Thanks, sandmann!

I just erased the offending directories in /boot/efi/EFI and applied #update-grub

Sorry for the above words… It was my five-minutes of despair :smiley:

1 Like

This may sound like blasphemy, but with UEFI, and the ease of booting as many operating system’s as you can stuff into your system. (One of my latest modifications to /boot/EFI, I added a full GRML live boot environment!), I would recommend installing rEFInd, and trying it out… if booting in UEFI mode, and not legacy, you can have multiple bootloaders for the same systems, partitions, etc… I can boot into refind, switch to systemd-boot, over to grub, then boot linux just by selecting my kernel, and root drive