Fixing the Master Boot Record (MBr)

1. Turn on the computer, booting from either Windows 7 Installation DVD or Windows 7 System Recovery Disc.

2. After the installation or recovery disc loads, if prompted, select language settings and then continue.  If use the installation DVD, when prompted by the following screen select 'Repair your computer'.

3.The computer will take a moment now to scan itself for any Windows installation.
Select the appropriate Windows installation from the list and then continue.
If by chance a problem is detected in one of your Windows installations at this initial stage, the system may also ask if it can try to repair the problem automatically.

4.Once reached the System Recovery Options screen, we will be faced with a list of choices that can aid us in repairing a damaged Windows 7 operating system.
If we wish to try the Startup Repair option first, it is often successful in automatically fixing many different start up issues, but in this article we will be using the Command Prompt option to resolve our problems manually. So, click Command Prompt to continue.

5.At the command prompt, enter the following command and then press enter:

         bootrec.exe /FixMbr

If successful, you should be greeted with the message The operation completed successfully.  That's it!  Your Master Boot Record has been repaired.

While the above command does fix the MBR, and sometimes that is enough, there still might be an error with the system partition's boot sector and Boot Configuration Data (BCD). This might occur if you have tried to install another operating system alongside Windows 7, such as Windows XP.  To write a new boot sector, try the following command:

        bootrec.exe /FixBoot 

If you are still faced with your Windows 7 installation not being detected during start up, or if you wish to include more than one operating system choice to your system's boot list, you can try the following command to rebuild your BCD:
        
        bootrec.exe /RebuildBcd

The above command will scan all your disks for other operating systems compatible with Windows 7 and allow you to add them to your system's boot list. If this fails, you may need to backup the old BCD folder* and create a new one in its place with the following commands:

        bcdedit /export C:\BCD_Backup
        c:
        cd boot
        attrib bcd -s -h -r
        ren c:\boot\bcd bcd.old
        bootrec /RebuildBcd

source: google

About