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)
·         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.


  1. You are amazing! Messed with this for like 3 hours and your post is short and to the point. Thank you!!

  2. Brilliant! I did a v2v (form ESXi to MS) of a 2008 DC using imaging software and ended up with this exact issue, after trying just about every recommendation around, this is what resolved it for me,

    It turns out i had the same issue with DFSR and WSUS DB's, renaming the logs sorted them out too.

    It also seemed to kill all my exchange DB's which didn't appreciate having the logs removed, so in the end I rolled back and looked at other options to migrate

    Your post was very helpful in my research, thanks for your post.

  3. Hi, I have several files in that folder, do I rename all of them to *.log ? kindly let me know I am stuck with it at the moment.

  4. Hi,

    Rename all *.log files to (for example) *.log.old


  5. Hi,

    thanks for the quick responce, I have done that I renamed all the *.log to log.old, but still I am getting the following error & it reboots.

    is there any thing else that I should go thru?

  6. I am getting the following error..

    NTDSUTIL: activate instance NTDS
    ACTIVE instance set to "NTDS".
    NTDSUTIL: files
    ***Error: Operation not allowed because AD DS/LDS files are in the restored state.
    restart the directory instance to finalize teh restore process.

  7. Yes I did but that dint help, now I have got it up and running, I changed the date to an older date in the BIOS & it booted normaly.

    Thank You.

  8. Guys, can you help me, on SBS server 2013, I am have:
    c00002e2 Directory Services could not start because of the following error: a device attached to the system is not functioning
    I have tried your solution, and have back dated as well but still the goes past windows logo and gives bsod...please advise

  9. Great post Martijn. I just spent 3 weeks with Symantec Tech support on this issue with a Bare Metal recovery on a Windows 2008 Domain Controller. They found your article and intend to include the info in their white papers on this error. We followed your steps and the DC came up without an issue. I didn't have to do the backdating because my recovery image was new enough. I have found I only have had to back date when my recovery points are much older than the the current date in the bios. Thanks again for sharing your knowledge.

  10. Great post Martjin.
    Thank YOU!!!

  11. Wow! I can't believe it! it worked!! Thanks Martijn

  12. Thank you!
    I've been fighting with this server for 13 hours over two days. Something was wrong with my backup, so a restore was out of the question, and I was starting to get desperate. This had things up and running in a matter of minutes!

  13. I am getting the following error.. plz help

    C:\Users\Administrator.WIN-84MMK5VIFBJ>esentutl /g c:\Windows\NTDS\ntds.dit

    Extensible Storage Engine Utilities for Microsoft(R) Windows(R)
    Version 6.1
    Copyright (C) Microsoft Corporation. All Rights Reserved.

    Initiating INTEGRITY mode...
    Database: c:\Windows\NTDS\ntds.dit
    Temp. Database: TEMPINTEG1092.EDB

    Checking database integrity.

    The database is not up-to-date. This operation may find that
    this database is corrupt because data from the log files has
    yet to be placed in the database.

    To ensure the database is up-to-date please use the 'Recovery' operation.

    Operation terminated with error -550 (JET_errDatabaseDirtyShutdown, Database was
    not shutdown cleanly. Recovery must first be run to properly complete database
    operations for the previous shutdown.) after 4.625 seconds.

  14. worked like a charm.

  15. I moved all log files to another folder and no dice.

  16. Ran per MS support
    ntdsutil /p "c:\windows\ntds\ntds.dit"

    1. edit
      Ran esentutl /p "c:\windows\ntds\ntds.dit"

    2. Tried all the other's and did not work, but this did. You Sir/Maam are a life saver.

  17. Wonderful post...thanks!!!

  18. Thank you for sharing! Saved me many hours of painful troubleshooting!

  19. What a lifesaver!!! This worked on my SBS 2008 server.

  20. Vous m'avez sauvé la vie. Merci, Merci et encore merci

  21. it just works!!!
    -SBS 2008 Symantec system recovery image restore
    Thanks a lot

  22. Thank you. Great Post!

  23. Martijn,

    het werkt, geweldig, ben een paar dagen bezig geweest als disaster recovery test Super !
    this was Dutch

    now in English:
    It is working, very good, i tried a disaster recovery test and it costed me a couple of days to get here..



  24. Great post,
    thank you for your help!

  25. Cara... você é incrível!!! Muito Obrigado.
    Hey Man... You're amazing !!! Thank you veru much.

  26. You are a god send. I spent 12 hours trying to solve this. I was seriously thinking about uninstalling and re-installing Active Directory because someone said that's what he had to do. Thank you soooo much.

  27. Great help Thanks!

  28. Thank you so much! With your help I've got it running in 10 minutes!

  29. Holy mackrel. You guys are the bomb. I've been struggling with a failed hard drive on my 2008 server. Single server, main and only ADC in the domain. I restored from a windows backup from March, 13 2013 (was the only one I had). could not get it to boot. Spent 3 days trying everything I could think of in Windows RE. SFC, bootrec, startrep, nothign worked. I could boot into SRM though so I knew it had to be something. Finally set msconfig to stop rebooting on error and was able to see the BSOD error. That led me here. Rolled back the bios date to 3/14/13. worked! Changed the date in Windows to the correct date. Gracefully shut down. Booted back into BIOS. Corrected date. Rebooted. I'm in business.

  30. I love you!!!!!! THANK YOU!!!! how come you managed to do this in a straight forward, straight to the point manner, yet Microsoft go right around town with all their rubbish unhelpful answers! Ive lost 13 hours today, could of been more if it wasnt for you!!! THANKS AGAIN!!!

  31. You Win, Perfect!!! Thank You!!!

  32. Mitico! Mitic! A big thanks to you!!!

  33. Worked wonders. Thanks a mil

  34. Thanks a lot! works perfect - greetings from austria

  35. Thanks from Mexico. I have hard time trying to make this work but it was so fast with the steps.


  36. Awesome! Thanks Martijn Westera! You're a life saver.

  37. Wow really Awesome blog its so informative for us,,Click on this link. BOOTMGR Missing in Windows 7 its can help to solve your bootmgr problem
    Thank you
    Aalia lyon

  38. Thanks a lot! works perfect SBS 2008

  39. Hey Guys, i go the same problem, but all of the above solutions didnt't work

    I tried

    BIOS time roll back
    log files rename

    Any other suggestions ?

    1. Evert, same issue. I had to do a restore from an old backup and got the same error. Thanks for posting this!

  40. Did you rename all *.log files in C:\Windows\NTDS folder and restart system?

  41. Can't login.
    There are currently no logon servers available to service to service the logon request.

    1. need change login to local account

  42. This info was very helpful. It fixed my issue, after trying everything I could think off. I learned my lesson: backup everything. Thanks

  43. Amazing article..
    it solve my problem +1

    Thank you very much.

  44. Worked for me, thanks!

  45. Un énorme merci !! Thanks !!!!!!!!!!!!!!!!!!

  46. Benjamin BeunckensApril 8, 2015 at 7:14 AM

    Thank you for sharing Martijn!
    It solved my issue too after restoring a 5 day old backup to dissimilar hardware.
    Note: The NTDS directory in my case only contained one log file and seemed hidden...

    Een blije Belg :-)

  47. Splendid Mate !! thanks a trillion
    SBS2011 initially restored from a backup image then BSOD, I was fuming!! then came across your blog

  48. Adding the many voices here, I will say that this issue was plaguing me for like 1 month!!! None of the other suggested solutions on the internet worked! Again my thanks for sharing your knowledge. Just glad that Google search has your blog page on the first page of the search results.

    Keep up the great work.

  49. I have to sing your praises too Martijn! My SBS2011 running on VMWare 5.5 suddenly crashed with the same BSOD. Your steps lead me right back online. There was only the one log file (edb.log) to rename on my system.

    Thanks for posting your solution.

  50. Thank you!!! Almost lost my main lab server

  51. Thank You Martijn! Just had a new client call me panicking saying their (now old) IT guy said their server was unrecoverable. This worked like a charm and now I'm their new IT guy. Thanks!

  52. Worked like a charm after hours of troubleshooting. Can't believe it was this simple, but thanks for sharing it otherwise it would have just been more wasted time.

  53. Beste Marijn, I could ´kiss´ you, my vm works again! Server 2012R2 DC as a demo and tomorrow the demo and it was the only DC stupid me. IT WORKS