"Failed to open \EFI\UBUNTU\grubx64.efi - Not Found"

Hi, everyone :slight_smile:

Well, it seems that I'm going to have a "fun" day today (Sunday, 4th May 2025): a five-year old ASUS ROG laptop - that I have set up for a long time as dual boot with Windows 11 Home 24H2 + Ubuntu MATE 24.04.2 LTS ("Noble Numbat") - is not booting into GRUB (GRand Unified Bootloader) and, because of that, I can't select to boot it into Ubuntu MATE. It's complaining that the "grubx64.efi" file is missing ("Not Found") - a file which I believe is located in the ESP (EFI System Partition). Yesterday, everything was working fine, without any issues.

After the error messages below, the computer is booting directly (and without any issues) to Windows 11 Home 24H2 :

Text transcription of the error messages from the screenshot above, for easier searching / reference:

Failed to open \EFI\UBUNTU\grubx64.efi - Not Found 
Failed to load image ??: Not Found 
start_image() returned Not Found, falling back to default loader 
Failed to open \EFI\UBUNTU\grubx64.efi - Not Found 
Failed to load image ??: Not Found 
start_image() returned Not Found 

I think I'm going to (try to) boot now from an Ubuntu MATE 24.04.2 USB pen drive / flash drive, to see if I can access the data on disk (an internal M.2 SSD drive) from the Ubuntu MATE 24.04 partitions to do a fresh backup of my personal files to an external hard drive. After doing that, I will then try to repair the EFI / GRUB issues (using the pen drive of Ubuntu MATE 24.04.2 or some other utility like "Boot Repair" / "Boot Repair Disk" - https://sourceforge.net/p/boot-repair-cd/

Wish me luck! :slight_smile: Any comments are always welcome and I will also try to keep this topic updated.

3 Likes

Hi, Ricardo :slightly_smiling_face:

I wish you all the luck! :+1:

2 Likes

Thanks for the good luck wishes, @Bombilla :slight_smile:

So, first conclusions: I successfully booted from my Ubuntu MATE 24.04.2 LTS USB pen drive / flash drive. As far as I can tell, the internal SSD is in good shape and the problem is that the "grubx64.efi" is indeed missing in the "ubuntu" directory of the ESP (EFI System Partition):

root@ubuntu-mate:~# mkdir -pv /mnt/boot/efi
mkdir: created directory '/mnt/boot'
mkdir: created directory '/mnt/boot/efi'

root@ubuntu-mate:/mnt# mount /dev/nvme0n1p1 /mnt/boot/efi
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.

root@ubuntu-mate:~# ls -l /mnt/boot/efi/EFI/ubuntu/
total 1796
-rwxr-xr-x 1 root root    108 May  2 21:25 BOOTX64.CSV
-rwxr-xr-x 1 root root    112 May  2 21:25 grub.cfg
-rwxr-xr-x 1 root root 856280 May  2 21:25 mmx64.efi
-rwxr-xr-x 1 root root 966664 May  2 21:25 shimx64.efi

I'm now wondering if this some kind of strange side effect of the automatic (unattended) removal of the (supposedly) old versions of "linux-tools", "linux-modules", "linux-modules-extra", and "linux-image" that happened yesterday (3rd May 2025) after the weekly installation of the newer versions of those packages that happened the day before (2nd May 2025):

root@ubuntu-mate:/mnt# cat /mnt/var/log/apt/history.log

(...)

