Software & AppsOperating SystemLinux

Recovering Windows Bootloader After Deleting Ubuntu Partition

Ubuntu 18

If you’ve previously been dual-booting Windows and Ubuntu, and you’ve recently deleted the Ubuntu partition, you may have found that your computer now boots to a Grub rescue prompt, with no way to load your Windows operating system. This happens because the Grub bootloader is installed in the Ubuntu partition, and when it’s deleted, Grub can’t find its configuration file and can’t boot anything.

Don’t worry, this is a common issue and can be resolved by recovering the Windows bootloader. This guide will walk you through the steps to do just that.

Quick Answer

To recover the Windows bootloader after deleting the Ubuntu partition, you’ll need a Windows installation media. Boot from the installation media, access the Windows Recovery Environment, choose the operating system you want to repair, and use the Bootrec.exe tool to fix the bootloader. Execute the commands "bootrec /fixmbr", "bootrec /fixboot", "bootrec /scanos", and "bootrec /rebuildbcd". Finally, restart your computer, and it should boot directly into Windows.

Prerequisites

Before we begin, you’ll need a Windows installation media. This could be a DVD or a USB drive. If you don’t have one, you can create one using another computer with the same version of Windows.

Boot from a Windows Installation Media

Firstly, insert your Windows installation media into your computer and boot from it. You can usually do this by restarting your computer and pressing a specific key (often F12, F10, or Esc) to access the boot menu. Choose to boot from your installation media.

Access the Windows Recovery Environment

Once you’ve booted from the installation media, you’ll be presented with a language selection screen. Select your language preferences and click “Next”. Then, click on “Repair your computer” in the bottom left corner of the screen.

Choose the Operating System

In the next screen, you’ll be asked to select the operating system you want to repair. If you have multiple versions of Windows installed, choose the one you want to recover the bootloader for.

Use the Bootrec.exe Tool

Now we’re going to use a tool called Bootrec.exe to fix the bootloader. To do this, click on “Troubleshoot”, then “Advanced options”, and finally “Command Prompt” to open a command prompt window.

In the command prompt window, you’re going to type the following commands one by one, pressing Enter after each:

  • bootrec /fixmbr
  • bootrec /fixboot
  • bootrec /scanos
  • bootrec /rebuildbcd

Let’s break down what these commands do:

  • bootrec /fixmbr: This command writes a new master boot record (MBR) to the system partition. The MBR is the first sector of the computer’s hard drive that the computer reads when it starts up.
  • bootrec /fixboot: This command writes a new boot sector onto the system partition. The boot sector is a region of the hard disk that contains code executed by the computer’s firmware.
  • bootrec /scanos: This command scans all disks for installations that are compatible with Windows.
  • bootrec /rebuildbcd: This command scans all disks for installations that are compatible with Windows, and then asks you if you want to add them to the boot list.

Restart Your Computer

After executing the Bootrec.exe commands, you can restart your computer. Make sure to remove the Windows installation media, so your computer boots from its hard drive. Your computer should now boot directly into Windows.

Conclusion

Recovering the Windows bootloader after deleting the Ubuntu partition can seem daunting, but with the right tools and steps, it’s a straightforward process. Remember to always backup your important data before making any changes to your system. If you encounter any issues, don’t hesitate to seek help from online communities or professional services.

Can I recover the Windows bootloader without a Windows installation media?

No, you will need a Windows installation media to recover the Windows bootloader. If you don’t have one, you can create one using another computer with the same version of Windows.

What if I don’t have multiple versions of Windows installed?

If you only have one version of Windows installed, you don’t need to select an operating system during the recovery process. You can proceed with using the Bootrec.exe tool as mentioned in the guide.

Will recovering the Windows bootloader delete any of my files or data?

Recovering the Windows bootloader should not delete any of your files or data. However, it’s always recommended to backup your important data before making any changes to your system, just to be safe.

What should I do if the Bootrec.exe commands don’t fix the issue?

If the Bootrec.exe commands don’t fix the issue, it’s possible that there might be other underlying problems with your system. In such cases, it’s recommended to seek help from online communities or professional services for further assistance.

Can I reinstall Ubuntu after recovering the Windows bootloader?

Yes, once you have recovered the Windows bootloader, you can reinstall Ubuntu or any other operating system alongside Windows using the appropriate installation media and following the necessary steps.

Leave a Comment

Your email address will not be published. Required fields are marked *