Bootsect.exe Modifies the Bootsector Not the MBR!!

We've noticed a lot of people posting questions both in our support forums and in the Windows Vista newsgroups having issues getting bootsect.exe to do their bidding. Bootsect.exe is a command-line utility that ships on the Windows Vista DVD intended to repair a non-booting Windows Vista install - except it doesn't always seem to work.

The problem that most people seem to be having can be traced back to single, simple fact: bootsect.exe does not modify the MBR: it only fixes/repairs the bootsector of your Windows Vista partition. The MBR is like a "global bootsector" that tells the BIOS where in the hard-drive it should look for a bootloader. The bootsector, on the other hand, is like a partition-dependant MBR - each operating system can have its own bootsector to tell your system how to boot it.

The source of all this confusion is that during the Longhorn/Vista beta program, quite a number of builds were shipped with a version of bootsect.exe (originally dubbed `fixntfs.exe`) that modified both the MBR and the bootsector.

However, in the Windows Vista RTM build and Longhorn Server builds following that, bootsect.exe is a command-line utility used to repair the bootsector and only the bootsector - it won't get your MBR to use the Vista BCD/Bootmgr. In order to do that, you'll have to boot from the Vista DVD | Repair Options | Command Prompt.

bootrec.exe /fixmbr
bootrec.exe /fixboot
bootrec.exe /rebuildbcd

Bootrec.exe is an "all-in-one" boot-repair tool that can only be accessed and run from the Vista recovery console.  The first command rebuilds the MBR to use the Vista boot manager. The second does the same thing as bootsect.exe and tells the bootsector where to find the BCD bootloader (\bootmgr). The final command rebuilds the BCD data from scratch and is highly useful when recovering a borked Vista partition.

EasyBCD also has options to perform each of these steps from within Windows. After installing EasyBCD, you can rewrite the MBR and the bootsector simultaneously by using the "Manage Bootloader | Reinstall Vista Bootloader" option. EasyBCD can also rebuild the BCD store and the entries in it (while EasyBCD is running from within both Windows Vista and other versions of Windows) from the "Diagnostics | Reset BCD Data" setting.

The moral of the story is simple: when attempting to use a utility, make sure to research the latest version before doing anything mission-critical. And the next time you're developing an operating system and decide to switch the core functionality of a certain tool, be sure to document what you just did so this kind of thing doesn't happen! =)



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

12 Responses to “ Bootsect.exe Modifies the Bootsector Not the MBR!! ”


  1. 1EmanuelAug. 16th, 2007 at 12:47 am

    OM*G I LOVE YOU! the bootrec.exe command saved my computer from a vicious GRUB error 21 XD you got me hugging and kissing my laptop! ^_____________________________________________^ <3<3<3<3<3<3

  2. 2DanAug. 28th, 2007 at 2:34 pm

    Same here, the Bootrec.exe command fixed my Grub error.  Thanks.  I do notice though that my computer now lags a bit before it displays the boot menu list but as long as I can access them, I'm fine with it.

  3. 3smokerDec. 13th, 2007 at 9:34 am

    it also helped me to fix a boot virus

  4. 4SnowmanFeb. 24th, 2008 at 9:20 pm

    As a boot virus - do you mean Windows Vista? ;)

  5. 5CiaranMar. 14th, 2008 at 12:13 am

    many, many thanks, after working on installing dual boot vista/xp; with your info' got the pc working again, just before the family were going to complain bitterly :-) Ciaran

  6. 6mcekMar. 17th, 2008 at 8:06 pm

    Thanks! After removing Ubuntu as the second boot Grub went blind. The GUI recovery from Vista install DVD said "no problems found" - uselessss. You saved me.

  7. 7KrestonMay. 5th, 2008 at 8:15 pm

    Boy i hope you can help me here. I ran your prompts from the vista cd and i get the first two to fun without problem. the third gives the following:

    bootrec.exe /rebuildbcd scanning all discks for windows installations. please wait.... successfully scanned windows installations. total identified windows sntallations: 1 [1] c:\windows add installation to boot list? YES

    The requested system device cannot be found.

    Any help would be greatly appreciated!!!

    when i try to boot normal i get a Boot\BCD before anything but the bios loads.

    Thanks!!

  8. 8Mahmoud Al-QudsiMay. 5th, 2008 at 8:34 pm

    Follow the instructions at http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD to reset the BCD, getting rid of all boot-related problems.

    If you have any further questions, please open a thread at http://neosmart.net/forums/ for support.

  9. 9jaclazMay. 17th, 2008 at 5:14 pm

    Just for the record, the misunderstanding could also be due to the fact that there is an article: http://technet2.microsoft.com/WindowsVista/en/library/49ded4da-b66f-4b42-9563-04c218a1a6ac1033.mspx?mfr=true

    that misrepresents at first sight what bootsect.exe does, using the terms "master boot code" for the bootsector code: Bootsect Command-Line Options

    Bootsect.exe updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR. You can use this tool to restore the boot sector on your computer. This tool replaces FixFAT and FixNTFS.

    Though accurate in the sense that it makes the distinction between the "boot code part" (which is changed by bootsect.exe) and the "volume data" (which is left unchanged by bootsect.exe) using the "master" adjective to describe the "boot code" probably creates the misunderstanding.

    jaclaz

  10. 10sircheelJul. 25th, 2008 at 6:53 am

    x:\sources>bootrec.exe /fixmbr The operation completed successfully.

    x:\sources>bootrec.exe /fixboot This one takes a lot of time where the cursor keeps on blinking. What should be the expected message for this one?

    I followed the steps on this link: http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD

    BUT I got this error: x:\sources>bootrec.exe /fixmbr The operation completed successfully.

    x:\sources>e:\boot\bootsect.exe /nt60 all /force 'e:\boot\bootsect.exe' is not recognized as an internal or external command, operable program or batch file.

    Anyone can help me what to do next?

  1. 1 Bootsect.exe Modifies the Bootsector Not the MBR!! at The NeoSmart Files Pingback on Aug. 7th, 2007 at 2:35 pm
  2. 1 kanunt about fixboot Pingback on Aug. 25th, 2007 at 8:29 am

Leave a Reply