Fixing Windows boot problems with BootSec.exe and BootRec.exe
Posted: (EET/GMT+2)
Sometimes, developer life requires some PC resurrection. If your Windows fails to start, the Master Boot Record (MBR) or boot configuration may be corrupted. You can fix these from Recovery Environment using Bootrec or Bootsect commands.
Here's how:
1) Boot from Windows installation media - "Repair your computer" - "Troubleshoot" - "Command Prompt".
2) Rebuild the boot sector:
bootsect /nt60 SYS
The above command rewrites the boot sector on the system partition to use the Windows 7/8/10 boot loader.
3) Use Bootrec to repair MBR and rebuild the BCD store:
bootrec /fixmbr bootrec /fixboot bootrec /scanos bootrec /rebuildbcd
If the "/fixboot" option reports "Access is denied", then you need to assign a drive letter to the EFI partition first using DiskPart, then retry.
Finally, exit and reboot:
exit wpeutil reboot
These tools only modify boot records, so your user data stays intact.