Windows Server 2008 domain controller blue screens on startup with STOP: c00002e2

Earlier in the year, I had a hardware issue which brought down one of my Hyper-V servers (and my virtual web server hosting this website along with it). When I finally resolved the issue (I had a faulty hard disk), I had to re-install Windows Server 2008 on the Hyper-V server and then bring all of my virtual machines back online. I wrote down my resolution steps, and now have finally had some time to share this.

I used Virtual Machine Manager 2008 to add the rebuilt server back in as a library server, and then copied my virtual machine files in to the Virtual Library share so that it would pick up the machines.

Each of my virtual hosts have two disks – One for the operating system, and one for the data. This meant that after I had finished creating the “new” VM using the .vhd containing the OS for each machine, I had to go back and attach the data .vhd as well.

It seems that when you do this (for whatever reason) the disk is not brought back online automatically. As I have my Active Directory database stored on my data drive, when the domain controller attempts to access the database, it can’t so it blue screens and then restarts. I don’t believe that this is the behaviour on Windows Server 2003 machines, so I am assuming it’s either the behaviour for Windows Server 2008 or maybe it’s just the Server Core install of Windows Server 2008.

In a nutshell, playing around with the virtual disks for a Windows Server 2008 domain controller can cause a lot of grief. If you ever get a BSoD with this message – “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 just might be the reason.

EDIT (04/04/10): I have revisited this article as I ran in to another situation when moving a virtual machine recently. As F.H.R. stated in the comments below, Windows puts the secondary disk offline. If you bring the disk back online using diskpart or Disk Management, you might still have the same issues.

If you do still have a blue screen after bringing the disk back online, ensure that the disk is initialised. If you are using diskpart, select the disk and then use the command “attrib disk clear readonly” which should bring your domain controller back to life.

If you still have issues, follow the rest of this article.

In order to resolve this issue, I presented a new VHD to the domain controller and booted in to Directory Services Restore Mode. Once I was in there, I was able to move my Active Directory database across to this new disk, swap the drive letters around, and then restart.

I’m not sure why this is necessary, but I can tell you that 7 months later I have used this process a few times when playing around with my domain controllers, and with 100% success.

13 thoughts on “Windows Server 2008 domain controller blue screens on startup with STOP: c00002e2”

  1. After making a change to the VM, windows puts the secondary disk offline. All you had to do is go to Disk Management and put the missing drive online again.

  2. Thanks F.H.R.

    I wrote this one a while ago, but I’m fairly sure I tried that and still ran in to issues when trying to re-attach the disk to the SCSI bus.

    In any case, if that’s worked for you, then hopefully it will work for others that read this as well.

  3. Hey Mat…

    Next time, give this a try….

    If you are in a hurry to get services working again, just mount the VHD as an ide drive not a SCSI one….

    This will give you instant return to service.

    Cheers Dwayne

  4. Thanks for this, it was a great help.

    In my case it didn’t workout, so i restored my entire vhd (backup hyperv agent) and kicked off replication, and its all ok.

    I didn’t need to do a non authoritive restore as it was a full restore

  5. When you say “swapped the drive letters around” what are you referring to? Changing the registry to point to the new database?

  6. hi there, just had the same problem on 2 SBS2011’s last friday… We actually restored the entire C: partition from backup, but this is not a fix really 🙂

    Question, if your theory of virtual disk not being online is true, how come I can boot into AD Services recovery mode (note: can NOT boot into safe mode)? We have plenty of ESXi hosts out there with SBS2011 (seems like this issue is related to R2 based systems) and I’m freaking out that the servers will start doing this more and more often…

  7. Ah, finally figured this out! When I restored my VHD’s in Hyper-V, the DVD drive took drive letter D: and then my other volumes took E: and F: when they were supposed to be D: and E:. So if I had removed the DVD when I created the VM, it may have worked right off the bat. Instead, I booted into Directory Services Restore Mode and then reassigned the drive letters back to what they were supposed to be, rebooted and, volia, all is working again! I hope this helps someone else out there!

    Note that you can check the appropriate paths for NTDS in the registry: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNTDS

  8. I am having what sounds like it may be the same issue. I keep getting a c00002e2 stop error on boot after some issues came up on our DC. I cannot seem to get into Directory Services Restore Mode, but I can boot into the repair portion of the Server 2008 disk and run regedit from the command line. I don’t see any settings in the NTDS registry path. What should the defaults be?

  9. STOP: C00002e3 Security Accounts Manager Initialization failed – Error Status: 0xc0000001 Active Directory -Windows Server Restarts Right before Login Screen

Leave a Reply

Your email address will not be published. Required fields are marked *