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.

52 comments:

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

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  4. Hi,

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

    Martijn

    ReplyDelete
  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?

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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 same....it goes past windows logo and gives bsod...please advise

    ReplyDelete
  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.

    ReplyDelete
  10. Great post Martjin.
    Thank YOU!!!

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

    ReplyDelete
  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!

    ReplyDelete
  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.

    ReplyDelete
  14. worked like a charm.

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

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

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

      Delete
  17. Wonderful post...thanks!!!

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

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

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

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

    ReplyDelete
  22. Thank you. Great Post!

    ReplyDelete
  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..

    thanks,

    Pieter

    ReplyDelete
  24. Great post,
    thank you for your help!

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

    ReplyDelete
  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.

    ReplyDelete
  27. Great help Thanks!

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

    ReplyDelete
  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. Rebooted....it worked! Changed the date in Windows to the correct date. Gracefully shut down. Booted back into BIOS. Corrected date. Rebooted. I'm in business.

    ReplyDelete
  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!!!

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

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

    ReplyDelete
  33. Worked wonders. Thanks a mil

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

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

    Regards

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

    ReplyDelete
  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

    ReplyDelete
  38. Thanks a lot! works perfect SBS 2008

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

    I tried

    ESENTUTL
    BIOS time roll back
    log files rename

    Any other suggestions ?

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

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

    ReplyDelete
    Replies
    1. need change login to local account

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

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

    Thank you very much.

    ReplyDelete
  44. Worked for me, thanks!

    ReplyDelete