How to fix MBR for Windows

Problem

I had installed Windows 10 successfully. While messing around with my other Linux partitions, a partition delete went awry and on booting I was dropped into a GRUB rescue prompt. What I wanted was the Master Boot Record to be restored to boot into Windows 10.

Solution

  • On another computer, I downloaded a Windows 10 ISO and created a bootable Windows recovery USB disk as described here.

  • I booted with this USB disk, chose Troubleshoot -> Advanced Options -> Command Prompt.

  • At the command prompt, type these commands:

$ bootrec /rebuildbcd
$ bootrec /fixmbr
$ bootrec /fixboot
$ exit

After restarting I was able to boot into Windows 10.

Advertisements