Error: "Failed to open \EFI\BOOT\grubx64.efi..." (Dual-Booting)
Finally managed to solve it.
For the rest, open the terminal
$ sudo bash
$ cd /boot/efi/EFI
$ sudo cp -p ubuntu/grubx64.efi Boot
$ sudo touch ubuntu/grubx64.efi.gbr
After that, I stopped seeing the error message and grub showed up normally (it did before, too, just after seeing that error message for 3s).
You should probably fix the boot loader entry itself instead of copying files around. That'll always break when upstream updates something. Try something like this instead:
efibootmgr --create --label Ubuntu --disk /dev/sda1 --loader "\EFI\ubuntu\grubx64.efi"
Where /dev/sda1
corresponds to /boot/efi
. For the curious, there's more details in this guide.
After a Windows update I could no longer boot into Ubuntu: failed to open /EFI/ubuntu/grubx64.efi
I was able to boot using a Live Ubuntu USB, then:
# find the EFI partition
sudo fdisk -l
# mount EFI
sudo mount /dev/<partition_name> /mnt
cp -p /cdrom/EFI/grubx64.efi /mnt/EFI/ubuntu
I had to reboot and enable Secure Boot and that did the trick. This was dual booting 18.04 on a Lenovo Thinkpad t470 with Windows 10