techblog

Windows Server 2008–Domain Controller Failed to start

Jan 22, 2013 by Christoph // 32 Comments

======================================================
Edit: This works for Windows Server 2012 as well!
======================================================

I was encountering an error on my virtual Domain Controller some days ago, resulting in an ugly blue screen:

image

“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.”

Since this is my only DC in the VM environment I am using for tests and development, and I didn’t had a backup or snapshot I needed it back really badly! Smile

I found some entries in a forum that discussed mixed up drive letters, so first attempt was to check this. Indeed, my system partition lost the letter C:\ for some reason, so I switched that back.

image image

It didn’t really help. Some other posts described methods to switch back to a further date via the BIOS, but I was not able to do so, and the posts mostly discussed the issue after restoring an old backup file.

So I searched further, and came across a nice post, mentioning the following steps executed in the Directory Services restore mode. It basically makes use of the Active Directory Domain Services management command line tool NTDSUTIL and checks for corruptions of the service. It furthermore uses the ESENTUTL tool to check for the integrity of the JET database.

=================================================

  1. Restart the server and press F8 key, select Directory Services restore mode.
  2. Log in with the local administrator username and password
  3. Type: cd \windows\system32
  4. Type: NTDSUTIL
  5. Type: activate instance NTDS
  6. Type: files
  7. If you encounter an error stating that the Jet engine could not be initialized exit out of ntdsutil.
  8. Type: cd\
  9. Type: md backupad
  10. Type: cd \windows\ntds
  11. Type: copy ntds.dit c:\backupad
  12. Type: cd \windows\system32
  13. Type: esentutl /g c:\windows\ntds\ntds.dit
  14. This will perform an integrity check, (the results indicate that the jet database is corrupt)
  15. Type: esentutl /p   c:\windows\ntds\ntds.dit
  16. Agree with the prompt
  17. Type: cd \windows\ntds
  18. Type: move *.log c:\backupad   (or just delete the log files)

This should complete the repair.  To verify that the repair has worked successfully:

  1. Type: cd \windows\system32
  2. Type: ntdsutil
  3. Type: activate instance ntds
  4. Type: files        (you should no longer get an error when you do this)
  5. Type: info       (file info should now appear correctly)

One final step, now sure if it’s required:

From the NTDSUTIL command prompt:

  1. Type: Semantic Database Analysis
  2. Type: Go

=================================================

This worked for me like a charm. Thanks to dbutch1976 for the nice manual to fix this issue!

Back to work now… Smile


32 Comments to “Windows Server 2008–Domain Controller Failed to start”

  1. Mar

    Great Help… This is great for us who work in the LAB.

  2. pterodactylptreader

    So close but no cigar. I did everything you said and it happened just like you said… until I rebooted at the end. When I rebooted, it came back up with the same BSOD as before. Back to the drawing board.

  3. Aufinger

    I was about to follow the Microsoft KB (http://support.microsoft.com/kb/2737463) that was telling me to delete AD!!! So glad I did not do that and came to this site for this help from computergeniusman Mr. Distefano. Thanks for taking the time to blog this…it is greatly appreciated.

  4. ItsMe

    Thanks for providing this. I found some other sites that mentioned some of these steps for repairing the AD database, but they didn’t give enough detail to be able to follow the steps.

  5. luiz

    worked for me also! on 2012 server VM (on hyper-v).
    was getting that stop/bsod after a power loss, but I was not too woried because it was a backup DC. the main one with 2008 R2 server survived flawlessly, so in last case I could just install again and replicate AD

    however, way better to learn this way! thank you!

  6. mahyar

    WOW tnx tnx and again tnx this work for me and my server came back online : )

    • Christoph

      Hello Andrew. Great this article helps you and so many other people. That’s the best donation I can get – and a beer, whenever our ways cross! ;-)

  7. Mustafa Kamal Sohag

    Thank you very much brother ….!!! Its working for me very well. :)

    From yesterday i was facing this issue and after seeing your blog and tried and its working fine.

  8. Serge

    Thanks, but esentutl successfully finished integrity check without errors… What else should I try?

    • Christoph

      Hello Serge. It is difficult to point you in a further direction without getting hands on the system. Do you get an error performing point 6 in the list of things to do? What is the exact output when you perform point 14?

  9. Reagan

    Thank you very much for posting this post.
    It Really saved me a great deal of trouble of doing a complete PC restore

  10. Popolou

    After a brain fart, I ended up with a similar problem. Thanks to the OP and dbutch1976 for sharing the solution…..

  11. Great Brain

    You are the greatest person on this earth. You saved my life and life and several lives… You are just like God! Too good… Live for thousands of years.. You are superb !!!

  12. DC

    Life saver; just had my only two DC’s both simultaneously develop corrupt AD databases. What are the odds of that??!! Anyhow, the posted instructions above saved my bacon big time!!! Many thanks!

  13. Kash

    I am facing an issue where it says:

    *** Error: Operation not allowed because AD DS/LDS files are in the restored state. Restart directory instance to finalize the restore process.

    after typing “files” after “activate instance NTDS”. Other solutions have involved restarting BIOS clocks and it returns to normal for them, but I have done so to no avail. Is there a solution to restarting the instance properly?

    PS. I am running a VM which I just restored from a server 2008 backup image using Acronis Backup and Recovery 11.5.

    Really need help on this, it’s driving me insane :(

  14. Steve

    I was getting this error. For me I restored a VM from a backup image that was over a month old i had to boot into directory restore mode, disable time sync in hyper-v, set the clock back to the time of the backup image and then it booted without the bsod.

Copyright © 2012 techblog All Rights Reserved.

The posts on this weblog are provided “AS IS” with no warranties, and confer no rights. The opinions expressed herein are personal and do not represent those of my employer.

Designed & Developed by ThemeElephant