I recently made some changes to my gaming desktop at home which has a 256GB SSD for Windows and a 2-port RAID card with 2 x 2TB disks in RAID0 setup. The RAID setup also holds a small partition for a Linux install and therefore GRUB was installed to the SSD (as this is my primary boot device). As I am phasing out the RAID setup I soon came to the (hard) conclusion that Windows would no longer boot as soon as the RAID card is no longer present in the system. The effect is quite logical as /boot/grub/ resides on the partition containing the Linux install and this is no longer available, so GRUB cannot load it’s core files anymore resulting in a GRUB rescue prompt.
This small post will cover how to restore the MBR (Master Boot Record) from within Windows itself. So in order to complete this process I’ve put the RAID card back into the system so GRUB works for now and was able to boot back into Windows (10 in my case).
Restore the MBR from within Windows 10:
When in Windows, open an elevated commandprompt. You can do this by pressing the Windows-key or clicking on the startmenu icon and type “cmd”. Right-click on the commandprompt icon and let it run as Administrator.
Windows has a tool called “bootsect.exe” which is able to restore the MBR on your disk so it’s bootable again. In my case I want my system drive to have it’s MBR restored, so that’s the C: drive:
bootsect.exe /nt60 c: /mbr
A small explanation on the options we supply:
/nt60
: this defines the boot installation method. NT60 is used for Windows Vista and above (so including 7, 8, 8.1 and 10) and defines the BOOTMGR method used in these newer versions. There is a option /nt52 which are all Windows versions before Windows Vista (so XP, 2003, 2000 etc) and this defines the older NTLDR method used in these versions.
c:
this is the drive letter used. It’s also possible to replace the driveletter for the word “SYS” and Windows will automatically use the system drive.
/mbr
: this defines the boot method that is going to be installed to disk, for MBR this is the best option :).
More information about the parameters that you can pass can be found on this Technet article from Microsoft.
If you enter the command you will see some output regarding the partition that is being changed and whether is wat successful or not. In my case it gave an error because the drive being updated is also the system drive and therefore cannot unmount it. It states that the update may have gone wrong but in my case worked as expected. Upon removing the RAID card again and booting from the SSD resulted in a booting Windows 10!
This is a very small and simple post but I had a hard time finding the right information as most methods are based on live CD’s or Windows recovery media and posts found often refer to the older NTLDR method. As they are suitable as well, you will need to have this ready in order to use it. Since I was still able to boot into Windows using a workaround I was able to solve it on the running Windows system itself which is better. Should you not be able to boot into Windows anymore then the live CD’s are the best way to fix your MBR.