Microsoft Windows 2008 R2 – Server Recovery

Microsoft Windows

After a power cut one of our Windows 2008 R2 VMs was dead, even though it was cleanly shutdown by the UPS something must have happened and it would not boot.

When booting the VM it would just boot straight into the Windows Recovery tool, this was not good news. 

Running any commands against the disk said that the Windows installation was not found. This made it seem that there was a rather major issue and the server would need to be recovered from scratch.

Running into safe mode or last known configuration made no difference.

The Resolution

I was lucky, hopefully these instructions will help you, and I was able to get the server up and running again.

1. Stick in the Windows 2008 R2 CD, and boot off it.

2. Open a command prompt in the recovery console.

3. Run the following commands:

Bootrec /RebuildBcd

4. If the above doesn’t work do this:

Bcdedit /export C:\BCD_Backup

ren c:\boot\bcd bcd.old

Bootrec /rebuildbcd 

(You could also try running the fixboot and fixmbr commands, here as well, I did although, I don’t know if they made any difference!)

Its also worth running some chkdsk commands too just to ensure that the disk file system is okay, and if not fix the errors.

sfc /scannow /offbootdir=c:\ /offwindir=c:\windows

The above command should of worked in my case it did not because the registry was corrupted.

5. Now reboot the server and wait for it to boot up, in my case I now got the error:

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

File: \Windows\system32\config\system

Status: 0xc000014c

Info: Windows failed to load because the system registry file is missing, or corrupt.

ENTER=Continue ESC=Exit 

6. Oh dear, the fix for this was to find the registry backup file that is stored on the system, assuming this is fairly recent and not corrupt you can copy to replace (making a backup first of the original file), ensure you are booted into Recovery Mode. Then in a command prompt change to your system disk, normally C:\.

Then run these commands, to backup the existing (corrupt) registry file, then copy the “regback” (hopefully ok) version over the top.

cd c:\Windows\system32\config

ren SYSTEM SYSTEM.BACKUP

copy regback\SYSTEM SYSTEM

7. Reboot and remove the windows CD, in my case the server rebooted ok. Its worth noting that if you installed any new software inbetween the last “regback” version of the registry you may need to remove and reinstall it.

Leave a Reply

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