While recently testing few scenarios in HyperV I somehow managed to corrupt one of my domain controllers in lab. LAB was based on Windows Server 2008 Datacenter. While rebooting server, server booted fine until the stage where I had to login into Windows.
Instead of getting login screen I got blue screen for fraction of a second, and then everything rebooted again.
In order to see what is the error, after rebooting when “Repair your Computer” appeared I choose:
(You can invoke recovery menu in Windows Server 2008 with F8)
Disable automatic restart on system failure
After that, instead of automatically rebooting on login screen I finally got to see the error
Error was: c00002e2 Directory Services could not start because of the following error: A device attached to the system is not functioning. Error status: 0xc0000001
After that I rebooted machine again and from Recovery Menu I choose
Directory Services Repair Mode
If everything is ok with your DSRM after some time you`ll get login screen on which you have to login to your local administrator account (domain services are not working, remember). At this stage you`ll need password which you setup for AD restore mode (password that you have to enter while setting first DC in domain)
Next step is to open command prompt (with Administrative permissions) and enter
Ntdsutil.exe
After that
Activate instance ntds
And at last
files
If there is a problem, you`ll see following error
Could not initialize the Jet engine: Jet Error -501. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113
If you get this error, you should navigate to C:\Windows\NTDS directory.
There you should rename all log files to log.old or whatever you like. We are renaming files so that they could be recreated.
Reboot after renaming log files.
After reboot my server booted normally and AD services were available.
If your server still doesn`t work try this (repeat procedure and go to DSRM):
esentutl /p “c:\windows\ntds\ntds.dit”