Wednesday, January 23, 2013

STOP: c00002e2 Directory Services could not start

After a hardware problem (storage) in my virtual lab environment my Windows 2008 R2 Domain Controller VM did not start. When booting the VM I got a BSOD with a STOP error:

STOP: c00002e2 Directory Services could not start because of the following error: a device attached to the system is not functioning.
Error status: 0xc0000001.

Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.

This was my only Domain Controller and no backup so I had to solve this problem.

Troubleshooting steps:

1.    Boot into Directory Services Restore Mode (F8)
2.    NTDSUTIL:
·         activate instance NTDS
·         files
·         Error: Could not initialize the Jet engine: Jet Error -501. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113
·         quit
3.    ESENTUTL /g C:\Windows\NTDS\ntds.dit
·         ESENTUTL result: successful (no DB corruption)
4.    ESENTUTL /p C:\Windows\NTDS\ntds.dit
·         ESENTUTL result: successful (no DB corruption)
5.    Event log:
·         Error 1003: Active Directory Domain Services could not be initialized. The directory service cannot recover from this error. Restore the local directory service from backup media. Error value: -501 JET_errLogFileCorrupt, Log file is corrupt
·         Error 465: NTDS (2156) Corruption was detected during soft recovery in logfile C:\Windows\NTDS\edb.log. The failing checksum record is located at position END. Data not matching the log-file fill pattern first appeared in sector 6697 (0x00001A29). This logfile has been damaged and is unusable.
·         Error 454: NTDS (2256) Database recovery/restore failed with unexpected error -501.
6.    Rename edb.log to edb.log.old and restart system
·         Result: same STOP error

Solution to this problem: rename all *.log files in C:\Windows\NTDS folder and restart system.