Manjaro's grubx64.efi is not automatically detected by UEFI

As a question: Manjaro not found after reinstalling SSD or cloning to a new disk

Real use case of what happened: I wanted to use my laptop with two M.2 NVMe slots to migrate from an old SSD to new. Remove the SSD with Manjaro installed from my PC (where all boot entries exist in EFI settings). Put the SSD in my laptop. The laptop’s AMI-based firmware automatically detects Windows’ EFI bootloader, but it doesn’t find Manjaro’s grub.
Result: Manjaro is not at all bootable. Neither on the PC nor on laptop, the laptop didn’t detect it and PC erased the invalid entries after a reboot without the SSD inserted.

Expected: Firmware detects the bootloader automatically, even if all entries are removed with efibootmgr. This works for Debian, Ubuntu, Fedora; but Manjaro is broken and undetected (all tested). This was confirmed by my friend too. Secure Boot is off.

Where do I report this?

Workaround: Manually create a boot entry using efibootmgr. You need the path to Manjaro’s grubx64.efi (mount the boot partition aka ESP). For example when booting from a Live CD:

# mount the boot partition, as root:
mkdir /mnt/my-lost-boot
# My EFI boot partition is on p1
mount /dev/nvme0n1p1 /mnt/my-lost-boot
# Traverse the boot partition and copy the path:
cd /mnt/my-lost-boot/EFI/
realpath manjaro/grubx64.efi | sed -e 's|/|\\|g'

Now that you’ve copied the path (it must have backslashes \), add the grub entry manually:

# My EFI boot partition is on p1
efibootmgr -c -L "My Manjaro Grub Loader" -d /dev/nvme0n1 -l '\EFI\manjaro\grubx64.efi'

Now you will be able to select the Manjaro loader after reboot. If it doesn’t let you, check Hard Drive priorities in UEFI Settings. It should have appeared here.

Since i’m no longer using Manjaro at moment i can’t check myself.

Do you have a \EFI\manjaro\BOOT.CSV file?
If not, that’s the reason why it isn’t added back automatically…

That file has info that is used by the fallback loader to regenerate boot entries…
It is an txt file that needs to be created via iconv: Managing EFI Boot Loaders for Linux: Using fallback.efi

1 Like

You are most likely right, I noticed the .CSV files in other bootloaders, I remember opening Ubuntu’s .CSV file, it’s a single line without a column definition.
I will reinstall later and see if this is it and update the post.

1 Like