После аварийного отключения физического сервера с ролью контроллера домена Active Directory при загрузке сервера столкнулись с BSOD ошибкой stop code 0x00002e2. Данная ошибка указывает на то, что база Active Directory (файл NTDS.DIT) повреждена. В этой статье мы разберемся, как исправить файл ntds.dit и запустить контроллер домена (в нашем примере это сервер с Windows Server 2016).
В предыдущих версиях Windows Server эта же ошибка выглядит так:
STOP c000002e2 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.
Итак, Windows Server на контроллере домена не загружается с ошибкой 0xc00002e2. После трех перезагрузок сервера он автоматически перейдет в режим восстановления WinRE (или нажмите F8 при загрузке). Вам нужно запустить Windows в режиме восстановления службы каталогов (DSRM).
Выберите Startup Settings -> Restart.
Затем после загрузки выберите Directory Services Restore Mode в меню расширенных опций загрузки.
При загрузке сервера в режиме DSRM вы сможете войти на него под локальным администратором. На контроллере домена единственная локальная учетная запись — администратор DSRM. Вы задаете его пароль при установке роли контроллера домена ADDS на сервере (SafeModeAdministratorPassword).
Если вы не знаете пароль администратора DSRM, можно сбросить его с помощью любой утилиты с загрузочного диска или загрузочного диска MsDART.
После входа на рабочий стол DC запустите командную строку. На этом этапе нужно убедиться, на месте ли все каталоги и файлы службы каталога.
Выполните команды:
NTDSUTIL
activate instance ntds
Files
Info
Убедитесь, что каталог с файлом NTDS (по умолчанию C:\Windows\NTDS) и сам файл ntds.dit находятся по указанным путям и не удалены.
Попробуем проверить целостность базы данных AD:
integrity
В моем случае команда вернула, что база повреждена:
Could not initialize the Jet engine: database is inconsistent. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113
Нам придется исправить файл с базой AD с помощью утилиты esentutl. Утилита должна быть хорошо знакома администраторам Exchange. Также мы показывали, как использовать esentutl, чтобы уменьшить размер индексного файла службы поиска Windows.edb. Но сначала сделайте резервную копию содержимого каталога NTDS:
mkdir c:\ntds_bak
xcopy c:\Windows\NTDS\*.* c:\ntds_bak
Проверим целостность файла ntds.dit:
esentutl /g c:\windows\ntds\ntds.dit
Утилита определила, что база AD повреждена:
The database is not up-to-date. This operation may find that this database is corrupted because data from the log files has not yet to be placed in the database. To ensure the database is up-to-date please use the Recovery operation. Integrity check completed. Database is CORRUPTED.
Попробуйте исправить ошибки в базе данных с помощью команды:
esentutl /p c:\windows\ntds\ntds.dit
Если ошибки исправлены, должно появится сообщение:
Operation completed successfully in xx seconds.
Еще раз проверьте целостность с помощью
esentutl /g
.
Integrity test successful. It is recommended you to run semantic database analysis to ensure semantic database consistence as well.
Выполните анализ семантики базы с помощью ntdsutil:
ntdsutil
activate instance ntds
semantic database analysis
go
Если семантические ошибки найдены, чтобы исправить их выполните:
go fixup
Теперь можно сжать файл ntds.dit:
activate instance ntds
files
compact to C:\Windows\NTDS\TEMP
Замените оригинальный файл ntds.dit:
copy C:\Windows\NTDS\TEMP\ntds.dit C:\Windows\NTDS\ntds.dit
Удалите все лог файлы из каталога NTDS:
Del C:\Windows\NTDS\*.log
Перезагрузите сервер в обычном режиме. Убедитесь, что службы ADDS стартовали и контроллер домена доступен по сети. Проверьте здоровье контроллера домена и состояние репликации Active Directory.
Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Depending on your operating system version, you may run into the error code 0xc00002e2 in Windows Server when the Domain controller fails to restart or does not display the login screen.
This issue causes a BSoD crash which displays an error message- Your PC ran into a problem and needs to restart. We’re just collecting some error info, and then we’ll restart for you. (0% complete). If you’d like to know more, you can search online later for this error: 0xc00002e2).
Why do I get the 0xc00002e2 boot error in Windows Server?
The 0xc00002e2 code is an indication that the Active Directory Domain Services role was removed from a domain controller without first demoting it. There are multiple reasons why you encounter this boot error which also include the following:
- File deletion – The directoryServices-DomainController role was deleted using the Dism.exe, Pkgmgr.exe, or Ocsetup.exe tool.
- Old restore point – The restoration point is older than 30 days (Tombstone) which may create problems with the restoration process.
- Incomplete system restauration – The Active Directory Domain Services (AD DS) data is spread across multiple drives, and only the system drive was restored successfully.
- Unusable device – The domain controller (DC) is linked to a specific hardware driver and is unable to use that device during the boot process.
- Data corruption – The ADS database suffers data corruption or data loss due to power failure.
Now that we know about the possible causes for the 0xc00002e2 boot error, let’s check out the solution to fix the problem.
How do I fix the Windows Server 0xc00002e2 boot error?
1. Validate the Active Directory Domain Services role
1.1 In Windows Server 2008 R2 or Windows Server 2008
- Restart your Windows PC and hold the Shift+F8 key until the boot menu appears on the screen.
- Use the arrow keys to select Directory Services Restore Mode (DSRM), and then log into the DRM account by providing the DSRM password created during the Domain Controller promotion process to access the system.
- Now you need to validate that the Active Directory Domain Services role was removed from a domain controller. To do so in Windows Server 2008 R2, type or paste the following command and press Enter.
dism.exe /online /get-features
- Now that the Active Directory Domain Services is removed successfully, you need to re-add the DirectoryServices-DomainController role back to the server. For this, you need to execute the following command.
dism.exe /online /enable-feature/featurename:DirectoryServices-DomainController
- Now restart normally and use the Shift + F8 key combination to access the boot menu once again.
- Log into the Directory Services Restore Mode by providing the password as you did previously.
- Type or paste the following command to remove the remove Active Directory Domain Services from the domain controller.
dcpromo.exe /forceremoval
- Microsoft’s hotpatching for Windows Server 2025 to be subscription-based starting July
- Microsoft releases the Windows Server Build 26360, introducing the WDAC for enhanced security
- How to Fix ERROR_SCRUB_DATA_DISABLED on Windows Server
- Windows Server 2025 and System Center 2025 have entered general availability
1.2 Windows Server 2012 and later versions
- Reboot your computer and hold down the Shift key. Now, keep pressing the F8 key until the boot menu appears on the screen.
- Next, select Troubleshoot from the Choose an option menu.
- Select Advanced Options.
- Choose Startup Settings from the next screen.
- Click the Restart button.
- Select Directory Services Repair Mode (DSRM), and provide the DSRM password created during the Domain Controller promotion process to log in successfully.
- Type or paste the following command and press the Enter key to validate that the Active Directory Domain Services role was removed successfully.
dism.exe /online /get-features
- Next, execute the following command to add the DirectoryServices-DomainController role back to the server.
dism.exe /online /enable-feature/featurename:DirectoryServices-DomainController
- Now restart your PC normally and use the Shift+F8 key combination to access the boot menu once again. Log into the Directory Services Rest Mode by providing the password as you did previously.
- Press the Windows key, type powershell in the search bar on top, and choose Run as administrator from the search result.
- Type or paste the following command and press the Enter key to remove Active Directory Domain Services from the domain controller.
Uninstall-AddsDomaincontroller -ForceRemoval
After validating the Active Directory Domain Services role, you need to remove the domain controller metadata; the steps for which are described below.
NOTE
The above method assumes that other working domain controllers are currently present on your server and you only wish to remove Active Directory Domain Services. In case, other working domain controllers are not present, and this is the only domain controller in the domain, restoring an earlier system state backup is required.
2. Remove the Domain Controller Metadata
- Use the Windows + R shortcut to launch the Run command, type cmd in the search bar on top and choose Run as administrator from the search result.
- Type or paste the following command and press Enter to execute it.
ntdsutil.exe
- Execute the following command to enable the ntds instance:
activate instance ntds
- Now, execute the following:
Files
- Now type the following command and hit the Enter key. Make sure that the folder here is C:\Windows\NTDS:
Info
- After this, type the following command and press Enter.
compact to
- Now, you need to copy the file Ntds.dit in the temp folder to replace the old instance in NTDS.
- Finally, delete all the log files (.log) in this location and reboot your PC normally. Now restart your Windows Server, and you will no longer encounter the error code 0xc00002e2, indicating the Domain controller failed to start.
That’s all in this guide! Hopefully, we are successful in resolving the 0xc00002e2 boot error in Windows Server by performing the troubleshooting steps listed above.
You may want to check out this guide to learn the different ways to force sync Windows Server when the time is currently out of sync.
In case you need further assistance in this regard, feel free to reach out to us in the comments section.
Taiba Hasan
A postgraduate in Computer Applications, she is an avid technical writer who loves to craft content revolving around Windows, Android, and emerging technologies like SaaS. With How-To and troubleshooting guides, she aims to provide the best solutions for the problem and make technology less complicated for novice users.
Besides writing, she also loves to cook delicacies and spent time in her garden. In her free time, you will find her binge-watching web series or gazing the night sky.
Problem
You may encounter this error message when booting a protected system with a Windows Server 2012 server domain controller (on either an appliance or within Virtual Office):
STOP: error c0002e2 Directory Services could not start
Symptoms
In a domain controller server, after a dirty shutdown or power outage, you may face this message:
Directory Services are unable to start
with a stop code of c00002e2:
Causes
There are two potential causes of this error:
- A device attached to the system is not functioning
- The ntds (Active Directory) database is older than 6 months
Potential cause #1
A device attached to the system is not functioning
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.
How to resolve this issue: “A device attached to the system is not functioning”
Follow the instructions below to resolve this particular c00002e2 error:
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 performs an integrity check. The results will 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 and restore normal system functions.
Verify the repair
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.
Type: info
The file information should now appear correctly.
If a database analysis is required:
From the NTDSUTIL command prompt:
1. Type: Semantic Database Analysis
2. Type: Go
Potential cause #2:
The ntds (Active Directory) database is older than 6 months.
STOP: c00002e2 may be caused because the ntds (Active Directory) database is older than 6 months.
If you are booting a snapshot of a Windows Domain Controller that is more than 6 months old, Microsoft will prevent this machine from booting.
How to resolve this issue: “The ntds (Active Directory) database is older than 6 months.”
Follow the instructions below to resolve this particular c00002e2 error:
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 Date <mm-dd-yy> where mm-dd-yy is the month, day, and year of the snapshot being booted
4. Reboot the system into normal boot mode. Once the system is up and running, log in as an Administrator and reset the system time to the current date and time.
SUPPORT | 720-204-4500 | 800-352-0248
- Contact Axcient Support at https://partner.axcient.com/login or call 800-352-0248
- Free certification courses are available in the Axcient x360Portal under Training
- To learn more about Axcient products, sign up for a free one-on-one training
- Subscribe to the Axcient Status page for status updates and scheduled maintenance
1412 | 1703
Ошибка 0xc00002e2 на контроллере домена Active Directory указывает на повреждение базы данных Active Directory, которая хранится в файле NTDS.DIT. Такая проблема часто возникает после аварийного отключения сервера, и, как следствие, Windows Server не может загрузиться. В этой статье мы рассмотрим, как восстановить работу контроллера домена на примере Windows Server 2016.
Описание ошибки 0xc00002e2 при загрузке контроллера домена
Ошибка может проявляться на BSOD с кодом STOP 0xc00002e2 и следующим сообщением:
STOP c000002e2 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.
Это сообщение указывает, что служба каталогов Active Directory не может стартовать, и для дальнейшего восстановления необходимо загрузиться в Directory Services Restore Mode (DSRM).
Шаг 1. Загрузка в Directory Services Restore Mode (DSRM)
После трех неудачных перезагрузок сервер перейдет в режим восстановления WinRE (или вы можете нажать F8 при загрузке). Для устранения проблемы необходимо загрузить сервер в режиме восстановления службы каталогов.
1. Выберите Startup Settings и нажмите Restart.
2. После перезагрузки выберите Directory Services Restore Mode из меню дополнительных параметров загрузки.
При загрузке сервера в DSRM вы сможете войти под учетной записью администратора DSRM. Пароль для этой учетной записи был задан во время установки роли контроллера домена. Если вы не помните этот пароль, его можно сбросить с помощью утилит с загрузочного диска (например, MsDART).
Шаг 2. Проверка и восстановление базы данных Active Directory
1. После входа в систему откройте командную строку и убедитесь, что все файлы службы каталогов на месте. Выполните команды:
NTDSUTIL
activate instance ntds
Files
Info
2. Убедитесь, что каталог с базой данных AD (по умолчанию C:\Windows\NTDS) и файл ntds.dit присутствуют.
3. Проверьте целостность базы данных командой:
integrity
Если база данных повреждена, вы получите сообщение об ошибке:
Could not initialize the Jet engine: database is inconsistent.
Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113
Шаг 3. Восстановление базы данных AD с помощью утилиты esentutl
Для восстановления базы данных используйте утилиту esentutl.
1. Сделайте резервную копию каталога NTDS:
mkdir c:\ntds_bak
xcopy c:\Windows\NTDS\*.* c:\ntds_bak
2. Проверьте целостность файла ntds.dit:
esentutl /g c:\windows\ntds\ntds.dit
Если база повреждена, утилита сообщит:
Integrity check completed. Database is CORRUPTED.
3. Восстановите базу данных командой:
esentutl /p c:\windows\ntds\ntds.dit
После успешного восстановления вы увидите сообщение:
Operation completed successfully in xx seconds.
4. Повторно проверьте целостность базы данных:
esentutl /g c:\windows\ntds\ntds.dit
Шаг 4. Семантический анализ базы данных AD
После восстановления базы данных выполните анализ семантики с помощью ntdsutil:
1. Откройте командную строку и выполните:
ntdsutil
activate instance ntds
semantic database analysis
go
2. Если будут найдены семантические ошибки, исправьте их командой:
go fixup
Шаг 5. Сжатие и восстановление файла базы данных AD
1. Сожмите базу данных:
activate instance ntds
files
compact to C:\Windows\NTDS\TEMP
2. Замените оригинальный файл ntds.dit:
copy C:\Windows\NTDS\TEMP\ntds.dit C:\Windows\NTDS\ntds.dit
3. Удалите все лог-файлы из каталога NTDS:
Del C:\Windows\NTDS\*.log
Шаг 6. Перезагрузка сервера
Перезагрузите сервер в обычном режиме. Проверьте, что службы AD DS стартовали и контроллер домена доступен по сети. Убедитесь, что репликация Active Directory работает корректно и нет проблем с целостностью базы данных.
Шаг 7. Восстановление из резервной копии (при необходимости)
Если восстановить базу данных не удалось, вам придется восстановить контроллер домена из резервной копии. Для этого выполните следующие действия:
1. Восстановите сервер с помощью предыдущей резервной копии.
2. Если резервной копии нет, придется удалить роль AD DS в режиме DSRM и вручную удалить все записи о данном контроллере в Active Directory.
3. После этого выполните sysprep и установите новый контроллер домена.
Заключение:
Ошибка 0xc00002e2 указывает на повреждение базы данных Active Directory, и ее исправление требует загрузки в режим восстановления службы каталогов. Мы рассмотрели процесс восстановления с помощью утилиты esentutl, а также показали, как проверить и восстановить целостность базы данных AD. Если восстановление не удалось, всегда рекомендуется иметь резервную копию контроллера домена для быстрого восстановления.