Start-Date: 2025-05-02  22:24:27
Commandline: aptdaemon role='role-commit-packages' sender=':1.168'
Install: linux-modules-6.8.0-59-generic:amd64 (6.8.0-59.61, automatic), linux-image-6.8.0-59-generic:amd64 (6.8.0-59.61, automatic), linux-headers-6.8.0-59-generic:amd64 (6.8.0-59.61, automatic), linux-tools-6.8.0-59:amd64 (6.8.0-59.61, automatic), linux-tools-6.8.0-59-generic:amd64 (6.8.0-59.61, automatic), linux-headers-6.8.0-59:amd64 (6.8.0-59.61, automatic), linux-modules-extra-6.8.0-59-generic:amd64 (6.8.0-59.61, automatic)
Upgrade: netplan-generator:amd64 (1.1.1-1~ubuntu24.04.1, 1.1.2-2~ubuntu24.04.1), linux-tools-common:amd64 (6.8.0-58.60, 6.8.0-59.61), linux-headers-generic:amd64 (6.8.0-58.60, 6.8.0-59.61), google-chrome-stable:amd64 (135.0.7049.114-1, 136.0.7103.59-1), gnome-control-center-faces:amd64 (1:46.5-0ubuntu0.24.04.1, 1:46.7-0ubuntu0.24.04.1), python3-netplan:amd64 (1.1.1-1~ubuntu24.04.1, 1.1.2-2~ubuntu24.04.1), libfwupd2:amd64 (1.9.28-0ubuntu1~24.04.1, 1.9.29-0ubuntu1~24.04.1ubuntu1), apparmor:amd64 (4.0.1really4.0.1-0ubuntu0.24.04.3, 4.0.1really4.0.1-0ubuntu0.24.04.4), libapparmor1:amd64 (4.0.1really4.0.1-0ubuntu0.24.04.3, 4.0.1really4.0.1-0ubuntu0.24.04.4), libapparmor1:i386 (4.0.1really4.0.1-0ubuntu0.24.04.3, 4.0.1really4.0.1-0ubuntu0.24.04.4), linux-generic:amd64 (6.8.0-58.60, 6.8.0-59.61), ubuntu-pro-client-l10n:amd64 (34~24.04, 35.1ubuntu0~24.04), cloud-init:amd64 (24.4.1-0ubuntu0~24.04.2, 24.4.1-0ubuntu0~24.04.3), grub-efi-amd64-signed:amd64 (1.202.2+2.12-1ubuntu7.1, 1.202.5+2.12-1ubuntu7.3), xserver-xorg-input-libinput:amd64 (1.4.0-1build1, 1.4.0-1ubuntu24.04.1), linux-image-generic:amd64 (6.8.0-58.60, 6.8.0-59.61), distro-info-data:amd64 (0.60ubuntu0.2, 0.60ubuntu0.3), grub-efi-amd64-bin:amd64 (2.12-1ubuntu7.1, 2.12-1ubuntu7.3), libsdl2-2.0-0:amd64 (2.30.0+dfsg-1build3, 2.30.0+dfsg-1ubuntu3.1), libsdl2-2.0-0:i386 (2.30.0+dfsg-1build3, 2.30.0+dfsg-1ubuntu3.1), netplan.io:amd64 (1.1.1-1~ubuntu24.04.1, 1.1.2-2~ubuntu24.04.1), libnetplan1:amd64 (1.1.1-1~ubuntu24.04.1, 1.1.2-2~ubuntu24.04.1), microsoft-edge-stable:amd64 (135.0.3179.98-1, 136.0.3240.50-1), fwupd:amd64 (1.9.28-0ubuntu1~24.04.1, 1.9.29-0ubuntu1~24.04.1ubuntu1), linux-libc-dev:amd64 (6.8.0-58.60, 6.8.0-59.61), ubuntu-pro-client:amd64 (34~24.04, 35.1ubuntu0~24.04)
End-Date: 2025-05-02  22:25:13

(...)

Start-Date: 2025-05-03  14:13:13
Commandline: /usr/bin/unattended-upgrade
Remove: linux-modules-6.8.0-57-generic:amd64 (6.8.0-57.59), linux-image-6.8.0-57-generic:amd64 (6.8.0-57.59), linux-modules-extra-6.8.0-57-generic:amd64 (6.8.0-57.59)
End-Date: 2025-05-03  14:13:18

Start-Date: 2025-05-03  14:13:20
Commandline: /usr/bin/unattended-upgrade
Remove: linux-headers-6.8.0-57-generic:amd64 (6.8.0-57.59)
End-Date: 2025-05-03  14:13:21

Start-Date: 2025-05-03  14:13:22
Commandline: /usr/bin/unattended-upgrade
Remove: linux-tools-6.8.0-57:amd64 (6.8.0-57.59), linux-tools-6.8.0-57-generic:amd64 (6.8.0-57.59)
End-Date: 2025-05-03  14:13:23

Start-Date: 2025-05-03  14:13:25
Commandline: /usr/bin/unattended-upgrade
Remove: linux-headers-6.8.0-57:amd64 (6.8.0-57.59)
2 Likes

As root

cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/BOOT/grubx64.efi

the grubx64.efi should be in the BOOT dir

2 Likes

Hi, @pavlos_kairis :slight_smile:

You wrote:

Thanks for the help :slight_smile: As far as I can tell, I now only have a "grubx64.efi" in another location (specifically in the /mnt/usr/lib/grub/x86_64-efi/monolithic/ directory):

root@ubuntu-mate:/mnt# ls -l /mnt/boot/efi/EFI/
total 12
drwxr-xr-x 2 root root 4096 Dec  5  2022 Boot
drwxr-xr-x 4 root root 4096 Jan 13 15:39 Microsoft
drwxr-xr-x 2 root root 4096 Dec  5  2022 ubuntu

root@ubuntu-mate:/mnt# ls -l /mnt/boot/efi/EFI/ubuntu/
total 1796
-rwxr-xr-x 1 root root    108 May  2 21:25 BOOTX64.CSV
-rwxr-xr-x 1 root root    112 May  2 21:25 grub.cfg
-rwxr-xr-x 1 root root 856280 May  2 21:25 mmx64.efi
-rwxr-xr-x 1 root root 966664 May  2 21:25 shimx64.efi

root@ubuntu-mate:/mnt# ls -l /mnt/boot/efi/EFI/Boot/
total 1876
-rwxr-xr-x 1 root root 966664 May  2 21:25 bootx64.efi
-rwxr-xr-x 1 root root  88344 May  2 21:25 fbx64.efi
-rwxr-xr-x 1 root root 856280 May  2 21:25 mmx64.efi

