Fixing a Broken MBR

For a precursor to this, an explanation of just what we will be doing, and why I’m doing it, see the orinal posts here.

1) Insert an XP or 2k3 or 2k CD and boot from it. At the first prompt, press R to enter the Recovery Console. Then,
Type fixmbr
Type fixboot
Type Exit

As an alternative you can use a Windows 98 or ME boot disk and use the command fdisk /mbr but I have personally not attempted that. No guarantees.

2) Download Xfdisk from http://www.mecronome.de/xfdisk/index.php

3) Install Xfdisk to a floppy, and boot from it. Press [enter] to rewrite the MBR.

At the moment, you now have a completely wiped down MBR in the Boot Loader section ONLY. Following other guides will either leave you with fragments of BT Loaders or will delete your Partitions, LOSING ALL information!!!

4) Reinstalling Windows or any other OS will not work, since they require a base MBR BT-Loader section to build on. Now you need to download the smallest version of Linux that ships with Grub. NB: Lilo does not work. It needs to be Grub. If you already have Linux installed, reinstall it in Rescue Mode to re-add Grub.

5) Run a custom install, choosing the option Minimal. We will not be using Linux, and will remove it later. We need to install it to get Grub installed. Go ahead and let it repartition your drive, or do it manually. If you already have Linux, you can skip this step.

6) Grub installer should automatically pick-up on the fact that you have Windows on your PC, and add an appropriate entry.

7) Booting to Windows from Grub will not yet work. The MBR wipe that we did above removed NTLDR, the Windows Boot Loader.

8) Now you need to reinstall Windows. I know its long and hard, but go ahead and do a repair install for your Drive C:\ Windows Partition. i.e. if you have several versions of Windows, you only need to reinstall the primary one.

9) Everything should work now. It will boot in this order:

a) BIOS -> MBR
b) MBR -> Grub
c) Grub -> Linux OR NTLDR
d) NTLDR -> All Windows partitions.

These are optional steps to remove Grub and to remove Linux.

10) First from Windows: Start -> Settings -> Control Panel -> Administrative Tools -> Computer Management -> Disk Management
Delete the Linux Partition from there.

11) Boot from the XP CD and use fixmbr to return NTLDR and to remove Grub.

:) You're Done!!

I know the above was extremely tedious to put it lightly, but if you have a broken MBR that fixmbr alone will not repair, and you refuse to low-level format or to wipe your MBR completely, you gotta do what you gotta do.



Leave a Reply  •  About to Ask for Help?  •  Subscribe to Our Feed