Server 2012r2 Windows Update 80072efd Domain Controller Error Paul Our primary dc holding all fsmo roles crashes and keeps rebooting with the error code in the subject line. the dc is on hyper v 2012 r2 and we back it up using unitrends. it is backup up at the vm level. i tried restoring the vm to a backup from a few days ago, but it will still not boot. When you use boot diagnostics to view the screenshot of the vm, the screenshot shows that the vm needs to restart because of an error, displaying the stop code 0xc00002e1 in windows server 2008 r2, or 0xc00002e2 in windows server 2012 or later.

Windows 2012 R2 Domain Controller Boot Error Bsod 0xc00002e2 Pc Mac 0xc00002e2 windows server boot error occurs when the domain controller fails to restart. this happens when the active directory domain services role was removed abruptly. validating the active directory domain services role helps subside the problem. Error code 0xc00002e2 is only seen on a system with active directory. remediation: reboot the server into directory services restore mode by pressing f8 before the os begins loading. you will be required to use the local administrator account password. Host is server 2012 with single hyper v guest which is a domain controller. when booting the dc it gives a blue stop error: 0xc00002e2 and then reboots. after third reboot it shows a recovery cons. Error code 0xc00002e2 occurs when removing the active directory domain services role from a domain controller. this can happen if you use tools such as dism.exe, pkgmgr.exe, or ocsetup.exe to remove the directoryservices domaincontroller role.

