How To Remove GRUB Bootloader And Restore The Windows Boot Manager

How To Remove GRUB Bootloader And Restore The Windows Boot Manager

How To Remove A Broken Grub Screw at Gemma Dalton blog

To remove the GRUB bootloader successfully, you must overwrite the Master Boot Record or the EFI System Partition with the native Windows Boot Manager using recovery tools. This process involves deleting Linux partitions, reconfiguring boot priorities via the command-line interface, and ensuring the EFI configuration recognizes the primary operating system as the sole boot entry.

Essential Pre-Removal Inventory and System Safeguards

Before modifying the boot configuration of any workstation, you must understand the underlying firmware architecture. Modern systems typically utilize Unified Extensible Firmware Interface (UEFI) paired with GUID Partition Tables (GPT), while legacy hardware relies on BIOS and the Master Boot Record (MBR). Removing GRUB without a structured plan often results in a "GRUB Rescue" prompt, effectively locking you out of all operating systems.

The following checklist identifies the specialized assets and metrics required to ensure a 100% success rate during the transition back to a single-boot environment:



  • Primary Hardware/Software Assets: A Windows Installation Media (USB or DVD) created via the official Media Creation Tool, a minimum of 8GB of external storage for the recovery environment, and a secondary device to reference technical documentation if the primary machine becomes temporarily unbootable.
  • Mandatory Technical Prerequisites: Knowledge of your system's BIOS/UEFI access key (typically F2, F12, or Delete), administrative privileges on the Windows partition, and a secure backup of all data residing on the Linux partitions being decommissioned.
  • Standard Performance Benchmarks: The procedure typically requires 20 to 45 minutes of active configuration. Success is measured by a direct hand-off from the system firmware to the Windows kernel without any intermediate bootloader prompts.
  • Encryption Awareness: If your Windows drive is encrypted with BitLocker, you must have the 48-digit recovery key readily available. Modifying boot records will trigger a security challenge upon the next restart.

Comprehensive Workflow for Purging GRUB and Reclaiming Boot Control

The process of removing GRUB is bifurcated based on your system’s firmware type. Attempting an MBR fix on a UEFI system, or vice versa, will result in an "Access Denied" or "Command Not Found" error. Follow these steps sequentially to ensure a clean transition.



Step 1: Identifying the Partition Table and Firmware Mode

You must determine if your system is running in Legacy or UEFI mode. Log into Windows and press the Windows Key and R simultaneously. Type msinfo32 and press Enter. Locate the "BIOS Mode" entry. If it states "UEFI," you will be modifying the EFI System Partition. If it states "Legacy," you will be overwriting the Master Boot Record.



Step 2: Deleting the Linux Partitions

Open the Disk Management utility by right-clicking the Start button and selecting Disk Management. Locate the partitions associated with your Linux installation. These usually do not have a drive letter and are marked as "Healthy (Primary Partition)" but do not show a file system like NTFS or FAT32. Right-click each Linux partition and select Delete Volume.

Warning: This action is irreversible. All data on the Linux partition will be destroyed instantly. Ensure your backups are verified before proceeding.

Once deleted, these partitions will appear as "Unallocated Space." You can right-click your existing Windows C: drive and select Extend Volume to reclaim this space, or leave it for a future installation.



Step 3: Accessing the Windows Recovery Environment

Insert your Windows Installation Media and restart your computer. Enter the Boot Menu (F12 or F8 on most systems) and select the USB drive. When the Windows Setup screen appears, select your language and keyboard layout, then click Next. Instead of clicking "Install Now," look for the small text in the bottom left corner that says Repair your computer.

Navigate through Troubleshoot and then Advanced Options. From this menu, select Command Prompt. This opens a high-privilege terminal outside of the operating system environment, which is necessary for rewriting the boot sectors.



Step 4: Restoring the Bootloader (Legacy BIOS/MBR)

If your system is in Legacy BIOS mode, you need to rewrite the MBR. In the command prompt, execute the following commands in order, pressing Enter after each:



  1. Type bootrec /fixmbr and press Enter. This writes a Windows-compatible MBR to the system partition.
  2. Type bootrec /fixboot and press Enter. This writes a new boot sector to the system partition.
  3. Type bootrec /rebuildbcd and press Enter. This scans all disks for Windows installations and adds them to the boot configuration data.

If the fixboot command returns an "Access is denied" error, you may need to use the bootsect /nt60 sys command to force the update on the boot code.



Step 5: Removing the GRUB Directory (UEFI/GPT)

For modern UEFI systems, simply fixing the MBR is insufficient because the GRUB files reside in a hidden directory on the EFI System Partition (ESP). In the Command Prompt, follow these steps to manually delete the Linux boot files:



  1. Type diskpart and press Enter to start the Disk Partitioning utility.
  2. Type list disk to see all physical drives.
  3. Type select disk 0 (replace 0 with the number of your primary boot drive).
  4. Type list volume to locate the EFI partition. This is usually a small partition (100MB to 500MB) formatted as FAT32.
  5. Type select volume X (replace X with the volume number of the EFI partition).
  6. Type assign letter=Z: to give the hidden partition a drive letter so you can browse it.
  7. Type exit to leave Diskpart.

Now, navigate to the EFI partition by typing Z: and pressing Enter. Type cd EFI to enter the EFI directory. Type dir to see the folders inside. You will see a folder named after your Linux distribution (e.g., "ubuntu", "fedora", or "debian"). Type rd /s ubuntu (replacing "ubuntu" with your specific folder name) and type Y to confirm the deletion. This removes the GRUB executable from the firmware boot path.