root@ubuntu-mate:/mnt# find /mnt -iname 'grubx64.efi'
/mnt/usr/lib/grub/x86_64-efi/monolithic/grubx64.efi

root@ubuntu-mate:/mnt# ls -lh /mnt/usr/lib/grub/x86_64-efi/monolithic/grubx64.efi
-rw-r--r-- 1 root root 2.6M Mar 17 13:20 /mnt/usr/lib/grub/x86_64-efi/monolithic/grubx64.efi

1 Like

-rwx------ 1 root root 2598792 Aug 26 2024 grubx64.efi*

the actual size of the file (omit the -h flag)

2 Likes

Sure, @pavlos_kairis :slight_smile: Here is the actual size of that grubx64.efifile:

root@ubuntu-mate:/mnt# ls -l /mnt/usr/lib/grub/x86_64-efi/monolithic/grubx64.efi
-rw-r--r-- 1 root root 2658304 Mar 17 13:20 /mnt/usr/lib/grub/x86_64-efi/monolithic/grubx64.efi

Thanks again for the help!

2 Likes

By the way, in ANOTHER Windows 11 + Ubuntu MATE 24.04.2 LTS ("Noble Numbat") dual-boot laptop computer that I have (and that is still working properly), the content of those EFI directories is the following:

ricmarques@goodpc:~$ ls -l /boot/efi/EFI/ubuntu/
total 4378
-rwxr-xr-x 1 root root     108 fev 14 22:52 BOOTX64.CSV
-rwxr-xr-x 1 root root     112 fev 14 22:52 grub.cfg
-rwxr-xr-x 1 root root 2656136 fev 14 22:52 grubx64.efi
-rwxr-xr-x 1 root root  856280 fev 14 22:52 mmx64.efi
-rwxr-xr-x 1 root root  966664 fev 14 22:52 shimx64.efi
 
ricmarques@goodpc:~$ ls -l /boot/efi/EFI/boot/
total 1869
-rwxr-xr-x 1 root root 966664 fev 14 22:52 bootx64.efi
-rwxr-xr-x 1 root root  88344 fev 14 22:52 fbx64.efi
-rwxr-xr-x 1 root root 856280 fev 14 22:52 mmx64.efi
1 Like

I've read that Windows 10/11 installations sometimes corrupt the GRUB and so it's (for me, anyway) advisable to have a GRUB repair disk handy. I have Rescatux and Super GRUB 2 on a bootable thumb drive for exactly this purpose. It's come in handy several times!

3 Likes

Thanks @OldStrummer and @pavlos_kairis :slight_smile: I ended up solving this missing GRUB issue, by doing the following:

  1. Booting from an Ubuntu MATE 24.04.2 LTS ("Noble Numbat") USB Flash Drive / Pen Drive

  2. Running the following commands in a "MATE Terminal" window of the Ubuntu MATE LIVE system (obviously these commands have to be changed accordingly to the disk partition layout of each system):

ubuntu-mate@ubuntu-mate:/$ sudo mkdir -pv /mnt/boot/efi
ubuntu-mate@ubuntu-mate:/$ sudo mkdir -pv /mnt/home
ubuntu-mate@ubuntu-mate:/$ sudo mount /dev/nvme0n1p5 /mnt/boot
ubuntu-mate@ubuntu-mate:/$ sudo mount /dev/nvme0n1p1 /mnt/boot/efi
ubuntu-mate@ubuntu-mate:/$ sudo mount /dev/nvme0n1p7 /mnt
ubuntu-mate@ubuntu-mate:/$ sudo mount /dev/nvme0n1p8 /mnt/home
ubuntu-mate@ubuntu-mate:/$ sudo mount --bind /dev /mnt/dev
ubuntu-mate@ubuntu-mate:/$ sudo mount --bind /proc /mnt/proc
ubuntu-mate@ubuntu-mate:/$ sudo mount --bind /sys /mnt/sys
ubuntu-mate@ubuntu-mate:/$ sudo chroot /mnt

root@ubuntu-mate:/# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported.

root@ubuntu-mate:/# mount -t efivarfs none /sys/firmware/efi/efivars

root@ubuntu-mate:/# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
Installing for x86_64-efi platform.
Installation finished. No error reported.

Exit, reboot and - as the French say - et voilà ! :slight_smile: GRUB and dual-boot to Windows 11 and Ubuntu MATE 24.04 working correctly again!

For reference, here is the content of my /boot/efi/EFI/ubuntu directory after having done this procedure:

ricmarques@mypc:~$ sudo ls -l /boot/efi/EFI/ubuntu
total 4396
-rwx------ 1 root root     108 mai  4 18:00 BOOTX64.CSV
-rwx------ 1 root root     112 mai  4 18:00 grub.cfg
-rwx------ 1 root root 2660232 mai  4 18:00 grubx64.efi
-rwx------ 1 root root  856280 mai  4 18:00 mmx64.efi
-rwx------ 1 root root  966664 mai  4 18:00 shimx64.efi
6 Likes

Nice work! Congratulations on a successful recovery!

2 Likes

Thanks for walking us through the problem, and especially the way you solved it !

2 Likes