MBR - Restore Windows 7 Master Boot Record

How to Restore the Windows 7 MBR (Master Boot Record)

   Information
If you have been dual booting with Linux, then you probably know one of the Linux boot managers like Grub or LILO has been installed in the MBR of your hard drive. What can you do when you no longer want Linux on that hard drive? This tutorial will show you how to use your 7 DVD and BOOTSECT.EXE to restore the "bootsector code" of the MBR and allow you to begin booting to Windows 7 again.
   Tip
You can use this method to update the bootsector code for Windows 7, Vista, XP, 2000 or switch between Bootmgr and NTLDR. Just check the Microsoft TechNet site for the correct command.



Here's How:1. Boot your computer to the Windows 7 DVD (or to a "Repair CD"). At this screen choose to install now.
25672d1251414873-mbr-restore-windows-7-master-boot-record-mbr_02.png



2. Select your language and click next.
25673d1251414836-mbr-restore-windows-7-master-boot-record-mbr_03.png



3. Click the button for "Use recovery tools".
25674d1251414836-mbr-restore-windows-7-master-boot-record-mbr_04.png



4. Then select "Command Prompt".
25675d1251414836-mbr-restore-windows-7-master-boot-record-mbr_05.png



5. When open, the command prompt will look like this:
53598d1251414836-mbr-restore-windows-7-master-boot-record-mbr_16.png



6. The command we will use, bootsect.exe, is in a folder (named boot) on the DVD.We need to know what drive letter has been assigned the DVD drive to access the folder.

Code:
Type: [B]diskpart[/B]
and press [B]Enter[/B]
 
Type: [B]select disk 0[/B] (zero)
and press [B]Enter[/B]
 
type: [B]list volume[/B]
and press [B]Enter[/B]
In this screen shot, the 7 DVD is letter: G
53599d1251414836-mbr-restore-windows-7-master-boot-record-mbr_17a.png



7. Use your DVD drive letter and

Code:
Type: [B]exit[/B]
and press [B]Enter[/B]
 
to close Diskpart
 
Type: [B]G:[/B] (use the letter of your DVD drive)
and press [B]Enter[/B]
 
Type: [B]cd boot[/B]
and press [B]Enter[/B]
 
Type: [B]dir[/B]
and press [B]Enter[/B]
to verify that bootcect.exe is there (if you really need to)
53600d1251414836-mbr-restore-windows-7-master-boot-record-mbr_18a.png



8. To restore the "bootsector code":

Code:
TYPE: [B]bootsect /nt60 SYS /mbr[/B]
and press [B]Enter[/B]
53601d1251414836-mbr-restore-windows-7-master-boot-record-mbr_19.png


NOTE: If this method fails to restore the MBR, you can try the bootrec command as it is also a tool for repairing the MBR.


9. When completed successfully,

Code:
Type: [B]exit[/B]
and press [B]Enter[/B]
This will close the command prompt window.

10. Now select Shut Down or Restart
25680d1251414836-mbr-restore-windows-7-master-boot-record-mbr_10.png



11. Then you can reboot your computer into Windows.
25681d1251414836-mbr-restore-windows-7-master-boot-record-mbr_12.png




 

Attachments

  • mbr_02.png
    mbr_02.png
    220.2 KB · Views: 1,640,315
  • mbr_03.png
    mbr_03.png
    212.8 KB · Views: 1,635,478
  • mbr_04.png
    mbr_04.png
    13.3 KB · Views: 1,633,763
  • mbr_05.png
    mbr_05.png
    25.7 KB · Views: 1,579,666
  • mbr_10.png
    mbr_10.png
    25 KB · Views: 1,576,678
  • mbr_12.png
    mbr_12.png
    18.2 KB · Views: 1,552,307
  • mbr_16.png
    mbr_16.png
    6.1 KB · Views: 1,554,623
  • mbr_17a.png
    mbr_17a.png
    13.4 KB · Views: 1,565,873
  • mbr_18a.png
    mbr_18a.png
    14.7 KB · Views: 1,620,585
  • mbr_19.png
    mbr_19.png
    5.3 KB · Views: 1,569,958
Last edited by a moderator:
Hi, iseeuu,
excellent tutorial on inner windows system.
But I have a doubt.
In environment mode, you are in x:\source, that media being a dvd or usb.
how commands in x: drive would fix the mbr in c: in the reserved partition?
or should we execute these commands by going to the c: from x: to correct the boot records?
Your tutorial also gives insight to how to view the inner boot folder details.
But please clarify my doubt.
Sometimes, when i access the advanced boot options, I find no Repair this computer listed
what that it means?
Whenever you install windows, the startup repair is preloaded with windows installation.
Microsoft says, that if the menu is not there, then it is not preinstalled with windows
please clarify those.
In short, if you have repair this computer menu in advance boot, then when you evoke command prompt from repair this computer menu in adv.boot,options, then you could use those commands like bootrec /fixmbr, rebuildbcd etc. or
otherwise, if you use the installation media, then you have to execute this command by going to c: from X: am i correct
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom build
OS
Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM)2 Duo CPU E7200 @ 2.53GHz
Motherboard
To be filled by O.E.M. To be filled by O.E.M.
Memory
4.00 GB
Graphics Card(s)
NVIDIA GeForce 210
Sound Card
(1) NVIDIA High Definition Audio (2) Realtek High Definiti
Screen Resolution
1920 x 1080 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
ST3500312CS ATA Device
Back
Top