How to restore the original Windows bootloader after installing Linux or another operating system

Last update: 10/07/2025
Author Isaac
  • Identify the type of manager Boot and system partitioning is key to choosing the right solution
  • There are manual and automatic methods to restore the bootloader of Windows after installing or removing Linux
  • Keep a USB Updated recovery can greatly simplify boot repair

windows boot manager Restoring the original Windows bootloader after installing another operating system, such as Linux, is one of the most common situations faced by those who have tried dual booting or removed a Linux distribution from their computer. Although at first it may seem like a problem with no clear solution, there are several methods and tools to recover the native Windows boot loader and restart your system without any headaches.

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?

bootloader

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.

  How to remove pre-installed apps on Android TV easily

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

bootloader windows menu

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:

  1. Boot the computer from the installation media. Configure the boot order in BIOS/UEFI if necessary.
  2. Select your language and region and select “Repair your computer.”
  3. Access the troubleshooting options and select “Symbol of the system".
  4. 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:

  1. Start Windows or use recovery media.
  2. Open a command prompt window as administrator.
  3. Launch Diskpart:
  Modify the language of The Sims 4 [VERY SIMPLE SOLUTIONS]

diskpart

  1. List the disks and select the correct one, checking:

list disk and then sel disk X (X, disk number)

  1. 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:

  1. Open Command Prompt as administrator (Win + R and type “cmd”).
  2. 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:

  1. Restore the Windows boot loader.
  2. Start Windows and open the administrator console.
  3. Create a new entry for Linux:
  How to view all open documents in Windows step by step

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.

Related article:
What is the best way to restore Windows Vista from a backup?