How to fix MBR through command prompt?

justinstrack

New member
Local time
3:48 PM
Messages
3
Question: What commands could I run in the command prompt during the system recovery? I try & run say "fixmbr" but it doesn't work. Say if I want to write a new master boot record how would I do that?
 

My Computer

Computer Manufacturer/Model Number
Toshiba
OS
Windows 7 RC 7100
These were commands used for vista, but should still hold true for W7. I've just never needed to use them yet......knock on wood:)

after selecting repair>cmd prompt, enter:
BootRec.exe /fixmbr

you can also substitue the /fixmbr with thes commands:

/FixBoot. Writes a boot sector onto the system partition to start Windows

/ScanOs. Scans all disks for Windows installations and displays them to you.

/RebuildBcd. Scans all disks for Windows installations and prompts you to pick the ones you want to add to the BCD.

 
Last edited by a moderator:

My Computer

Computer Manufacturer/Model Number
billdo build
OS
Windows 7 x64 rtm
CPU
Intel Q9550 @3.7Ghz
Motherboard
Gigabyte ep45 UD3P
Memory
8GB OCZ Reaper
Graphics Card(s)
Geforce 9800gtx+
Sound Card
M-Audio 192
Monitor(s) Displays
24" Sammy
Screen Resolution
1920x1200
Hard Drives
System HD:2x Super Talent SX ssd 64GB raid 0(128GB)--
- Storage HD: WD 640GB AAK
PSU
650
Case
Generic box w/little window and pretty blue lights
Cooling
Air
Keyboard
Razor Lycosa
Mouse
Logitech MX518
Internet Speed
unpredictable cable
Other Info
Monkeys are EVIL!!!!!!
billdo - I installed RC1 on my H drive. C drive is Vista. While booted in Windows 7 can I use the /FixBoot command to make the H drive bootable? I think now the systems starts up on the C drive and then gives the choice to start Vista or Windows 7 - Advice appreciated - IM
 

My Computer

OS
Vista Ultimate 64bit
No don't do that, the commands above should only be used as last resort to repair system.It's best to let your primary active system drive take care of all boot options, which in your case is C: Trying to make drive H active and bootable may have(will) cause severe problems.

If you wish to boot quicker into Windows7 you can change your default OS and boot menu delay in msconfig.

Go to Start>Run and type msconfig
click on the boot option and you will be able to choose default os to start and menu delay.

You can always set the boot menu delay to 0 to boot directly into your default OS and then use F8 or F5(varies different motherbaords)during post to select OS to boot.

If you want the boot menu to show with shorter delay(default 30sec)be sure to add a couple of extra secs to delay.If you choose a delay of 5sec you may only get 3-4sec.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
billdo build
OS
Windows 7 x64 rtm
CPU
Intel Q9550 @3.7Ghz
Motherboard
Gigabyte ep45 UD3P
Memory
8GB OCZ Reaper
Graphics Card(s)
Geforce 9800gtx+
Sound Card
M-Audio 192
Monitor(s) Displays
24" Sammy
Screen Resolution
1920x1200
Hard Drives
System HD:2x Super Talent SX ssd 64GB raid 0(128GB)--
- Storage HD: WD 640GB AAK
PSU
650
Case
Generic box w/little window and pretty blue lights
Cooling
Air
Keyboard
Razor Lycosa
Mouse
Logitech MX518
Internet Speed
unpredictable cable
Other Info
Monkeys are EVIL!!!!!!
billdo - After changing the boot drive to H from C, can I remove my C drive, and change H to C? Hey, I really appreciate your help :-) - IM
 

My Computer

OS
Vista Ultimate 64bit
I wouldn't advise it. You are going to have a lot of confused programs not knowing why their data is no longer on H
 

My Computer

Computer Manufacturer/Model Number
billdo build
OS
Windows 7 x64 rtm
CPU
Intel Q9550 @3.7Ghz
Motherboard
Gigabyte ep45 UD3P
Memory
8GB OCZ Reaper
Graphics Card(s)
Geforce 9800gtx+
Sound Card
M-Audio 192
Monitor(s) Displays
24" Sammy
Screen Resolution
1920x1200
Hard Drives
System HD:2x Super Talent SX ssd 64GB raid 0(128GB)--
- Storage HD: WD 640GB AAK
PSU
650
Case
Generic box w/little window and pretty blue lights
Cooling
Air
Keyboard
Razor Lycosa
Mouse
Logitech MX518
Internet Speed
unpredictable cable
Other Info
Monkeys are EVIL!!!!!!
Or you could've just tried bootrec /fixboot and bootrec /fixmbr.
 

