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.

82 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
    Replies
    1. Your hint of setting the date back, just helped me.

      Thank You

      Delete
    2. I spend the whole day today following so many procedures until 12:00 AM. Follow all the procedure for this error and it didn't help. We started getting this error when I did a recovery from an old backup. And your simple answer solve my delimma. Set the date back to the same date of the backup. You are a saviour for me. A very simple solution. So out there, try first the back date procedure before you follow those publish complicated steps. Thank you once again now I can sleep.

      Delete
    3. Two Entire Days. And your post solves the problem in 30 seconds. It is beyond belief that Microsoft has not clearly documented this issue. Thank you so very much, man.

      Delete
    4. Same scenario for me. I restored an encrypted server from a 9 month old tape.
      Set the date back to the date of the backup and we're up and running.
      THANK you so much.

      Delete
    5. yep same for me. restored 1 year old backup onto test bed and got this error. logged directly into DSRM and adjusted time back to original date of backup and booted straight away!

      Delete
    6. THANK you very very much. Changed the date and booted normal.

      Delete
    7. And again in 2021. Three days for me. BSOD searches said it was AD database corruption, but changing the BIOS date to the data of the backup fixed it. It's a great shame this simple solution doesn't find its way to the top of Google searches.

      Delete
    8. 2021 and works for me too!!!, the backup was with macrium reflect.Best solution!!

      Delete
    9. Dude, you're the man. Was recovering an old backup. Ran into the same issue - your fix worked. Thank you - save me crap-load of time and frustration.

      Delete
  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
    2. Tried all the other's and did not work, but this did. You Sir/Maam are a life saver.

      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. Thanks a lot! works perfect SBS 2008

    ReplyDelete
  38. 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
    Replies
    1. Evert, same issue. I had to do a restore from an old backup and got the same error. Thanks for posting this!

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

    ReplyDelete
  40. 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
  41. This info was very helpful. It fixed my issue, after trying everything I could think off. I learned my lesson: backup everything. Thanks

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

    Thank you very much.

    ReplyDelete
  43. Worked for me, thanks!

    ReplyDelete
  44. Un énorme merci !! Thanks !!!!!!!!!!!!!!!!!!

    ReplyDelete
  45. 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 :-)

    ReplyDelete
  46. This comment has been removed by the author.

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

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

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

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

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

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

    ReplyDelete
  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

    ReplyDelete
  54. “I jumped on an opportunity to purchase a rental property over the 4th of  weekend. Mr Lee was quick to respond and since this was my first time getting a loan to buy a rental property , he was able to help me walk through the loan process. It was a great experience working with a good and kind loan lender Mr Lee. I hopefully know very well if you are outta looking for loan to purchase a property or funding business purpose then Mr Lee will be able to help you with such process here his details WhatsApp +1-989-394-3740.   /  247officedept@gmail.com  !”  

    ReplyDelete
  55. Good day!

    After recreate VM .vmdk file from -flat.vmdk and can run VM with 2012r2 Server. It is single DC in organization and now see bootloop stop code 0xC00002E2.

    I try remove .log files in NTDS directory - no changes(
    Try commands: esentutl /g ntds.dit and after success without errors run command: esentutl /p ntds.dit also complete without errors. Remove .log again. But 0xC00002E2 steel here :(

    Ntdsutil / Files / Info - normal show files in NTDS directory.

    But, if i can try commands: ntdsutil "compact to" or ntdsutil "integrity" system show me error message:
    **Error: Operation not allowed because AD DS/LDS files are in the restored state. Restart the directory instance to finalize teh restore process.

    But can i do it? "Restart the directory instance" or change "recovery state AD DS/LDS files"?

    Try set back time in BIOS on this VM - not effect.
    Try remove registry key:
    "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters\DSA Database Epoch"
    and add DWORD-key:
    "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters\Database restored from backup" with value "1".

    But this also cant help me "wining" STOP code: c00002e2 bootloop.

    Sorry for my English...

    Does anyone have any idea what can be done to solve the problem?

    ReplyDelete
  56. Консоли от корпорации Microsoft не сразу завоевали всемирную популярность и доверие игроков. 1-ая консоль под названием Xbox, вышедшая в далеком 2001 году, значительно уступала PlayStation 2 по количеству проданных приставок. Однако все поменялось с выходом Xbox 360 - консоли седьмого поколения, которая стала по-настоящему "народной" для жителей России и государств СНГ - Xbox 360 прошивка LT 3.0. Интернет-сайт Ru-Xbox.Ru является популярным ресурсом в числе поклонников приставки, поскольку он предлагает игры для Xbox 360, которые поддерживают все существующие версии прошивок - совершенно бесплатно! Зачем играть на оригинальном железе, если есть эмуляторы? Для Xbox 360 игры выходили длительное время и находятся как посредственными проектами, так и хитами, многие из которых даже сейчас остаются эксклюзивными для это консоли. Некоторые гости, желающие сыграть в игры для Xbox 360, смогут задать вопрос: для чего нужны игры для прошитых Xbox 360 freeboot или различными версиями LT, если имеется эмулятор? Рабочий эмулятор Xbox 360 хоть и существует, но он просит производительного ПК, для покупки которого будет нужно вложить существенную сумму. К тому же, разные артефакты в виде исчезающих текстур, недостатка некоторых графических эффектов и освещения - смогут значительно попортить впечатления об игре и отбить желание для ее предстоящего прохождения. Что предлагает этот веб-сайт? Наш веб-сайт на сто процентов приурочен к играм для приставки Xbox 360. У нас вы можете совершенно бесплатно и без регистрации загрузить игры на Xbox 360 через торрент для следующих версий прошивок консоли: - FreeBoot; - LT 3.0; - LT 2.0; - LT 1.9. Каждая прошивка имеет свои особенности обхода встроенной защиты. Потому, для запуска той либо прочей игры будет нужно загрузить специальную ее версию, которая стопроцентно приспособлена под одну из 4 перечисленных выше прошивок. На нашем сайте можно без усилий получить желаемый проект под нужную прошивку, поскольку возле каждой игры находится название версии (FreeBoot, LT 3.0/2.0/1.9), под которую она приспособлена. Гостям данного ресурса доступна особая категория игр для 360-го, созданных для Kinect - специального дополнения, которое считывает все движения 1-го или нескольких игроков, и позволяет управлять с их помощью компьютерными персонажами. Большой выбор ПО Не считая возможности скачать игры на Xbox 360 Freeboot или LT разных версий, здесь вы можете найти программное обеспечение для консоли от Майкрософт: - разнообразные версии Dashboard, которые позволяют кастомизировать интерфейс консоли под свои нужды, сделав его более комфортным и нынешним; - браузеры; - просмотрщики файлов; - сохранения для игр; - темы для консоли; - программы, для конвертации образов и записи их на диск. Помимо перечисленного выше игры на Xbox 360 Freeboot вы можете запускать не с дисковых, а с USB и прочих носителей, используя программу x360key, которую вы можете достать на нашем интернет-сайте. Посетителям доступно огромное количество полезных статей, а кроме этого форум, где можно пообщаться с единомышленниками или попросить совета у более опытнейших хозяев консоли.

    ReplyDelete
  57. If you don't remember this, your car may be stolen!

    Imagine that your vehicle was taken! When you visit the police, they inquire about a particular "VIN lookup"

    A VIN decoder: What is it?

    Similar to a passport, the "VIN decoder" allows you to find out the date of the car's birth and the identity of its "parent" (manufacturing facility). You can also figure out:

    1.The type of engine

    2.Model of a car

    3.The DMV and the limitations it imposes

    4.The number of drivers in this vehicle

    The location of the car will be visible to you, and keeping in mind the code ensures your safety. The code can be viewed in the online database. The VIN is situated on various parts of the car to make it harder for thieves to steal, such as the first person seated on the floor, the frame (often in trucks and SUVs), the spar, and other areas.

    What if the VIN is intentionally harmed?

    There are numerous circumstances that can result in VIN damage, but failing to have one will have unpleasant repercussions because it is illegal to intentionally harm a VIN in order to avoid going to jail or the police. You could receive a fine of up to 80,000 rubles and spend two years in jail. You might be stopped by an instructor on the road.

    Conclusion.

    The VIN decoder may help to save your car from theft. But where can you check the car reality? This is why we exist– VIN decoders!

    ReplyDelete