Recovering the Windows 10 EFI Bootloader while Installing Linux
In this article, we will discuss the process of recovering the Windows 10 EFI bootloader when installing Linux alongside it. This is a common issue that arises when dual-booting two operating systems on the same machine. We will provide a detailed guide on how to resolve this problem, covering the key concepts and steps involved in the process.
Why does this issue occur?
When installing Linux alongside Windows 10, the Linux installation process often overwrites the Windows 10 EFI bootloader, making it impossible to boot into Windows 10. This occurs because both operating systems use the same EFI partition to store their bootloaders. To resolve this issue, you will need to recover the Windows 10 EFI bootloader after installing Linux.
Recovering the Windows 10 EFI Bootloader
To recover the Windows 10 EFI bootloader, you will need to boot into a live Linux environment. This can be done by creating a bootable USB drive with a Linux distribution, such as Ubuntu, and booting from it. Once you have booted into the live Linux environment, you can use the following steps to recover the Windows 10 EFI bootloader:
- Open a terminal window and use the
lsblkcommand to identify the partition where Windows 10 is installed. It will typically be the largest partition and will be formatted as NTFS. - Mount the Windows 10 partition to the
/mntdirectory using the following command:sudo mount /dev/nvme0n1p3 /mntReplace
/dev/nvme0n1p3with the actual partition where Windows 10 is installed. - Use the
lsblkcommand again to identify the EFI partition. It will typically be a small partition formatted as FAT32 and will be located before the Windows 10 partition. - Mount the EFI partition to the
/mnt/boot/efidirectory using the following command:sudo mount /dev/nvme0n1p1 /mnt/boot/efiReplace
/dev/nvme0n1p1with the actual partition where the EFI system partition is located. - Use the
chrootcommand to enter the Windows 10 partition:sudo chroot /mntThis will allow you to run commands as if you were logged in to Windows 10.
- Reinstall the Windows 10 EFI bootloader using the
bootreccommand:bootrec /fixbootThis will reinstall the Windows 10 EFI bootloader to the EFI system partition.
- Exit the chroot environment and unmount the Windows 10 and EFI partitions:
exit sudo umount /mnt/boot/efi sudo umount /mntThis will unmount the partitions and return you to the live Linux environment.
- Reboot the machine and you should now be able to boot into both Linux and Windows 10.
In this article, we have discussed the process of recovering the Windows 10 EFI bootloader when installing Linux alongside it. By following the steps outlined in this guide, you should be able to dual-boot both operating systems without any issues. It is important to note that this process should only be performed by experienced users, as it involves making changes to the system's partitions and bootloader.
References
-
Type: Article
Title: How to Repair the EFI Bootloader on a GPT-Protected PC
Author: Rod Trent
Publication: Windows IT Pro
Date: January 20, 2016
-
Type: Book
Title: Linux Bible, 2020 Edition: Learn Linux in a Month of Lunches
Author: Christopher Negus
Publisher: Wiley
Date: December 10, 2019
-
Type: Online Resource
Title: Dual Boot Windows 10 and Linux
Author: Jack Wallen
Publication: TechRepublic
Date: September 18, 2019