Score:0

Failed to open \EFI\BOOT\grubx64.efi - Not Found (Dual Boot Ubuntu with Windows 10)

us flag

Background

I have a Windows 10 machine with a SSD where I have installed Ubuntu LTS 20.04. This setup worked wonderfully for months. When I turn my machine on I get to choose which operative system to use.

Problem

That is, until yesterday. Yesterday I logged on my Windows boot, did nothing special and then turned the machine off. Windows probably installed some updates after I left.

Today I turned my machine on and realized I couldn't log on to my Ubuntu partition, where all of my work is:

Failed to open \EFI\BOOT\grubx64.efi - Not Found  
Failed to load image \EFI\BOOT\grubx64.efi: Not Found    
start_image() returned Not Found  

Research

I did some searching around but it looks like this problem has a specific solution for each case.

So I installed Boot-repair, and got the following diagnostics link:

https://paste.ubuntu.com/p/TdbRzdmQsZ/

I didn't run the "Recommended Repair" option yet, as this was discouraged in a similar problem in favor of asking advice to the community first:

Error: "Failed to open \EFI\BOOT\grubx64.efi..." (Dual-Booting)

Questions

My Ubuntu partition is where all of my work is. I cannot stress the importance of this dual boot working properly. With this in mind I have the following questions:

  • How can I fix the issue now?
  • How can I prevent it from ever happening again?
oldfred avatar
cn flag
Did you have UEFI Secure Boot on before? Or did Windows updates turn it on? Windows updates often also turn on Windows fast boot preventing grub from booting Windows. With Secure Boot you have to use shimx64.efi to boot not grubx64.efi, but also have to have signed kernels & drivers. You also have old BIOS boot mode boot loader in gpt's protective MBR. Just never turn on CSM/Legacy/BIOS mode nor try to boot in those modes. If you do not have good backups, then you data must not be important. Backups are your saftey net for drive failure, user error, or software issues.
Flame_Phoenix avatar
us flag
Its not the data that is important. It is the setup. The data is mostly in the cloud. Regarding windows, I didn't specifically turn anything on, so I guess the update must have done it ...
Score:1
cc flag

As the error states, you are missing grubx64.efi in the UEFI directory EFI/ubuntu. How that happened is anyone's guess, since a bad install would not have been working for months.

To fix, just copy grubx64.efi to the EFI/ubuntu directory. Your install media should have a copy. from the install media, you can mount the UEFI partition, say at /mnt, so the copy target would look like /mnt/EFI/ubuntu/grub.x64.efi (caps matter, make the target match what is actually there).

Your UEFI partition (ESP) is on nme0n1p1, from the running install media, mount it at /mnt:

sudo mount -tvfat /dev/nvme0n1p1 /mnt

You should now see the location you need to put the grubx64.efi file in /mnt/efi/ubuntu. Take a look with ls, you should have shimx64.efi and grub.cfg there already according to your boot-repair report.

Copy grubx64.efi to that location. The install media should have a copy of grubx64.efi in /EFI/boot/grubx64.efi, so the command is:

sudo cp /EFI/boot/grubx64.efi /mnt/efi/ubuntu 

Unmount the /mnt, remove the install media, and reboot. With grubx64.efi present in the same directory as shimx64.efi, the grub UEFI boot should work.

Flame_Phoenix avatar
us flag
Can you be a little more specific with the commands? The EFI/ubuntu directory does not exist in my USB Ubuntu drive.
Flame_Phoenix avatar
us flag
I can see the target folder as you mentioned, however `/EFI/boot/grub64.efi` does not exist. When I type `ls /EFI/` I get an error `ls: cannot access '/EFI': No such file or directory`. Is there any other place where this file could be?
Flame_Phoenix avatar
us flag
I found a place I think could have the file I am looking for: `sudo cp /cdrom/EFI/BOOT/grubx64.efi /mnt/EFI/ubuntu/`. Copied to the target folder. Wish me luck.
Flame_Phoenix avatar
us flag
I copied the above command and it fixed the error I was having. After that I got yet another error, which was because secure boot was activated. Once I deactivated secure boot in BIOS, everything went _finally_ back to normal.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.