I had just walked away from my Windows 7 desktop after initiating a download of some VMWare software. When I came back to it about an hour later I was presented by a boot screen that said,
"Reboot and select proper boot device, or insert boot media in selected boot device and press any key."
This was all very interesting because I hadn’t done anything to reboot the computer. No power failures or anything like that had occurred. I’m not even sure what caused it to reboot. I seriously doubt that downloading the VMWare player had anything to do with my problem. 🙂
My computer is a home built tower with an ASUS P5Q-EM motherboard which was purchased on 2009-10-04, so it’s not very old! I was thinking “infant mortality failure” but I didn’t want to give in to a hardware problem just yet. I run a RAID 1 array using two Seagate ST3750640NS drives with Intel Storage Manager. I’ve been very pleased…until now!
From a h/w perspective, I went through several iterations of disconnecting disk devices on the inside of the tower to eliminate each device as a potential invalid boot source. I disconnected my CD and DVD drives, two external hdd trays and my USB card reader, just to make sure it wasn’t trying to boot off an invalid device. I also made several changes to the boot order to insure something weird wasn’t going on there. Same error.
So, I got the Windows 7 DVD and booted from it and went into the repair mode, which seems to be very similar to what Windows Vista offers. I let it perform the automatic startup repair. It reported to have found the problem and fixed it (no valid boot partition), but upon rebooting I was left with the same error. So, I started digging…
I first started by using the bootrec command line tool to attempt to repair the boot records. The process most people suggest is:
Bootrec /fixmbr
Bootrec /fixboot
Bootrec /scanos
Bootrec /rebuildbcd
If it doesn’t work, reboot, repeat the above steps and add
Bootsect.exe /nt60 all /force
and reboot again. This did not work for me, either. Additionally, the /fixmbr switch reported it worked correctly, but the /fixboot switch reported “element not found.”
This led me to the Nuclear Holocaust recovery process documented in the Neosmart wiki.
I then proceeded to go down the road of creating a new Boot Configuration Data file, which I had never done before. It seems like this is the replacement (since Windows Vista) for the boot.ini file and you need a special command line tool (BCDEdit) to modify it. That’s certainly easier…NOT!
Start by deleting the original bcd file (mine wasn’t there to begin with; neither was the \boot directory).
del C:\boot\bcd
I had to re-create the boot directory.
md boot
Create a new temporary bcd file.
bcdedit /createstore c:\boot\bcd.temp
Add an entry to it.
bcdedit /store c:\boot\bcd.temp /create {bootmgr} /d "Windows Boot Manager"
Now, import the temp file entry into the "real” BCD file.
Failure!!!
The store import operation has failed. The requested system device cannot be found.
bcdedit /import c:\boot\bcd.temp
More searching revealed that I should try setting the partition on which the bootrec exists to ACTIVE. Following the advice here, I used DISKPART to set the active partition.
—————————————Additional Actions————————————-
From cmd prompt:
DISKPART
LIST disk
SELECT disk #
LIST partition
SELECT partition #
ACTIVE (<< Marks the partition as active)
EXIT (Exits DISKPART)
—————————————Additional Actions————————————-
Then I could continue from the previous procedure of creating the BCD file.
bcdedit /set {bootmgr} device partition=C:
bcdedit /timeout 10 del c:\boot\bcd.temp
Now we have a clean, working Windows 7 bootloader. But we need to add a Windows 7 entry to it:
bcdedit /create /d "Windows 7" /application osloader
BCDEdit should return a message with a GUID (the big, ugly unique identifier in bold) for the newly-created entry, something like this:
The entry {c0dfc4fa-cb21-11dc-81bf-005056c00008} was successfully created.
A word of advice. Use the copy/paste features in the command window to copy the GUID assigned so you don’t have to type it over and over in the next steps. Do NOT use the GUID displayed here for representative purposes!
Again, you’ll need to use the value that BCDEdit returned, along with the drive letter for the drive that Windows 7 is installed to, and substitute those values into the BCDEdit commands shown.
bcdedit /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C:
bcdedit /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:
bcdedit /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} path \Windows\system32\winload.exe
bcdedit /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} systemroot \Windows
And, last of all, tell the Windows 7 bootloader to boot the new entry by default:
bcdedit /displayorder {c0dfc4fa-cb21-11dc-81bf-005056c00008}
After completing all these steps and rebooting, I still ended up with a problem.
“Bootmgr is missing”
To repair this problem, I again booted from the Window 7 DVD and went into the repair mode. I allowed it to automatically repair the boot problems. The repair tool reported that the “boot manager is missing or corrupt” and attempted to repair the problem. After rebooting, it worked! Everything was back to normal.
Hope this helps others out there!