From #Windows: Recovering a Windows Server 2008 R2 with "BOOTMGR is missing" error

By | October 2, 2010

I made a major boo-boo mistake, inadvertently marking a non-boot partition as Active on my primary development server making it un-bootable and with no recovery image (doh!) a simple error could have been a catastrophe. On a sidebar, this error is just another reason to use the awesome BGINFO as it probably would have stopped me from doing what I was doing thinking I was in a virtual machine… 😉

In the old days, reloading Windows was not so much of a drama, but now with Hyper-V “importing” virtual machines that are not “exported” is a pain in the backside meaning that if you hose your host system, recovering everything can take a while.

Restarting the host server resulted in a “BOOTMGR is missing” error and a little shudder went down my spine.

I popped in the W2k8R2 DVD and (as I suspected) there were no available repair options, dropping into a command prompt, I tried to use DISKPART to mark the wrong partition inactive and mark the correct one active, but no dice.

I also tried from the prompt to rebuild the BCD with a “bootrec /rebuildbcd” but again, no dice.

Despair almost set in until I remembered something that a chum had told me about (if I ever remember who it was I will for sure credit them!) where he had used a Windows 7 x64 DVD to boot a non-booting Windows 2008 Server R2 server as the boot loading elements are essentially the same and Windows 7 comes with a user friendly recovery tool as part of the install/boot process.

Quickly burning an MSDN DVD image I booted the server off the DVD and after the requisite location choices dropped into repair mode and lo-and-behold Windows 7 (god bless it) noticed that something was awry with my bootable partition, offered to fix it, rebooted once, did some more silent magic and on the next reboot; presto! Windows Server 2008 R2 came back.

Once the server was back I knew a little bit of tinkering with the boot configuration data store would be required using bcdedit, so I opened an elevated command prompt and entered:

bcdedit /set {current} hypervisorlaunchtype auto

(note: this assumes there is only 1 bootable option, you may need to insert the actual id instead of “{current}” if you have more than one and are following this post in a cold sweat!)

then a quick check with:

bcdedit /enum

just to check that the hypervisor launch was indeed set to auto, and for the second time in as many minutes; hey presto! W2k8 is running smoothly and with the hypervisor underneath ready for me to be spinning up virtual machines until bedtime.

Now wouldn’t it be nice for Microsoft Windows Server Engineering Group to add some of the Windows 7 friendly goodness to Server 2k8 R2? I know that server admins know better and don’t need any help but wouldn’t it just be nice for the help to be there!

Just a thought!

Please note that if you stumble on this post and use it to recover your own system, you do so at your own risk and no warranty of any kind is expressed or implied in this blog posting; it’s just me sharing my experiences!

8 thoughts on “From #Windows: Recovering a Windows Server 2008 R2 with "BOOTMGR is missing" error

    1. Jas

      This saved me hours.Been trying loads of other stuff before i discovered this.. Legend.. Many thanks.

  1. Carl James

    Thank you! Thank You! Thank You! Worked like advertised and save tons of time!

  2. Joe

    Pro’s: This does indeed work and is a very very good and quick os recovery tip. And a personal thanks to Seb here too. It did help me and save me quite a bit(lot) of restore work and panicking as I did the same as you.

    Slight Con’s: Pending on your original environment it may indeed stop some of your services and/or reset settings in Management Console. After the original “phew” when I got the os back up again I have since not been able to start Management Console or Services.msc – either through windows or command prompt – to try to get other specifc services back up and running. Windows event logs also seem to repeatedly come up with cannot access mshtml.dll and MMC.exe errors.And I cannot seem to re-register this .dll file in either the System32 or Sys64Wow folders so far and it complains of a conflict.

    If I do have any joy, or find proof this is totally unrelated I will post back. Either way thanks again, but I felt I should add the caveats…

    1. Joe

      Hi Again Seb. I eventually fixed the mshtml.dll error, which was preventing me opening services and other web development tools.

      After doing your steps, I also had to uninstall the latest version of internet explorer 9.0 through control panel – (Programs) Uninstall a program – latest updates (under windows) and reboot my pc. On the reboot it then returns you to the previously installed version of IE9. This presumably adds/registers a different mshtml.dll file to the registry. Now services and all dev tools work fine.

      I’m guessing the Windows 7 install dvd recovery tool – although restoring 2008 R2 OS – somehow overwrote this file and the IE version…

  3. Marco

    in a different environment (VMWare), made just your same mistake, but was so dumb I couldn’t even remember I had clicked on the wrong menu and marked the partition Active. The machine was rebooted days later and panic spread.
    You steered me in the right direction, and got me thru. Luckily for me the DISKPART tool of the cmd prompt in the W2008R2 DVD ws enough: just marked Partition 0 as active and rebooted…
    Voilà my five cents

  4. Francois

    OMG!!!!! you are the MAN! It works. Plus it was our exchange server. Phew!!!

    1. sebmatthews Post author

      Glad the post was useful – phew indeed on not losing your EX server!


Leave a Reply

Your email address will not be published. Required fields are marked *