Windows – How to fix the Windows 10 boot loader from Windows

bootbootloadergrubmbrwindows 10

I installed Ubuntu on a system that has Windows 10 installed. I can boot to Windows or Ubuntu normally using GRUB. I want to delete Ubuntu partition, but first I must restore the Windows 10 MBR.

In Use Bootrec.exe in the Windows RE to troubleshoot startup issues (applies to Windows 7 and Windows Vista) they say to use Bootrec.exe with options /FixMbr /FixBoot, but when I type "bootrec.exe /FixMbr" in a command prompt, Windows says:

'bootrec.exe' is not recognized as an internal or external command.

I say I can boot to Windows 10 and run a command prompt from there (I don't need to use an installation medium), but I don't know what to enter.

Best Answer

The command in Windows 8/8.1/10 for fixing MBR is "bootsect.exe".

bootsect /nt60 drive_letter: /mbr

this fixes boot record of partition mapped to "drive_letter:" and the MBR of the disk where the partition is placed.

C:\Windows\system32>bootsect

bootsect {/help|/nt60|/nt52} {SYS|ALL|<DriveLetter>:} [/force] [/mbr]

Boot sector restoration tool

Bootsect.exe updates the master boot code for hard disk partitions in order to
switch between BOOTMGR and NTLDR.  You can use this tool to restore the boot
sector on your computer.

Run "bootsect /help" for detailed usage instructions.

Alternatively you can use "Dual-boot Repair Tool" which has a graphical interface to bcdboot.exe, bootsect.exe and other useful functions like boot sector view and ... one click dual-boot repair function for Windows 10/8/7/Vista (also can fix Windows XP boot files).

Related Question