Fastest way to restore Windows 7's original MBR?

12,778

Make a System Repair Disc on another W7 PC, it needs to be the same bit version as the one you are repairing, 32 or 64bit Windows 7.

Once you have the System Repair Disc,

Insert the Windows 7 installation or System Repair DVD and boot from your DVD drive. You may have to change the boot order through system BIOS to boot from your DVD.

Choose your default "Language," "Time" and "Keyboard Input" on the first window and click "Next."

Click on the "Repair Your Computer" option to gain access to the System Recovery window. Now choose "Command Prompt" to run the Bootsect.exe utility. Bootsect is located inside the boot folder so change your directory to boot. Now run bootsect /nt60 C:\ if you had Windows 7 initially installed in the C partition. Alternatively, you can run bootsect /nt60 SYS or bootsect /nt60 ALL to repair the system partition or all partitions. Eject the DVD and restart your computer. Your computer should now boot Windows 7 again.

Source

Secondary Source

Completion:
As stated in the comments below, one has also to use the /mbr option in order to fix MBR, which is necessary to remove GRUB from MBR.

Share:
12,778

Related videos on Youtube

Apache
Author by

Apache

Updated on September 18, 2022

Comments

  • Apache
    Apache over 1 year

    I have removed GRUB's partition, and I wanted to restore the original Windows boot part. WinToFlash failed again to make my pendrive bootable, thus I'm in a bit of a trouble now.

    I looked all around, but I couldn't find any easy way to do this.
    What is the easiest and fastest way to restore the MBR?

    (I've got no Windows 7 DVD with me right now. And fetching the DVD is not really fast with a slower connection.)

    • cutrightjm
      cutrightjm about 12 years
      Why not just burn one from your computer? Start -> 'Create a system repair disk'
    • Hamed
      Hamed about 12 years
      isn't there any OSs that could boot ?
    • Harry Johnston
      Harry Johnston about 12 years
      Note that you don't need the Windows 7 MBR in particular. Any DOS or Windows compatible MBR will do. There's bound to be a Linux tool that will write a DOS-compatible MBR; perhaps linux.die.net/man/1/ms-sys ?
  • Harry Johnston
    Harry Johnston about 12 years
    According to the MS documentation, you must use the /mbr flag to update the MBR. Otherwise, the partition boot record (not the master boot record) is written.
  • Moab
    Moab about 12 years
    They are trying to install the MBR not repair or update it. "/NT60 Applies the master-boot code that is compatible with BOOTMGR "....msdn.microsoft.com/en-us/library/…
  • Harry Johnston
    Harry Johnston about 12 years
  • Harry Johnston
    Harry Johnston about 12 years
    It isn't really clear whether bootsect updates both the MBR and the partition boot sector by default. I'll try it out next time I get a chance. (Note, however, that in the context of the MBR, "install", "update", and "repair" all mean the same thing!)
  • Moab
    Moab about 12 years
    Microsoft documentation sucks doesn't it.
  • Harry Johnston
    Harry Johnston about 12 years
    OK, I've tried it. For the record, bootsect does not write the MBR unless you specify the /mbr flag. The version I tested was dated November 2010, and came from the Windows 7 version of WinPE.
  • Moab
    Moab about 12 years
    @HarryJohnston thanks, good to know. So what the hell does write master "bootcode" mean then?
  • Harry Johnston
    Harry Johnston about 12 years
    They're talking about the boot code on the individual partitions. IIRC, the first track of each partition contains either code to load NTLDR or code to load BOOTMGR, depending on the Windows version. I guess they call this the "master boot code" to distinguish it from the boot code in NTLDR/BOOTMGR.