Ubuntu – Cannot boot Failed to open \efi\boot\grubx64.efi – not found

bootgrub2uefi

So I removed and then reinstalled my power supply a few months back on my home server and for some reason it stopped booting to ubuntu and working like it always has been.

I've tried completely reinstalling ubuntu, install on a new hard drive, and most recently boot-repair. Still nothing. Honestly I'm still a novice and learning so some help would be appreciated.

The paste from the boot-repair:

http://paste.ubuntu.com/16581526/

I get a quick message on boot before seeing a flashing underscore and holding shift on boot doesn't bring up any grub options. The message reads:

Failed to set MokListRT: Invalid Parameter
Failed to open \EFI\BOOT\grubx64.efi - Not Found
Failed to load image \EFI\BOOT\grubx64.efi - Not Found
Failed to open \EFI\BOOT\MokManager.efi - Not Found
Failed to load image \EFI\BOOT\MokManager.efi - Not Found

Please help this noob 😀

Best Answer

Some key things I've noticed about your output:

  • You have two EFI System Partitions (ESPs), /dev/sda1 and /dev/sdb1. This is legal, but makes it harder to troubleshoot the computer.
  • Your /dev/sda1 ESP seems to be empty -- or at least, Boot Info Script has not identified any boot files on it. This could be a bug in Boot Info Script (it misses things sometimes), or it could be it was accidentally wiped, has filesystem damage, etc.
  • Your /dev/sdb1 seems to have files that normally reside on a Linux root (/) filesystem and seems to be missing the usual ESP files. This makes me think you accidentally copied those files or something went badly wrong when specifying mount points in the installation process.
  • Your main Ubuntu installation seems to be on /dev/sdb2. This is fine; I'm just pointing it out in case you believed it was somewhere else.
  • Some of your GRUB entries seem to point to an installation on /dev/sda2, but there's no evidence of an Ubuntu installation at that location.

The Failed to... messages you report are from Shim, which is Ubuntu's way of dealing with Secure Boot. They indicate failures to launch various follow-on programs. In your case, they probably indicate a badly broken GRUB installation.

Overall, it's not clear to me how your system got into its current state. At a minimum, its GRUB installation is badly messed up. At worst, critical system files may be mis-placed or missing, which could be very difficult to track down and repair.

I recommend the following actions for repair:

  1. If you have any critical user files on the computer, back them up.
  2. Delete all the partitions on both disks.
  3. Use GParted, parted, gdisk, or some other tool to create new partitions.
    • If you use parted, gdisk, or something else that does not create filesystems, create new filesystems, too. (If you happen to create a new partition with the same start point as the old one, the old filesystem will re-appear, and you do not want that to happen, hence the instruction to create fresh filesystems.)
    • Create one ESP on one disk (probably /dev/sda).
    • There are many ways to use two disks -- you can set up separate partitions for filesystems like /home or /var, use LVM, etc. Decide ahead of time what to do and set it up appropriately.
  4. Re-install Ubuntu on the freshly-partitioned disks. If you used another program to create partitions, you should use the "Something Else" installation/partitioning option and manually specify mount points. See here for the basics of how to use the "Something Else" option. (Note that if you install the server version of Ubuntu, the installer is different, so these details will be different, too.)
  5. If necessary, restore the user data you backed up at the start.

The point of this procedure is to eliminate all the peculiarities with your current setup. It's unclear to me how some of these peculiarities came to be, and they could be signs of even more fundamental problems. Thus, tracking down the true cause(s) and repairing what you've got could be quite time-consuming. Because you mentioned that you've done a fresh install, chances are you won't be throwing away a lot of customizations by doing another re-install, so that's almost certain to be the quicker and easier course of action.

Related Question