My Computer

Computer Manufacturer/Model Number
Samsung NP530U4B-S02IN
OS
Windows® 8 Pro (64-bit)
CPU
Intel® Core™ i5 Processor 2467M (1.60GHz, 3MB L3 Cache)
Motherboard
Samsung Electronics
Memory
6GB DDR3 System Memory at 1,333MHz (on BD 4GB + 2GB x 1)
Graphics Card(s)
AMD Radeon™ HD7550M 1GB DDR3 (Ext. Graphic)
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
35.56cm (14.0) SuperBright 300nit HD LED Display
Screen Resolution
1366x768
Hard Drives
1TB S-ATA II Hard Drive (5400RPM) with ExpressCache 16GB SSD
Internet Speed
sucks
Antivirus
Microsoft Security Essentials
Browser
Google Chrome (Sync enabled)
Or you could've just tried bootrec /fixboot and bootrec /fixmbr.

Okay tried all that. The bootrec /ScanOS sees the OS but with I enter bootrec /RebuildBCD it (Y)yes it says "Element not found."

What now?
 

My Computer

Computer Manufacturer/Model Number
Toshiba
OS
Windows 7 RC 7100
Okay tried all that. The bootrec /ScanOS sees the OS but with I enter bootrec /RebuildBCD it (Y)yes it says "Element not found."

What now?
try bootrec /fixboot
fingers crossed.
 

My Computer

Computer Manufacturer/Model Number
Samsung NP530U4B-S02IN
OS
Windows® 8 Pro (64-bit)
CPU
Intel® Core™ i5 Processor 2467M (1.60GHz, 3MB L3 Cache)
Motherboard
Samsung Electronics
Memory
6GB DDR3 System Memory at 1,333MHz (on BD 4GB + 2GB x 1)
Graphics Card(s)
AMD Radeon™ HD7550M 1GB DDR3 (Ext. Graphic)
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
35.56cm (14.0) SuperBright 300nit HD LED Display
Screen Resolution
1366x768
Hard Drives
1TB S-ATA II Hard Drive (5400RPM) with ExpressCache 16GB SSD
Internet Speed
sucks
Antivirus
Microsoft Security Essentials
Browser
Google Chrome (Sync enabled)
Just a little warning to those who may not know....

Playing with the MBR is a risky thing.
If you don't know how to recover data and haven't done/or don't know how to do a backup.
Then you shouldn't be messing with the MBR at all.

Simply running /fixmbr can and has corrupted it for me several times in the past.
This is not something that a simple windows repair can usually fix, usually.
 

My Computer

Computer Manufacturer/Model Number
Self Built
OS
Win 7 Ultimate 32bit
CPU
C2D E6600 2.4Ghz
Motherboard
Intel D965WH
Memory
4G Kingston KHX5400D2
Graphics Card(s)
EVGA GTX 570 HD SC (012-P3-1573-KR)
Sound Card
On-Board
Monitor(s) Displays
Samsung 226BW
Screen Resolution
1680 x 1050
Hard Drives
2 x 250 Seagate Barracuda
2 x 500 Seagate Barracuda (Raid1)
PSU
Corsair TX750W
Case
In-Win C589
Cooling
Stock Intel Cooling
Just a little warning to those who may not know....

Playing with the MBR is a risky thing.
If you don't know how to recover data and haven't done/or don't know how to do a backup.
Then you shouldn't be messing with the MBR at all.

Simply running /fixmbr can and has corrupted it for me several times in the past.
This is not something that a simple windows repair can usually fix, usually.
Appreciate that thought but there's no other option to fix the above mentioned problem hence we had to dig the MBR. ;)
 

My Computer

