2

I am trying to dual boot Arch and Ubuntu linux and seem to have somehow ended up with two grub menus, the second of which shows up when I type exit at the grub prompt . Even stranger still is the grub menu that shows up in the first instance is does have a boot entry for Arch linux but it attempts to find the uuid on /dev/sde that does not exist on my system. The Ubuntu entry boots fine.

Dunno why but I find grub to be one of the more confusing aspects of linux.

After installing archlinux I ran

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArchLinux --recheck

Added flags for Th3 and then ran, grub-mkconfig -o /boot/grub/grub.cfg

How do I go about fixing this, and why did I end up with a strange configuration?

I think all of the other pertinent info is below, but if I missed anything please let me know.

Output of tree:

/boot/efi/ |-- EFI | |-- ArchLinux | | `-- grubx64.efi | |-- BOOT | | |-- BOOTX64.EFI | | |-- fbx64.efi | | `-- mmx64.efi | `-- ubuntu | |-- BOOTX64.CSV | |-- grub.cfg | |-- grubx64.efi | |-- mmx64.efi | `-- shimx64.efi `-- System\ Volume\ Information |-- AadRecoveryPasswordDelete `-- ClientRecoveryPasswordRotation 

My boot media layout [Ubuntu**] added by me.

lsblk /dev/nvme0n1 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS nvme0n1 259:0 0 476.9G 0 disk |-nvme0n1p1 259:1 0 487M 0 part /boot/efi |-nvme0n1p2 259:2 0 274.4G 0 part [Ubuntu**] |-nvme0n1p3 259:3 0 122.1G 0 part [SWAP] `-nvme0n1p4 259:4 0 80G 0 part / 

First grub menu presented at boot First Menu

Arch linux entry doesn't work Bad Arch Entry

Exit first grub instance Exit First Menu

Second grub menu instance?! Second Grub Menu

2 Answers 2

1

The first GRUB menu is from Ubuntu's GRUB, and it's GRUB version 2.04. Since shimx64.efi is installed in Ubuntu's ESP directory, Ubuntu's grubx64.efi is probably the completely self-contained version, as Secure Boot does not allow GRUB to load modules (since GRUB modules use the ELF binary format, not the PE32+ which is understood by the Secure Boot firmware and so can be signature-checked by it).

Perhaps your Arch installation uses a filesystem type that is not understood by GRUB 2.04, but Arch's own GRUB (version 2.06) can read it. In that case, it might be best to use Arch's GRUB as the primary one, and create a custom boot entry that makes it read Ubuntu's grub.cfg and so it would display Ubuntu's GRUB menu. You could then use that menu entry to boot Ubuntu, and whenever Ubuntu gets a kernel update, it could update its grub.cfg as usual, even if the rest of Ubuntu's GRUB is actually not being used at all.

Run efibootmgr -v: you should see you have a boot entry for Ubuntu and another for Arch. With efibootmgr -o you should be able to rearrange the boot order to make Arch's GRUB the first one to try. Just see the existing BootOrder setting in the efibootmgr -v output, and shift the numbers around to the desired order.

(I've found that it's best to not change the total number of boot options listed in the BootOrder with efibootmgr, in case you have a quirky UEFI firmware implementation.)

1
  • Hint : Ubuntu GRUB → Select "Advanced options for Arch...." → and then select "Arch.... -fallback initramfs...." ______ That's what I do in one of the "multi boot Ubuntu GRUB" with many different OS choices. Commented Dec 12, 2021 at 18:18
1

It's because grub is un-necessary to use when most efi bios can boot a Linux kernel using efistub. Efistub just boots the Linux kernel directly.

https://wiki.archlinux.org/title/EFISTUB

You can keep using grub too, but as you've discovered, each grub is only good at booting it's specific os (Ubuntu or arch) without further debugging to get one of the grubs to properly find the kernel paths and settings for both..

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.