Recover your system by booting from a Linux live USB, mounting the existing root partition, and reinstalling GRUB to the EFI System Partition. This process restores the bootloader configuration that was lost when the Windows partition and its associated boot entries were deleted using Gparted.
Understanding the Boot Failure
When you delete a Windows partition in a dual-boot environment, you often remove more than just the operating system files. In UEFI systems, the /boot/efi directory typically contains bootloaders for both Linux and Windows. Deleting the Windows partition via Gparted may not automatically remove the EFI boot entry, but it leaves the system in an inconsistent state where the bootloader can no longer find valid kernel images or configuration files. The "Boot Device Not Found" error indicates that the firmware cannot locate a valid bootable file on the selected drive.
Why GRUB Disappears
GRUB is responsible for presenting the menu that allows you to choose between operating systems. If the partition containing the /boot/grub directory was corrupted or if the EFI variables pointing to the GRUB executable were cleared during the partition deletion, the system will fail to hand off control to the Linux kernel. Unlike BIOS systems which rely on the Master Boot Record (MBR), UEFI systems use NVRAM variables to store boot paths. Removing partitions does not always clean up these variables, leading to confusion during the POST (Power-On Self-Test) phase.
Preparing the Recovery Environment
To fix this issue, you must access the Linux installation from outside of it. You will need a bootable USB drive created with a Linux distribution such as Ubuntu, Fedora, or Manjaro. Insert the USB drive into your computer and restart. Enter the BIOS/UEFI setup by pressing the appropriate key (often F2, F12, Del, or Esc) and change the boot order to prioritize the USB drive. Save changes and exit to boot into the live environment.
Identifying Your Partitions
Once booted into the live session, open a terminal and identify your disk layout. Use the command lsblk or sudo fdisk -l to list all block devices. Look for your main hard drive (usually sda or nvme0n1) and identify the partition that holds your current Linux root filesystem (often labeled as ext4 or btrfs). Note the device name, for example, sda2. You also need to identify the EFI System Partition, which is usually small (around 100-500 MB) and has the FAT32 file system. It might be named sda1.
Mounting the Root Filesystem
The first step in repairing the bootloader is to mount your actual Linux root partition to a temporary location. Create a mount point if it does not exist:
sudo mkdir /mnt
Then mount your root partition. Replace sda2 with the correct identifier you found earlier:
sudo mount /dev/sda2 /mnt
If you have a separate /boot partition, mount it next:
sudo mount /dev/sda3 /mnt/boot
For UEFI systems, you must mount the EFI partition to ensure GRUB can write to it. Mount the EFI partition to /mnt/boot/efi:
sudo mount /dev/sda1 /mnt/boot/efi
Finally, bind the necessary virtual filesystems so that commands like chroot work correctly:
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
Reinstalling GRUB
Now that your root filesystem is mounted at /mnt, you need to enter it using chroot. This changes the apparent root directory for the current shell, allowing you to run commands as if you were logged into your broken installation.
sudo chroot /mnt
Inside the chroot environment, update your GRUB configuration to detect the new disk layout. Run the following command, replacing /dev/sda with your target disk (not the partition number):
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
This command writes the GRUB EFI binary to the EFI System Partition and registers it in the UEFI NVRAM. If successful, you should see a message indicating that the installation was complete. Next, regenerate the GRUB configuration file to ensure it lists the correct kernels and initramfs files:
update-grub
Exit the chroot environment by typing exit. Unmount the filesystems in reverse order to avoid errors:
sudo umount /mnt/boot/efi
sudo umount /mnt/boot
sudo umount /mnt
Remove the USB drive and reboot your computer. The system should now present the GRUB menu or boot directly into Linux.
Verifying the Fix
After rebooting, verify that the system boots correctly. If you still encounter issues, check the UEFI boot order again to ensure the Linux bootloader is listed before any other devices. You may also want to clean up residual Windows boot entries in the UEFI settings if they cause conflicts.
Frequently Asked Questions
What if I don't know my EFI partition number?
You can identify the EFI partition by looking for a FAT32 partition that is roughly 100-500 MB in size. Using sudo blkid will show the UUID and type of each partition; look for TYPE="vfat" and UUID=... which corresponds to the EFI system.
Can I fix this without a live USB?
No, because the system cannot boot to perform repairs. You must use external media such as a live USB or a recovery disc to access the filesystem and reinstall the bootloader components.
Will reinstalling GRUB delete my data?
No, reinstalling GRUB only modifies the bootloader files in the EFI partition and the /boot/grub directory. It does not touch your home directories or personal data stored in the root partition.
How do I remove the old Windows boot entry from UEFI?
You can use the efibootmgr command inside the chroot or live environment to list and delete specific boot entries. For example, efibootmgr -b XXXX -B removes the entry with index XXXX, provided you have identified the correct one.
What if my system uses BIOS instead of UEFI?
If you are using legacy BIOS, the process is simpler. Skip the EFI mount steps and run grub-install /dev/sda followed by update-grub. This installs the bootloader to the MBR of the disk.