Pro-Tip: Removing the folder ensures that even if the BIOS tries to find the Linux bootloader, the files are physically gone, forcing the system to failover to the next available entry: the Windows Boot Manager.



Step 6: Finalizing Boot Priorities

Close the Command Prompt and select Turn off your PC. Remove the USB installation media. Power on the machine and immediately enter your BIOS/UEFI settings. Navigate to the Boot or Boot Priority tab. Ensure that "Windows Boot Manager" is at the very top of the list. Save and Exit (usually F10). The system should now boot directly into Windows without any trace of the GRUB menu.


Modify grub menu to select default and remove timeout - Fedora Discussion

Modify grub menu to select default and remove timeout - Fedora Discussion

Boot Configuration and Partitioning Comparison Matrix

The following table outlines the technical variations between the two primary boot standards and how they impact the GRUB removal process.



Technical Parameter Legacy BIOS (MBR) Modern UEFI (GPT)
Boot File Location Sector 0 of the Physical Disk EFI System Partition (ESP) / FAT32
Max Partition Limit 4 Primary Partitions 128 Partitions (Standard)
Recovery Utility Bootrec.exe / Fixmbr BCDEdit.exe & Diskpart
File System Support Hardware-dependent FAT32 (Standard for Boot)
Primary Risk Factor Overwriting the Partition Table Deleting the Windows EFI Folder
Boot Signature 512-byte Sector GUID (Globally Unique Identifier)

Common Boot Failures and Post-Removal Resolution

Even with a structured approach, hardware variations or firmware security settings can interfere with the restoration of the Windows Boot Manager. Address these common failure scenarios using the specific remedies provided below.



  • Failure Scenario: "GRUB Rescue: No Such Partition" Error Upon Restart



    • Root Cause: The Linux partitions were deleted from within Windows, but the Master Boot Record still contains a pointer to the now-nonexistent GRUB files.
    • Actionable Fix: Boot from the Windows Recovery Media, open the Command Prompt, and execute the bootrec /fixmbr command to replace the pointer with the standard Windows MBR instructions.
  • Failure Scenario: Windows Boot Manager Not Visible in BIOS Boot List



    • Root Cause: The NVRAM (Non-Volatile RAM) entry for Windows was corrupted or deleted during the Linux installation/uninstallation process.
    • Actionable Fix: Use the command bcdboot C:\Windows in the recovery terminal. This command recreates the boot configuration files and registers the Windows Boot Manager with the UEFI firmware.
  • Failure Scenario: Access Denied When Running Fixboot



    • Root Cause: The partition structure is locked or the system is using a GPT scheme where the standard fixboot command is deprecated.
    • Actionable Fix: Use the diskpart utility to ensure the EFI partition is active, then run bootsect /nt60 ALL /force /mbr to refresh the boot code across all accessible volumes.
  • Failure Scenario: BitLocker Recovery Screen Loop



    • Root Cause: The Trusted Platform Module (TPM) detected a change in the boot configuration (the removal of GRUB) and is preventing access to the encrypted drive to protect data.
    • Actionable Fix: Enter your 48-digit recovery key. Once inside Windows, open the Command Prompt as Administrator and run manage-bde -protectors -disable C: followed by manage-bde -protectors -enable C: to "re-seal" the TPM with the new boot configuration.

Frequently Asked Questions



Can I remove GRUB without using a Windows USB or DVD?

Yes, it is possible by using the EasyBCD software or the msconfig utility within Windows if the system is still bootable. However, if you have already deleted the Linux partition and are stuck at the GRUB prompt, a physical recovery media is mandatory to rewrite the bootloader files from an external source.



Will removing GRUB delete my personal files on the Windows partition?

No, the process of removing GRUB only modifies the boot sector and the EFI partition, which are separate from your user data. As long as you only delete the partitions specifically assigned to Linux (ext4 or swap formats) and do not format the NTFS partition, your Windows files remain intact.



Why does the GRUB menu still appear after I deleted the Linux partition?

The GRUB menu appears because the initial stage of the bootloader resides in the Master Boot Record or the EFI partition, which is separate from the main Linux installation. Even though the Linux OS is gone, the "pointer" remains; you must explicitly overwrite it using the Windows recovery commands to stop it from loading.



How do I identify which partition is the EFI partition in Diskpart?

In the Diskpart utility, look for a volume that is formatted as FAT32 and is approximately 100MB to 500MB in size. In the "Info" column, it will often be labeled as "System." This is the partition where both the Windows Boot Manager and the GRUB bootloader store their primary startup files.



Is it safe to delete the "MSR Reserved" partition in Disk Management?

No, you should not delete the Microsoft Reserved (MSR) partition. While it may appear empty, it is used by Windows for partition management and disk operations. When removing Linux, only delete the partitions you created for the Linux installation itself, typically identified by the absence of a drive letter and the lack of a Windows-recognized file system.

Finalizing Your System Restoration

By following these technical protocols, you have successfully decoupled your firmware from the GRUB environment and restored native Windows boot functionality. For continued system stability, ensure your BIOS/UEFI firmware is updated to the latest manufacturer version to prevent future boot configuration conflicts.


[GRUB] How to remove additional entries from GRUB boot screen - Kernel ...

[GRUB] How to remove additional entries from GRUB boot screen - Kernel ...

Read also: Navigating Grief with Grace: A Complete Guide to Memory Chapel Funeral Home Services
close