Computer Manufacturer/Model Number
Samsung NP530U4B-S02IN
OS
Windows® 8 Pro (64-bit)
CPU
Intel® Core™ i5 Processor 2467M (1.60GHz, 3MB L3 Cache)
Motherboard
Samsung Electronics
Memory
6GB DDR3 System Memory at 1,333MHz (on BD 4GB + 2GB x 1)
Graphics Card(s)
AMD Radeon™ HD7550M 1GB DDR3 (Ext. Graphic)
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
35.56cm (14.0) SuperBright 300nit HD LED Display
Screen Resolution
1366x768
Hard Drives
1TB S-ATA II Hard Drive (5400RPM) with ExpressCache 16GB SSD
Internet Speed
sucks
Antivirus
Microsoft Security Essentials
Browser
Google Chrome (Sync enabled)
Did you try setting H hard drive as the first HD in bios boot order - mark the 7 partition Active - run startup repair 4 or 5 times.
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
I don't want to send this off in the wrong direction or give bad info.
But I can tell you what I would try personally in this situation.

If the MBR is toast, then you may have no other choice than to nuke and reload

I do not know if these will work or be compatible with Win7 in anyway shape or form, or if OS version even matters...This could make things better or worse.. So, use at your own risk...

You can however try MBRFix and/or MBRWiz

You can also possibly try TestDisk, which is a data recovery program.
And has save my butt a few times.

I do believe both are a part of the UBCD4Win (however you would also need to upgrade some tools plugins as they may be out dated), which you may find very handy in this or many other situations. Every Tech should be aware of it and BartPE (which UBCD4Win is a derivative of).

With all that said.....

You can try DiskPart also....to assign the drive letter you want.
http://technet.microsoft.com/en-us/library/cc766465(WS.10).aspx
http://support.microsoft.com/kb/300415

I would start with building a UBCD4Win (or BartPE) and boot to it, see if the drive shows up in Drive manager.

If it does, I might try changing the drive letter there, then set as active.
Then if needed run some of the 7 boot option fixes to see if this will repair any BCD problems.

I say might, because I have never had to do this, this would just be a way I would go if all else was failing.

If the drive is not showing up at all in there, then the MBR is toast and you can try the MBRFix or MBRWiz to try and repair it if possible. If these fail, then you can try TestDisk, this may work, but is not likely, however, it may allow you to recover data id it finds it.

If all this fails, with all else you have tried, Personally, I would give up the ghost and nuke and reload.

Once the MBR is toast, there is almost no way to fix it.

Although, someone may know something I don't.
 

My Computer

Computer Manufacturer/Model Number
Self Built
OS
Win 7 Ultimate 32bit
CPU
C2D E6600 2.4Ghz
Motherboard
Intel D965WH
Memory
4G Kingston KHX5400D2
Graphics Card(s)
EVGA GTX 570 HD SC (012-P3-1573-KR)
Sound Card
On-Board
Monitor(s) Displays
Samsung 226BW
Screen Resolution
1680 x 1050
Hard Drives
2 x 250 Seagate Barracuda
2 x 500 Seagate Barracuda (Raid1)
PSU
Corsair TX750W
Case
In-Win C589
Cooling
Stock Intel Cooling
Just a little warning to those who may not know....

Playing with the MBR is a risky thing.
If you don't know how to recover data and haven't done/or don't know how to do a backup.
Then you shouldn't be messing with the MBR at all.

Simply running /fixmbr can and has corrupted it for me several times in the past.
This is not something that a simple windows repair can usually fix, usually.

I had a backup so I just decided to re-install. Windows 7 is fast to install I backup & running within 1 hour.

thanks everyone.
 

My Computer

Computer Manufacturer/Model Number
Toshiba
OS
Windows 7 RC 7100
A note about Bootrec

I was working on an Acer Iconia Tab W500 (tablet PC) this evening, which runs Windows 7 Enterprise (Ultimate) and Ubuntu 12.04. My intentions were to remove Ubuntu, restore the Windows 7 boot loader, and then remove the Ext3 partition containing Ubuntu 12.04.

I use a Sandisk 4GB USB drive as my installation media.
The tablet uses a built in 32GB SSD, and a separate 32GB SDXC card (45MBps).

I found that booting from the actual installation media would not repair the drive. I'm not sure exactly what caused it's confusion, but since Bootrec.exe does not allow you to target the operation to be performed on a specific drive, it's sorta a shot in the dark.

