Introduction
If you've accidentally deleted the EFI partition while trying to work with Linux and your Windows system is no longer booting, don't panic! In this guide, we'll walk you through the process of reinstalling the Windows BootLoader.
Prerequisites
Before we begin, ensure the following:
- Your Windows installation media is readily available.
- You have access to a Linux live CD or USB.
Booting into Linux
First, you need to boot into your Linux live environment. Reboot your system and press the key to enter the boot menu (usually F12 or Esc). Select your Linux live media and press Enter.
Checking Disk Partitions
Use a terminal emulator like GNOME Terminal or Konsole to check your disk partitions. Run the following command:
sudo fdisk -l
This command will list all the partitions on your system. Identify the Windows partition (usually named "ntfs" or "ntfsboot") and take note of its device path, for example, /dev/sda1.
Mounting Windows Partition
Now, mount the Windows partition using the following command:
sudo mount /dev/sda1 /mnt
Replace /dev/sda1 with the correct device path for your Windows partition.
Creating EFI System Partition
Create an EFI system partition using the following commands:
sudo mkdir /mnt/boot/efi
sudo mkfs.vfat -F 32 /mnt/boot/efi
Copying Windows BootLoader
Copy the Windows BootLoader files to the newly created EFI system partition:
sudo cp /mnt/windows/Boot/efi/* /mnt/boot/efi/
Rebooting System
Unmount the Windows partition and reboot your system:
sudo umount /mnt
sudo reboot
Conclusion
Congratulations! You've successfully reinstalled the Windows BootLoader. Your system should now boot into Windows as usual.