Monday 2 July 2012

Recovering a Windows 2008R2 server with a dead motherboard

Background

Earlier this week our Windows 2008 R2 based domain server started having random crashes and then finally it would not even restart to the BIOS screen.

We have regular backups so we were not unduely worried and thought that this would be an ideal time to update the server hardware especially as we didn't have any hardware that was remotely similar to the existing server.

Method

My first attempt was to make a copy of the disk (all the partitions using Clonezilla) and the try and boot the new hardware from this copy. Unfotrunately all that happened was the monitor would flash and the machine restarted to the recovery options screen. It didn't seem to matter what options I selected it made no difference.

Next I tried booting to DSRM and restored the server with exactly the same result!

Finally, I copied the disk again and this time I used the information I found after searching the internet some more in Mark Minasi's forum. He has a lot of very interesting information in his forums for sys ops and I should have remembered to chek there first. His descriptions are usually much much better than Microsofts.

It turned our all I needed to do in the recovery console was:

  1. do bcdedit /v to get the GUID of the OS entry you're booting.
  2. With that guid, type
    bcdedit /set {FILLINTHEGUIDHERE} detecthal on
  3. Ran regedit
  4. Navigated to HKLM
  5. Selected File, Load Hive (Note: Must be under HKLM first, or this option will be greyed out)
  6. Navigated to C:\Windows\System32\Config\SYSTEM
  7. Loaded hive HKEY_LOCAL_MACHINE (which mounts as a sub-hive)
  8. changed Restored_HKLM\ControlSet001\services\msahci\Start to 0
  9. Select File, Unload Hive (may need to select the hive node in HKLM)
  10. Restart

And it WORKED. All I had to do now was install some missing drivers off the new computers CD and re-activate the licence.

Conclusion

The steps are very simple once you know how. The hardest bit of this whole thing was actually getting the information.