Need a Server? Build it in the cloud for free

       

Server 2008 R2 or Windows 7 System Will NOT Boot After Making Changes To Boot Manager Using BCDEdit

I messed up.  It happens to everyone from time to time.  In my case, I was playing around with my system boot manager because I wanted to setup Boot To VHD.  Well being tired and not thinking to clearly, I made the changes to the {current} boot item instead of the new one I had just created.  You guessed it… After making this mistake my machine would no longer boot.  Since it is Saturday late afternoon and I have to be on stage in Boston on Monday, I need to fix it NOW!

I had two options…

1) Restore from backup: Yes, I have a backup of my entire machine from just a few days ago.  However, since then I have added some 20 virtual machines to this windows Server 2008 R2 machine and I really do not want to do that again.   If I have to go this way, It is going to be a very long weekend.

2) Figure out how to fix my screw up:  This is the option I chose and I am glad I did.  After about 30 mins of playing with it, I got everything back up and running.  Add another couple hours to create this post for you and I am ready to get back to work.

I am not going to bother telling you all the things that I tried that did not work,  it is safe to say that I got pretty familiar with the BCDEdit tool using the /? key :)   I also tried the automated repair but the first time I tried it I had several drives plugged into the system and the repair did not work so great.

You can find details of the BCDEdit.exe tool here:

Bcdedit.EXE  – I did not find this one particularly useful

BCDEdit.EXE Command-Line Options –  I am hopeful as the Windows 7 and 2008 R2 Product Releases to General Availability, that the documentation will get better!

I could not find any good resources for the tool (other than the /? for help on the tool).  There is a Microsoft site on BCDEdit but I found that link to be pretty useless because the word docx requires a password which I do not know.  I will see about getting that fixed.

However, I will share what did work so you do not have to struggle with it.

I disconnected all but my boot drive and DVD drive. I booted from a Windows Server 2008 R2 DVD (if you are on Vista or Windows 7 or Server 2008, use that DVD instead). While it was on the screen asking me what language I wanted I pressed Shift-F10 (sorry no screenshot, will try to add one next week when I have more time). This dropped me to a command prompt.  From the command prompt, I browsed to see what my drive letters were and what files I had.  The DVD for me happened to be the X drive.  I drilled down on my cd to the Sources folder then the Recovery Folder and I found an executable called StartRep.exe (hum, that is interesting… Let’s see what it will do)  I ran the file, it took about 20 seconds to scan my machine looking for problems and told me that if the problems were fixed, my machine would boot after doing a restart.  I restarted my machine and… OUTSTANDING my machine was booting normally.  Deep breath and sigh of relief.  Simple troubleshooting and I dodged a bullet.  So the complete path to the file for me was x:\sources\recovery\StartRep.exe.  I assume StartRep.exe stands for Start Repair.

It worked wonders for me and I can tell you that I LOVE SERVER 2008 R2 AND WINDOWS 7!

I could now get into my machine but my hypervisor would not boot any of my VM’s (major bummer).  I was getting Event ID 14050 error messages. One more thing was needed.  Because this is a Hyper-V machine I needed to tell the boot manager that it is using a hypervisor.  From an elevated command prompt, I had to run the following…

bcdedit /set {current} hypervisorlaunchtype auto

Then POWER OFF AND UNPLUG the machine (not just restart)

I left it off for a minute, booted it back up and fired up a couple VM’s… SUCCESS! 

I am a bit particular because I noticed that the description of my boot was now “Windows Server 2008 R2 Enterprise (recovered)” and I did not want that so I needed to make one more change…

bcdedit /set {current} description “Windows Server 2008 R2 Enterprise” 

This renamed the boot item and I now believe I am done!  I ran BCDEdit again and all looks good.

If you want training on BCDEdit check out… TechNet Unleashed- The Microsoft Virtualization Tour… Registration OPEN!.  If it is already closed by the time you read this, check my blog for the complete session recording after the series is complete.

Just in case you need it, after fixing my machine, I printed out the BcdEdit Details…

The TEXT Version…

C:\>bcdedit

Windows Boot Manager
——————–
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
path                    \bootmgr
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {3938319b-a727-11de-99f0-d2ca60b37081}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
——————-
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2 Enterprise
locale                  en-US
recoverysequence        {3938319f-a727-11de-99f0-d2ca60b37081}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {91dd3e04-b052-11de-8ed0-806e6f6e6963}
hypervisorlaunchtype    Auto

Graphic Version…

BCDEdit

Here is what the BCDEdit looks like on my Windows 7 Machine that is setup for dual boot with the second boot partition being on a separate hard drive.

The text version…

C:\>bcdedit

Windows Boot Manager
——————–
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {fdf03d8b-19b0-11de-98ce-001c2512ad0f}
displayorder            {fdf03d90-19b0-11de-98ce-001c2512ad0f}
{current}
toolsdisplayorder       {memdiag}
timeout                 15

Windows Boot Loader
——————-
identifier              {fdf03d90-19b0-11de-98ce-001c2512ad0f}
device                  partition=D:
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {fdf03d91-19b0-11de-98ce-001c2512ad0f}
recoveryenabled         Yes
osdevice                partition=D:
systemroot              \Windows
resumeobject            {fdf03d8f-19b0-11de-98ce-001c2512ad0f}
nx                      OptOut
hypervisorlaunchtype    Auto

Windows Boot Loader
——————-
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {dfb74341-6571-11de-8673-002269c69093}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {fdf03d8b-19b0-11de-98ce-001c2512ad0f}
nx                      OptIn

The Graphic Version…

image

I hope if anyone out there makes the same mistake as me, you find this post and can fix it pretty easily.  Once I get my Boot to VHD working (After Monday) I will do a Step By Step post on that process and put a link here.

This entry was posted in Uncategorized and tagged , , , , , , , by Dan Stolts ITProGuru. Bookmark the permalink.

About Dan Stolts ITProGuru

Dan Stolts (The "ITProGuru") is a technology expert who is a master of systems management and security. He is proficient in many Microsoft products especially in the server area (Windows Server, System Center, Exchange, SharePoint, Virtualization, Etc) and holds many certifications including MCT, MCITP, MCSE, TS, etc. Dan is currently specializing in System Management and Security and is also very passionate about virtualization technologies. Dan is and has been a very active member of the community. He is president of Boston User Groups, Founder of Virtualization Group Boston, Founder of North East Leaders and serves on many IT Community group boards. He is in the process of writing his first book on building technology communities. He is a believer in social networking and can be reached on twitter @ITProGuru. He has participated in many non-technology community groups such as: Rotary Club, Lions Club, local Chambers of Commerce and is a mentor for the local high schools. Dan is an enthusiastic advocate of technology and is passionate about helping others. Dan's lifelong passion has been and continues to be to help and teach others!

Leave a Reply