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 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! =)
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
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.
it also helped me to fix a boot virus
As a boot virus – do you mean Windows Vista? 😉
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
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.
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:
scanning all discks for windows installations.
successfully scanned windows installations.
total identified windows sntallations: 1
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.
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.
Just for the record, the misunderstanding could also be due to the fact that there is an article:
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.
The operation completed successfully.
*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:
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?
…and what do you do if you bought a pre-loaded laptop system with no Vista DVD? You don’t get a bootrec.exe. All you can do is restore the system to factory default, then spend the next two days recovering.
In that case, you download our recovery CD and use bootrec from there 🙂
I downloaded and burned the iso image. Under \boot there’s not bootrec.exe. All I find (on D:\boot) is:
you guys saved my day.
Thanks1!!!11oneone (just to express how thankful Iam)
I have had trouble with the MBR since I installed Linux (don’t know why, don’t care) as it wouldn’t boot because the MBR was corrupt, atlast I can fix this huge problem!!!?
Just for the record, this KB article at Microsoft says that bootsect WILL fix the MBR:
So even if you did do your research, you might still come up with the wrong information (straight from the horse’s mouth :)).
Whoever wrote that article doesn’t pay attention to the details.
The steps outlined in that MS KB *will* work since the MBR code for Windows XP and Windows Vista is the same (or at any rate, compatible) – so you just need to update the bootsector of the active partition… but that doesn’t mean they get the right to say that bootsect updates the MBR when it doesn’t.
Worse still, later down they claim bootsect does even more stuff it isn’t capable of.
First half of the sentence is flat-out wrong. Second half is correct, and refers to the bootsector.
Wrong. Bootsect doesn’t restore NTLDR, you have to put it on the right partition yourself. Using the /nt52 flag like they did restores the code that calls NTLDR instead of bootmgr to the bootsector, but not the NTLDR files themselves.
Netldr? it’s called NTLDR, and though it’s an executable file, it’s written in x86 ASM and doesn’t have a .exe extension.
I wonder how on earth this article passed Microsoft’s QA checks…. It’s far below the level of quality in other KB articles which are usually double- and triple-checked for accuracy and consistency.
Thanks for bringing this to our attention, btw. I’ve let MS know though.. hopefully they’ll fix it sometime soon.
Dude you are awesome… I was seconds away from nuking the grub monster. thank you very much!!!!!
What does it mean if you run
bootrec /rebuildbcd and it returns
“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.”
Does this mean that something is bunged up in the bootsector, not the MBR?
Marcus, got the same problem here
got a laptop that im trying to put WS08 on and it wont boot at all. Think it might have something to do with the laptop not allowing mbr to be written onto but no clues except that… plus the bios doesnt even show that option.
Spent several days on this and no luck, going crazy.. tried everything
I updated the bios, now it booted. Finito – stick a fork in me, im done.
I have the same problem as Marcus and Vingevam.
Going quietly crazy trying to find a solution. Any suggestions. Vingevam, you said you updated the BIOS. What settings did you specifically change?
then what’s bootsect /mbr mean?
The /mbr flag has been added in Windows 7, and this article only applies to Windows Vista (notice that it was published over 2 years ago!!)
Thank you very much, your tip just saved me from a lot of trouble! Gratefully thankful!
My problem is still unsolved. The OS (win7) is booted from a different HDD then the OS is on. Until now nothing could fix that. I wonder whether there is a fix out there at all.
If interested, here my post:
Feb. 2010 and your post is still saving people’s bacon! THANK YOU. Server 2008 x64, cloned partitions so I could reconfigure RAID, then couldn’t get the cloned system to boot. bootrec–the golden key.
I would like to say a hugh thanks, after many hours, and trying many things, this simple thing worked. For other people that may be having the same trouble, I was getting NTRDL file missing, push any key. Yes this was in Vista. As far as I was aware, there was no previous install of XP. And this seemed to occur after a update by windows. Can not figure out why it happened over night. So I hope this helps. Thanks again. JD
Thank you. Worked!!!
Great and precious article!!! Thx.
I want to mention that above won’t work if the Sata Device from where you boot is a higher Device then any other. No software or trick can fix it if device priority comes into play.
SATA 1 = Drive D
SATA 2 = Drive E
SATA 3 = Drive F
SATA 4 = Drive C
To fix it one must physically change the SATA cable from 4 to at 1 (optimally) to make it work. I want to let anyone know who has more then one or two HDD’s.
will this also work if i used easy bcd for dual booting Win 7 and OS x on my pc???
Re: Grub error
Seek and ye shall find.:)
You, sir, have saved me alot of pain and head thumping.
THANK YOU! I installed Ubuntu 10.4 on my laptop and put it in it’s own partition on my hard drive, but when I deleted the partition my computer wouldn’t boot to Windows 7, it went to Grub, so I changed BIOS to boot to my CD/DVD drive and put my Windows repair disk in, I followed your advice for the command line and now my computer boots to Windows 7, thanks for your help!
Thanks a bunch, didn’t know about that “bootrec” command. Helped me get rid of grub bootloader.
Will you f*king marry me?!
I’m tellin ya, 5 in the morning will really play with my head, and I know I would screw up my mbr by deleting my Linux partition, so I made a recovery disk to restore my mbr, but I could for the life of me get bootsec.exe to fix it, THANK YOU!
this resolved a ‘grub error 15’ that I received after trying to install linux on another partition when that install crapped out midway.
thanks for posting
Thank u very much bro…….it ws really helpful..
just in case someone is still looking for this. Theres an /mbr switch for the bootsect.exe.
@funtikar: Only on the Windows 7 version of bootsect.exe
Man , the bootrec utility save me. It worked for me on a Windows 7 partition, i fuc#$ed up my MBR with Acronis OS Selector ans this helped me! Thanks ! I booted with the Windows 7 Install CD and then the 3 simple steps and voila! Great!
Messing around on the home laptop with linux and botched things up. Wifey would have had my hide. You saved my backside. Thank you
Killer man killer worked for me thousand of thanks to you….thanks a lot.
This also works for Windows 7!!! It is a life SAVER!