28 Responses to “ Fixing a Broken MBR ”


  1. 1AlJan. 29th, 2006 at 9:15 pm

    Nice!

  2. 2jonathan wiseJan. 30th, 2006 at 4:04 pm

    fdisk /mbr works fine...

  3. 3Computer GuruJan. 30th, 2006 at 4:50 pm

    Yeah, but this is for the terrible times when it does NOT work fine ;)

  4. 4Tino FloheFeb. 24th, 2006 at 12:46 pm

    I did not know befor that it can be this easy... Nice Trick.

  5. 5morganixMar. 13th, 2006 at 8:06 am

    To be honest, I prefer /fdisk mbr. I had fixmbr corrupt my master boot records once.... not pretty.

  6. 6Computer GuruMay. 30th, 2006 at 8:09 pm

    But that doesn't alway work... this one does :)

  7. 7SomeoneAwfulJun. 13th, 2006 at 3:43 am

    "You're" done. "Your" is possessive.

  8. 8Computer GuruJun. 13th, 2006 at 6:58 am

    Thanks ;)

  9. 9Dan MartinJun. 28th, 2006 at 5:00 am

    God Bless You for having this note on the 'net! I had a W2K installation running out of disk space, with SuSe 9.0 and Grub for the bootloader, and for some ugly reason when I tried to format some unallocated space on the hdd it crashed W2K and corrupted the Grub partition. Not knowing how to fix a busted Grub without reinstalling Linux (and I'm too tired to do that now) I booted up my laptop, found you, and fixed my MBR for the needed Windows boot in about 5 minutes using a DOS boot/utility CD I carry with me.

    You saved my bacon. . .not to mention my sleep tonight!

    Dan

  10. 10Computer GuruJun. 28th, 2006 at 7:25 am

    Great to hear that, Dan! You might want to check out our forms if you need anything else later :)

  11. 11FabianAug. 26th, 2006 at 1:42 pm

    Thanks, Dan!

  12. 12mNov. 1st, 2006 at 1:07 pm

    Mm, the first step (fixboot) doesn't seem to work...

  13. 13Computer GuruNov. 1st, 2006 at 4:19 pm

    What error do you get?

  14. 14Jan from BEJun. 10th, 2007 at 8:19 pm

    Eternal thanks for the fdisk /mbr trick !

  15. 15chamroeunAug. 13th, 2007 at 1:01 pm

    Hello everyone! i have problems with my Hard Disk(SATA 80GB). i can't boot into windows.i try to boot from xp's cd,but after xp's cd shows configuration hardware, it's not work,no sth show on my screen. i try to use other program like Active@ partition,fixMBR,...it still not work! anyone can help me? thanks

  16. 16Hen3ryFeb. 11th, 2008 at 11:09 am

    System: 1 x 80 GB (WinXP + sundry documents) 1 x 80 GB (empty) 1 x 500 GB (various documents, .jpgs, .mp3s, etc., etc.) Problem: Computer froze, refused to load on re-boot, beyond WindowsXP splash screen. (probably a Boot Sector virus) Solution: Install WinXP onto second 80GB Current system: 1 x 80 GB (WinXP + all progs, documents) Further problem: Computer, now working fine, refuses to read 500 GB, claiming it to be unformatted. Computer will read first 80 GB, for pulling off data, files, although some of these have been damaged. Virus scan (avg v. 7) of first 80 GB reports negative. It looks like the Boot Sector of the 500 GB has been damaged, but how do I repair this without affecting the Boot Sector of the current 80 GB? Simple terms: I am a layman with a little knowledge.

  17. 17VJApr. 23rd, 2008 at 4:14 pm

    Nice... going to try it... however do i have to do a repair installation, since i had an expert install drivers etc etc and fix my computer just before. I don't want to replace C:\Windows with a repair installation literally dumping all that work. Are there any alternatives?

    Also can Xfdisk be booted from a CD since my laptop doesn't have a floppy drive?

  18. 18VJApr. 23rd, 2008 at 5:40 pm

    Ok... edit to the second point i can boot Xfdisk from a CD however which version were you using. Since i see no Enter and then rewrite MBR option or anything???

    Any help?

  19. 19VJApr. 23rd, 2008 at 5:57 pm

    Haha fixed that too... MBR rewritten completely now.

    Any change for the installation... alternatives?

  20. 20VJApr. 23rd, 2008 at 6:45 pm

    Hmmm... for Linux installation i went to www.gentoo.org but which one do i get?

    By the way is this sort of inactive now (i mean the forum)?

  21. 21Mahmoud Al-QudsiApr. 24th, 2008 at 1:08 am

    This entire method is more-or-less deprecated.

    The new method: http://neosmart.net/wiki/display/EBCD/Repairing+the+Windows+Vista+Bootloader

  22. 22DarclearNov. 24th, 2008 at 6:40 pm

    I am having the issue mentioned in part 1 of this article. But in trying different software to recover the data, I lost my partition tables. "Testdisk" says MBR and backup are bad and do not match. Wouldnt repartitioning for the linux install corrupt all the data? And yes, I am still running xp. My machine isnt powerful enough for vista.

  1. 1 Ramblings of a Computer Guru » Blog Archive » Repairing a FUBAR’d Master Boot Record Pingback on Dec. 4th, 2005 at 5:36 pm
  2. 1 Repairing a FUBAR’d Master Boot Record at Ramblings of a Computer Guru Pingback on May. 30th, 2006 at 8:10 pm
  3. 1 completely remove grub: Web Search Results from Answers.com Pingback on Jul. 6th, 2006 at 8:35 pm
  4. 1 uninstalling freespire - Freespire Forums Pingback on Aug. 15th, 2006 at 3:39 am
  5. 1 rewrite mbr w2k - Web - WebCrawler Pingback on Mar. 24th, 2007 at 5:50 am
  6. 1 Gentoo Forums :: View topic - Failed Install of Win2k Renders Gentoo Unbootable Pingback on Aug. 17th, 2007 at 5:29 pm

Leave a Reply