If you've found that after uninstalling Linux your computer displays messages like "grub rescue" or simply won't boot, don't worry: you'll discover step-by-step how to recover Windows boot without losing your data or having to completely reinstall the system. Let's review the various causes why this problem occurs, commands and utilities that you can use and of course all the Tricks that more experienced users use to solve it.
Why is the Windows bootloader lost when installing Linux?

The most common cause of this problem is installing Linux after Windows on the same computer, either in dual-boot mode or after trying different distributions. When installing Linux, the Windows bootloader (called Windows Boot Manager) by another bootloader, usually GRUB, which takes control of the computer's startup process.
If you then erase or remove Linux without restoring the original boot loader, your computer will attempt to boot from GRUB, which no longer exists, and you will encounter boot errors (such as the dreaded “grub rescue” or messages stating that the boot device does not exist). There may also be cases of corruption of the MBR (Master Boot Record) or the EFI partition on UEFI systems, especially after certain upgrades or disk changes.
Summary of solutions to recover the Windows bootloader
There are several ways to restore the Windows bootloader, depending on whether your system uses a traditional BIOS/MGR or UEFI with an EFI partition, and whether you can still boot Windows or need a bootable disk/USB. They describe everything from using native Windows tools to using third-party utilities.
- Restoring using commands from the Windows installation disc.
- Bootloader recovery with commands such as bootrec, diskpart, and bcdedit.
- Manually removing Linux entries on the EFI partition.
- Options with boot programs and utilities such as EasyBCD, MultiBoot or FixBootFull.
- Recovery from Linux with tools such as Boot Repair or by modifying the GRUB configuration file.
- As a last resort, reinstall Windows.
Option 1: Recover the bootloader from the Windows installation disc

The most universal method for restoring boot is to use a Windows installation USB or DVD. If you don't have one handy, you can download the official ISO image provided by Microsoft and create bootable media (tools like Rufus make this process easier).
Once the disk or USB is prepared:
- Boot the computer from the installation media. Configure the boot order in BIOS/UEFI if necessary.
- Select your language and region and select “Repair your computer.”
- Access the troubleshooting options and select “Symbol of the system".
- Run the commands:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
After completing these steps, restart your computer. If everything went well, the Windows boot loader will be restored and you'll be able to boot normally.
Recovering the bootloader on UEFI systems with an EFI partition
On modern computers with UEFI, booting is managed by the EFI partition, and here the process requires additional steps. If GRUB still appears after removing Linux or you want to clean up Linux remnants from the EFI partition, follow these steps:
- Start Windows or use recovery media.
- Open a command prompt window as administrator.
- Launch Diskpart:
diskpart
- List the disks and select the correct one, checking:
list disk and then sel disk X (X, disk number)
- List the volumes and locate the EFI partition:
list vol and select the EFI with sel vol Y.
Assign a temporary letter to the EFI partition:
assign letter=Z:
Exiting Diskpart and accessing the assigned partition:
exit
cd /d Z:\
Verify that you can view the EFI folder:
dir
Go into the EFI folder and delete the Linux folder (e.g., “ubuntu”):
cd EFI
rmdir /S ubuntu
Finally, remove the letter assigned to the EFI partition from the disk manager to keep the configuration.
Repair Windows from the command line if Windows still starts
If you have normal access to Windows, you can restore the bootloader without any external tools:
- Open Command Prompt as administrator (Win + R and type “cmd”).
- Run the commands:
bootrec.exe /fixmbr
bootrec.exe /fixboot
This procedure is usually sufficient to overwrite the bootloader and reload Windows as the primary bootloader.
Recovery Utilities and LiveCD
There are rescue disks (LiveCD or LiveUSB) that include programs to repair the Windows boot loader without having to boot from the system: Some examples are:
- EasyBCD
- MultiBoot
- FixBootFull
The process involves burning the image to media, booting from it, and using the program to repair the boot loader. Then, restart your computer and Windows should load correctly.
And if you want to keep dual boot, keeping Windows and Linux active
To keep Windows as the primary boot manager but preserve Linux on the computer, it is a good idea to save the Linux boot sector before restoring the Windows loader.
From Linux, run:
dd if=/dev/sda3 of=/linux.boot bs=512 count=1
Then, after restoring the Windows boot, manually add the Linux entry to the Windows boot menu using bcdedit. This way, you can select which system to boot from the Windows manager.
Basic steps include:
- Restore the Windows boot loader.
- Start Windows and open the administrator console.
- Create a new entry for Linux:
bcdedit /create /d "Linux" /application BOOTSECTOR
Then set the partition and path of the Linux boot file:
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path \linux.boot
bcdedit /displayorder {ID} /addlast
bcdedit /timeout 10
This way, you can select at startup whether you want to load Windows or Linux.
What to do if you can't use Windows tools?
Sometimes, neither the recovery USB nor automatic utilities solve the problem. In that case, you can turn to Linux to make the repair easier. Some useful options:
- From Linux, run the registry editor to detect Windows installations and then .
- Use “Boot Repair”, a graphical utility on Ubuntu and derivatives that finds and repairs boot problems and automatically updates entries for Windows and Linux.
For UEFI systems, make sure the Windows Boot Manager entry has not been removed, and if necessary, repair it using tools like Grub Customizer.
Change the default bootloader
If you want Windows to be the default boot manager, run in a console as administrator:
bcdedit /set {bootmgr} path \WINDOWS\system32\winload.efi
This will cause the computer to boot directly into Windows, bypassing GRUB or other managers.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.