So, I copied the tool to my local drive, and booted up, first triggering my Drive selector, then immediately hitting F8 to trigger the boot-selector menu. This was all while grub was still installed. I was able to locally select the repair mode, and then open a command prompt, and run bootrec against the local drives without using a boot disc. This successfully removed grub, and I can now proceed to removing the ext3 partition and then spanning out the NTFS partition to reclaim the space on that drive, which is tiny to begin with.

If I *do* put another alternative OS on this machine, it'll be Android x86 v4.x or newer. I'll continue to use Windows 7 as it's primary OS until I can update it to Windows 8 Enterprise, and for now I'll continue to use USB drives for running Linux Distributions, which works well anyway. I just need to get a few lower-profile-drives since this *is* a tablet afterall. But I'll give it this, Windows 7 runs like a scalded dog on this Tablet, and Diablo 3 looks pretty sweet on it too! :)

Share and Enjoy,
StygianAgenda
 
Last edited by a moderator:

My Computer

OS
Windows 7 Enterprise i386
I am just reading so many different questions and answers. thanks to all.
 

My Computer

Computer Manufacturer/Model Number
Gateway
OS
windows 7
Memory
6gb
FixMbr or FixBoot ?

Hello,

One of my computers does not want to start or restart but only SOMETIMES.

Do you think that FixMbr or FixBoot could help ?

Or because this computer often starts without problem it should not be of any help ?

Thank you.
 

My Computer

OS
Windows 7 64 bits
no. its not likely.

Download a copy of CCleaner, install it, configure it, then run its drive cleanup and registry cleanup tools. It'll likely cure the issues you've dealt with. If it doesn't, then its likely that your system needs to be reloaded, with fresh drivers for everything on it.

If you can do that yourself, you'll save a lot of money vs taking it to a shop.

(also, I've long since done away with Windows on my tablet. I'm now running Ubuntu-Mate 14.04-LTS, which I use mostly for work)
 
Last edited:

My Computer

OS
Windows 7 Enterprise i386
Or you could've just tried bootrec /fixboot and bootrec /fixmbr.

Exactly what I was looking for.

Thanks.

Deployed from the Command Prompt found in "Repair Your PC" on the installation media, works like a charm.

Had to use it to repair my MBR after an Ubuntu removal.

So simple, a caveman could do it.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Modded Gateway GT5034
OS
Windows 7 Home Premium x64
CPU
Athlon X2 4200+
Memory
3GB DDR2
Graphics Card(s)
nVidia 9400GT, 128-bit 1GB DDR2
Sound Card
SB Audigy 2 LS
Monitor(s) Displays
40" Sony Bravia 2
Hard Drives
500GB Seagate Barricuda 7200.11 (System)
750GB Seagate Barricuda 7200.12 (Data)
bootrec /scanos = 0 installations found

If getting the "Total identified Windows installations: 0" when running bootrec /scanos, eg:

X:\windows\system32>bootsect.exe /scanos
Scanning all disks for Windows installations.

Please wait, since this may take a while...

Successfully scanned Windows installations.
Total identified Windows installations: 0
The operation completed successfully

You'll need to clean the MBR then create a new MBR and tell Windows to use it. To do this, simply run these two commands:

bootrec /fixmbr

bootsect.exe /nt60 all /force

You should see a message that says your "Bootcode was successfully updated on all targeted Volumes"

This helped me when i had to delete my linux partition and the separate MBR partition due to not enough space on windows. After extending the windows partition to the newly formatted NTFS partitions I obviously did not have an MBR anymore. The "fix problems preventing windows from starting" did not work and none of the commands in this forum worked. I used a bootcd to get into command prompt and ran this & it fixed it right away. Hope this helps you if you're having the same problem
 

Attachments

  • bootrec found 0 windows installations.png
    bootrec found 0 windows installations.png
    5.6 KB · Views: 42
  • bootrec fix mbr on all voumes command.png
    bootrec fix mbr on all voumes command.png
    40.7 KB · Views: 41

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom build
OS
Windows 7 Home Premium x64
CPU
Intel i7 960 @ 3.20GHz
Motherboard
Asus Sabertooth
Memory
12.0 GB
Graphics Card(s)
AMD Radeon HD 7900 Series (x2)
Back
Top