Tuesday 4 June 2013

Recovering Windows Server 2008 R2 from \boot\bcd error

One of our new 2.5" 300GB 10K SAS drives failed, and I knew the immediate question HP support would ask was if the drive had the latest firmware applied, which it hadn't. So I downloaded and applied the firmware and rebooted, all seemed OK.

The next day the server had stopped responding to any windows commands, and upon a forced reboot the server displayed the follwing error as it was about to load the OS:

File: \Boot\BCD
Status: 0xc000000f


There are plenty of people who have had this problem, and the general consensus is that it can be resolved by completing a check disk on the windows partition. However the error even occurred when booting from the installation CD to try and repair windows.

We got past this by okaying and cancelling all the boot configuration data store (bcd), and driver errors. I managed to get to the command prompt to run a check disk, which found and fixed errors, but the server still displayed the error message and would not boot.

After a bit more research I found the following commands, which are also needed as the boot partition, boot record, and bcd need rebuilding.

BOOTREC /FIXMBR
BOOTREC /FIXBOOT
BOOTREC /REBUILDBCD
 
Following a reboot, the server will now boot windows.
 
There are also two virtual servers running on the server using Microsoft Hyper-V, which would also not start now. The error from Hyper-V was a bit generic that the hyper visor was not running. Because the bcd had been rebuilt it needed editing to start the hypervisor during boot time. The following command and a reboot fixes this issue.
 
bcdedit /set hypervisorlaunchtype auto