ArchLab + Debian 10 Dual Boot Problem

Hello, forummates :wink:

I installed ArchLabs in a 1TB HDD with no problem. I used cfdisk to create the partitions: sda1 as EFI and sda2 as root. The partitions are the following:
sda1 as boot, sda2 as Archlabs root and sda3 empty for a future installation.
Today I decided to install Debian to have a dual boot system and I fulfilled it flawlessly.
I observed that, despite I have installed Archlabs in a efi mode, the path created was /boot/EFI… and not /boot/efi/EFI/… I executed the
sudo grub-mkconfig -o /boot/EFI/Archlabs/grubx64.efi
command and the output was the expected, but when I rebooted the computer, Debian does not appear in the options.
When I run a sudo ls /boot/EFI, it shows: ArchLabs BOOT Debian
In the Debian, the installation accepted was /boot/efi/EFI… Is that the problem? Is there a way to solve this problem without the need to reinstall them?

Why did you do that? That command over-writes the ArchLabs GRUB .efi loader.

The correct command is

grub-mkconfig -o /boot/grub/grub.cfg


But you need to have the os-prober package installed to pick up Debian.


Well, I ran the sudo grub-mkconfig -o /boot/EFI/Archlabs/grubx64.efi because the installation was in a uefi mode and I think, or better yet, I thought that the grub-mkconfig -o /boot/grub/grub.cfg was for bios mode. Am I wrong? And, you’re right, I forgot about the os-prober.
I will try again.
Thank you.

Yes, you are wrong. Both UEFI and non-UEFI systems use /boot/grub/grub.cfg as the configuration file.

So I gotta search more about that because I have a light impression that I read somewhere that sudo mkconfig -o /boot/grub/grub.cfg would be for bios-boot mode and the sudo grub-mkconfig -o /boot/efi/EFI/DistroName/grubx64.efi for gpt-efi mode.
Please, do NOT missunderstand me, but I have used this command several times in Fedora and also in Debian successfully. However, what I must emphasize is that in ArchLabs installation the path is different: /boot/EFI/ArchLabs/grubx64.efi as in the others, the path generally is: /boot/efi/EFI/DistroName/grubx64.efi
I simply tried to do the same way I did before. but, please, don’t worry about this issue anymore because I decided to remove the Debian partition and maintain only the ArchLabs.

I wanna thank you very much for your help, @Head_on_a_Stick.

I don’t know about Fedora but Debian uses the update-grub wrapper script. From my Debian buster system:

$ cat $(which update-grub)                             
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

The grub-mkconfig command will over-write whichever file the -o option directs it to and grubx64.efi is an EFI loader rather than a configuration file (the clue is in the suffix) so I do think you are very much mistaken here.

I’m not even sure how the system is still booting at this point, grub-mkconfig itself probably has some checks to ensure it doesn’t overwrite the efi stubs.

1 Like

This is due to us offering a multitude of bootloaders and not just grub, most (other than grub) need the EFI/ directory to be in the root directory of the esp, grub doesn’t care and will also look for efi/EFI/.

In the installer I opted for the one with the least work across all the boot loaders we offer, which is /boot.

It’s also worth noting that we also create a generic EFI/BOOT/BOOTX64.EFI for some firmware that won’t boot from other directories, and removable usb devices.


In my opinion, it will also have to make grub manage Debian, or Archlabs, because as soon as it has some kernel updates, it is found in one of the two systems, a kernel panic.