Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was in the process of reinstalling Windows 7, and somehow the MBR (Master Boot Record) was edited by fault (whilst deleting partitions on the two hard drives using GParted).

Now I can't get the installation disc to start up. I really don't know much about how to fix this sort of thing, but is there any sort of program that will create the basic default MBR so I can run the installation disc? I have Hiren's BootCD and the Windows 7 Recovery Disc available if that helps.

share|improve this question

migrated from stackoverflow.com Jul 26 '11 at 17:56

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

The windows 95 boot disk contains fdisk and using the undocumented fdisk /mbr command you can rebuild the MBR.

You can download the win95 boot disk image from bootdisk.com and there are instructions around the 'net on how to burn it to a CD.

UPDATE response to edit: Um, no. I'm pretty sure I didn't. I appreciate your acting upon your assumptions to correct what you thought was a wrong answer, but I did mean what I wrote initially. And for reason, as follows:

First, the last boot disk was applied to Windows XP. After that M$ assumed your system supported bootable optical disks. The subsequent OSes (Vista and 7) came on Bootable disks, but did not have Boot disks.

Second, the disk partition manager on the 98 boot disk was scripted in some way that made it difficult to run manually, and it didn't have a MBR repair function so far as I know.

Third, while it's the win95 boot disk, fdisk /mbr has worked for me with FAT and NTFS disks and all Windows OSes so far. The only issue I've found is that when the MBR is used to hide recovery partitions (IBM ThinkCentre desktops are the ones I've seen this in primarily), running fdisk /mbr will "reveal" those partitions. This does not affect the ability of the recovery partitions, you just see them in Windows now as extra drives.

share|improve this answer
1  
Pretty sure you meant Windows 7 and not 95 :) FTFY –  surfasb Jul 27 '11 at 10:43
    
Thanks for the assumed assist. But it was not needed. See above. But +1 so you'll see I'm not (too) mad. ;) –  music2myear Jul 27 '11 at 14:15
    
Ahh, actually, Vista and 7 have boot disks. They just call it a System Recovery disk and it has been moved to the Backup Program. It will work for this situation. windows.microsoft.com/en-US/windows7/…. –  surfasb Jul 27 '11 at 15:32
add comment

I'm surprised that you can boot with your manufacturer provided disks. Have you check the BIOS settings to make sure your computer boots from the CD before the HD? A lot of work machines are setup this way, to keep people from messing around.

When you boot in, use the repair system option. If that doesn't work, you'll have to boot into the system recovery console. To get to the recovery console, you can select the option under repair my system, or press F10 while in the setup.

Use the following command to fix your MBR in the recovery console:

d:\boot\ bootsect.exe /nt60 all

Here is the official Microsoft link. I'll cut and paste it, but the formatting isn't gonna translate.

http://support.microsoft.com/kb/927392

You can use the Bootrec.exe tool in the Windows Recovery Environment (Windows RE) to troubleshoot and repair the following items in Windows Vista or Windows 7: A master boot record (MBR) A boot sector A Boot Configuration Data (BCD) store Note When you are troubleshooting startup issues by using the Windows RE, you should first try the Startup Repair option in the System Recovery Options dialog box. If the Startup Repair option does not resolve the issue, or if you must troubleshoot more steps manually, use the Bootrec.exe tool. Back to the top MORE INFORMATION To run the Bootrec.exe tool, you must start Windows RE. To do this, follow these steps: Put the Windows Vista or Windows 7 installation disc in the disc drive, and then start the computer. Press a key when you are prompted. Select a language, a time, a currency, a keyboard or an input method, and then click Next. Click Repair your computer. Click the operating system that you want to repair, and then click Next. In the System Recovery Options dialog box, click Command Prompt. Type Bootrec.exe, and then press ENTER. Note To start the computer from the Windows Vista or Windows 7 DVD, the computer must be configured to start from the DVD drive. For more information about how to configure the computer to start from the DVD drive, see the documentation that is included with the computer or contact the computer manufacturer. Back to the top Bootrec.exe options The Bootrec.exe tool supports the following options. Use the option that is appropriate for your situation.

Note If rebuilding the BCD does not resolve the startup issue, you can export and delete the BCD, and then run this option again. By doing this, you make sure that the BCD is completely rebuilt. To do this, type the following commands at the Windows RE command prompt: bcdedit /export C:\BCD_Backup c: cd boot attrib bcd -s -h -r ren c:\boot\bcd bcd.old bootrec /RebuildBcd /FixMbr The /FixMbr option writes a Windows 7 or Windows Vista-compatible MBR to the system partition. This option does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove non-standard code from the MBR. /FixBoot The /FixBoot option writes a new boot sector to the system partition by using a boot sector that is compatible with Windows Vista or Windows 7. Use this option if one of the following conditions is true: The boot sector has been replaced with a non-standard Windows Vista or Windows 7 boot sector. The boot sector is damaged. An earlier Windows operating system has been installed after Windows Vista or Windows 7 was installed. In this scenario, the computer starts by using Windows NT Loader (NTLDR) instead of Windows Boot Manager (Bootmgr.exe). /ScanOs The /ScanOs option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option displays the entries that are currently not in the BCD store. Use this option when there are Windows Vista or Windows 7 installations that the Boot Manager menu does not list. /RebuildBcd The /RebuildBcd option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.