Fix Dual Boot: Restore Ubuntu GRUB After a Windows Update

You set up Ubuntu and Windows on the same machine. Everything worked. Then Windows pushed an update, and now your system boots straight into Windows. Ubuntu is gone from the menu. Maybe you saw this before it gave up:

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

Your Ubuntu installation is still on the disk. Nothing was deleted. The problem is that Windows overwrote the GRUB bootloader files in the EFI System Partition. This guide shows you how to restore them using a live Ubuntu USB drive.


What Happened and Why

When you boot a modern computer, the firmware reads from a special partition called the EFI System Partition (ESP). This FAT32 partition contains bootloader files for every operating system installed. When you installed Ubuntu, it placed GRUB's files at \EFI\UBUNTU\grubx64.efi inside that partition.

Windows updates sometimes overwrite or reset the default EFI boot entry to point only to the Windows Boot Manager. In some cases, they delete Ubuntu's EFI files entirely. Either way, the result is the same: GRUB is gone from the boot sequence, and Ubuntu never starts.

The fix is to boot from a live Ubuntu USB, mount your existing Ubuntu installation, and reinstall GRUB into the correct location.

This process does not touch your Ubuntu or Windows data partitions. You will not lose files. The only thing you are modifying is the bootloader in the EFI partition.


What You Need

  • A bootable Ubuntu USB drive (the same version or newer than your installed Ubuntu)
  • About 10 to 15 minutes

If you do not have a live USB ready, create one using Balena Etcher or the Ubuntu Startup Disk Creator.


Step 1: Boot into the Live USB

Insert the USB drive and restart your computer. As it powers on, press the boot menu key for your machine. This is usually F12, F10, Esc, or Del, depending on your motherboard manufacturer.

Select your USB drive from the boot menu. When the Ubuntu installer appears, choose Try Ubuntu (not "Install Ubuntu"). This loads a temporary Ubuntu session without touching your disk.


Step 2: Open a Terminal

Once the desktop loads, press Ctrl + Alt + T to open a terminal. All the following commands run here.


Step 3: Find Your Partitions

You need to identify two partitions:

  • Your Ubuntu root partition (the one formatted as ext4 that contains your Ubuntu installation)
  • Your EFI System Partition (a small FAT32 partition, usually 100 to 512 MB)

Run:

sudo fdisk -l

The output lists every disk and partition. Look for something like this:

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    534527    532480   260M EFI System
/dev/nvme0n1p2    534528    796671    262144   128M Microsoft reserved
/dev/nvme0n1p3    796672 209559551 208762880  99.6G Microsoft basic data
/dev/nvme0n1p4 209559552 500117503 290557952 138.6G Linux filesystem

In this example, nvme0n1p1 is the EFI partition and nvme0n1p4 is the Ubuntu root partition. Your partition names will differ. Note them down before continuing.

If you have an older SATA drive instead of NVMe, your partitions will be named like /dev/sda1, /dev/sda2, and so on. The process is identical.


Step 4: Mount the Ubuntu Partition

Create a mount point and mount your Ubuntu root partition:

sudo mkdir -p /mnt/ubuntu
sudo mount /dev/nvme0n1p4 /mnt/ubuntu

Replace /dev/nvme0n1p4 with your actual Ubuntu partition.


Step 5: Mount the EFI Partition

sudo mkdir -p /mnt/ubuntu/boot/efi
sudo mount /dev/nvme0n1p1 /mnt/ubuntu/boot/efi

Replace /dev/nvme0n1p1 with your actual EFI partition.


Step 6: Mount the Required System Directories

GRUB needs access to device nodes, process information, and kernel interfaces during reinstallation. These three bind mounts provide that:

sudo mount --bind /dev  /mnt/ubuntu/dev
sudo mount --bind /proc /mnt/ubuntu/proc
sudo mount --bind /sys  /mnt/ubuntu/sys

Step 7: Enter Your Installed Ubuntu System

chroot switches your active root directory to the mounted Ubuntu installation. After this command, you are running inside your real Ubuntu system, not the live USB:

sudo chroot /mnt/ubuntu

Your terminal prompt will change. Commands you run now affect your installed system, not the live environment.


Step 8: Reinstall GRUB

Run grub-install targeting the disk, not a partition. Then update the GRUB configuration:

grub-install /dev/nvme0n1
update-grub

Replace /dev/nvme0n1 with your actual disk identifier. If you are unsure which one to use, run lsblk and look for the root device that contains your partitions. It will not have a number at the end.

You should see output similar to:

Installing for x86_64-efi platform.
Installation finished. No error reported.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.0-60-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
done

The line confirming Windows Boot Manager was found is important. It means GRUB will include Windows in the boot menu automatically.

If grub-install reports an error about not finding an EFI directory or missing packages, make sure the EFI partition is correctly mounted at /mnt/ubuntu/boot/efi and try again. Do not skip to update-grub alone as that does not reinstall the EFI files.


Step 9: Exit and Unmount

Exit the chroot environment:

exit

Now unmount everything in reverse order:

sudo umount /mnt/ubuntu/dev
sudo umount /mnt/ubuntu/proc
sudo umount /mnt/ubuntu/sys
sudo umount /mnt/ubuntu/boot/efi
sudo umount /mnt/ubuntu

Step 10: Reboot

Remove the USB drive and restart:

sudo reboot

Your system should now show the GRUB menu with both Ubuntu and Windows listed. Select Ubuntu to confirm it boots correctly.


If the Problem Comes Back After the Next Windows Update

Windows has a habit of resetting the EFI boot order after major updates. To reduce the chance of this happening again, you can set GRUB as the default EFI boot entry at the firmware level.

After booting back into Ubuntu normally, run:

sudo efibootmgr -v

This lists all EFI boot entries. Look for the entry labelled ubuntu or GRUB and note its boot number (for example, Boot0003). Then set it as the default:

sudo efibootmgr --bootorder 0003,0001,0000

Put the GRUB entry number first in the list. This tells the firmware to always try GRUB before the Windows Boot Manager, making it harder for Windows updates to take over.

That said, some machines with aggressive firmware will still reset this. If you dual boot regularly, it is worth checking the boot order after every major Windows update.