Linux EFI boot issues

I have an issue with 2 of my systems that came about pretty much the same way. 1 is my NAS running OMV on Debian and the other is just a small system running Manjaro. They both fail to boot normally and that was brought on by the disks they were installed on failing and me restoring a disk image to another drive. When they came back they have this EFI boot issue.

Now both of these systems I’ve been working around this by using a Manjaro live USB, the boot menu of that live disk has the option “detect EFI bootloader”. Doing that detects the EFI on both systems and I can choose it and boot into them fine, but it’s obviously a hassle. A ways back I tried some manjaro-chroot thing and that was a mess, didn’t work. The bootloader is obviously still there but some reference or mount point is probably broken. Is there a simple way to get these fixed?

I am not sure if I have understood the issue correctly, but regardless, if you can boot via a usb, just make sure that you have the right boot flags, and reinstall or update grub.

If that didn’t work , then be more descriptive about what happens when you try to boot the system on its own, as in, what is the actual text on the screen? :slight_smile:

2 Likes

Please say a little more about the EFI boot issue. How does it fail?

“efibootmgr” is a tool that might be on your live USB; it lets you examine & modify the UEFI boot entries. Running “efibootmgr -v” will write info on all the boot entries to stdout. This will include your USB stick and perhaps other hardware, as well as any remaining entries for OSes on disk drives.

The UEFI boot entries include the UUID for the drive partition where the EFI boot loader is located. I’m not sure whether the UUID would remain the same after restoring a system image. Also, the UEFI may have deleted the boot entries if the info no longer seemed to be valid.

While “efibootmgr -v” is safe and makes no changes, adding UEFI boot entries is a little tricky and has some risk. I suggest you do some research before attempting any changes.

Good luck!

1 Like

Assuming your using grub, since you aren’t very clear in your post with what’s actually going on.

Boot off your majaro live usb, and run lsblk, you should see the drives / partitions available, and try mounting them and seeing whats on them.

Once you’ve found your root FS, you will want to mount that say at /mnt, and if you can identify your EFI partition (usually something like 512mb, has an EFI dir…) mount that to /mnt/efi or something similar in your roof FS mount.

Then manjaro-chroot the /mnt (root) folder.

From there you are just re-installing grub. You can do this with the following command grub-install --target=x86_64-efi --efi=/efi --bootloader-id=GRUB

This should also work in your Debian machine, you’ll just need to use regular chroot.

Note: I haven’t ever used Manjaro, but I assume it’s similar enough to Arch that the above will work.

1 Like

I do: it doesn’t. So the EFI entry needs updating with the new UUID for the new disk/image.

3 Likes

To be clear, the failure was that the BIOS wouldn’t find a bootable EFI, though the boot and ESP flags exist on the original EFI partition.

Not sure why I didn’t realize it earlier but GRUB was just messed up. Reading the replies I’m thinking “why didn’t I just try re-installing GRUB?”

Realistically all I had to do on both systems was:
$ lsblk (find the mount point of the EFI)
$ sudo grub-install --efi-directory=/boot/efi

Thanks for the help.

3 Likes

Thanks for updating with your solution.