Windows 2012 R2 Domain Controller Boot Error Bsod 0xc00002e2 Pc Mac Host is server 2012 with single hyper v guest which is a domain controller. when booting the dc it gives a blue stop error: 0xc00002e2 and then reboots. after third reboot it shows a recovery cons. Error code 0xc00002e2 occurs when removing the active directory domain services role from a domain controller. this can happen if you use tools such as dism.exe, pkgmgr.exe, or ocsetup.exe to remove the directoryservices domaincontroller role. After an emergency shutdown of a physical server with an active directory domain controller role, the bsod with an error stop code 0x00002e2 appears on boot. the error points out that the active directory database (ntds.dit) is damaged. Stop code 0xc00002e2 after restore. removing hidden non present devices may be necessary for a windows domain controller (or any windows system) to boot to a good state after restore. Spx | how to fix bsod 0xc00002e2 after a successful restore or a virtualboot of a domain controller? completed the restoration using either recovery environment tool or the virtualboot. power on the vm. when the machine is powered on, press f8 before the operating system (os) begins to load and choose the directory service restore mode.
Virtual Box Error Code 0xc0000225 When Installing Windows Server 2012 After an emergency shutdown of a physical server with an active directory domain controller role, the bsod with an error stop code 0x00002e2 appears on boot. the error points out that the active directory database (ntds.dit) is damaged. Stop code 0xc00002e2 after restore. removing hidden non present devices may be necessary for a windows domain controller (or any windows system) to boot to a good state after restore. Spx | how to fix bsod 0xc00002e2 after a successful restore or a virtualboot of a domain controller? completed the restoration using either recovery environment tool or the virtualboot. power on the vm. when the machine is powered on, press f8 before the operating system (os) begins to load and choose the directory service restore mode.