Ошибка 0xc00002e2 windows server

После аварийного отключения физического сервера с ролью контроллера домена Active Directory при загрузке сервера столкнулись с BSOD ошибкой stop code 0x00002e2. Данная ошибка указывает на то, что база Active Directory (файл NTDS.DIT) повреждена. В этой статье мы разберемся, как исправить файл ntds.dit и запустить контроллер домена (в нашем примере это сервер с Windows Server 2016).

0x00002e2 ошибка загрузки контроллера домена Active Directory на 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.

расширенный параметры загрузки Windows

Затем после загрузки выберите Directory Services Restore Mode в меню расширенных опций загрузки.

Загрузить контроллер домена в Directory Services Restore Mode

При загрузке сервера в режиме DSRM вы сможете войти на него под локальным администратором. На контроллере домена единственная локальная учетная запись — администратор DSRM. Вы задаете его пароль при установке роли контроллера домена ADDS на сервере (SafeModeAdministratorPassword).

Если вы не знаете пароль администратора DSRM, можно сбросить его с помощью любой утилиты с загрузочного диска или загрузочного диска MsDART.

После входа на рабочий стол DC запустите командную строку. На этом этапе нужно убедиться, на месте ли все каталоги и файлы службы каталога.

Выполните команды:

NTDSUTIL
activate instance ntds
Files
Info

Убедитесь, что каталог с файлом NTDS (по умолчанию C:WindowsNTDS) и сам файл ntds.dit находятся по указанным путям и не удалены.

Попробуем проверить целостность базы данных AD:

integrity

ntdsutil info - информацию о файлах Active Directory

В моем случае команда вернула, что база повреждена:

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:WindowsNTDS*.* c:ntds_bak

Проверим целостность файла ntds.dit:

esentutl /g c:windowsntdsntds.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.

ntdsutil -файл базы Active Directory ntds.dit поврежден

Попробуйте исправить ошибки в базе данных с помощью команды:

esentutl /p c:windowsntdsntds.dit

Если ошибки исправлены, должно появится сообщение:

Operation completed successfully in xx seconds.

исправить ошибки в файле базы AD ntds.dit

Еще раз проверьте целостность с помощью
esentutl /g
.

Integrity test successful.
It is recommended you to run semantic database analysis to ensure semantic database consistence as well.

процерка целостности базы Active Directory

Выполните анализ семантики базы с помощью ntdsutil:

ntdsutil
activate instance ntds
semantic database analysis
go

Если семантические ошибки найдены, чтобы исправить их выполните:

go fixup

active directory ntdsutil проверка семантики semantic database analysis

Теперь можно сжать файл ntds.dit:

activate instance ntds
files
compact to C:WindowsNTDSTEMP

Замените оригинальный файл ntds.dit:

copy C:WindowsNTDSTEMPntds.dit C:WindowsNTDSntds.dit

Удалите все лог файлы из каталога NTDS:

Del C:WindowsNTDS*.log

Перезагрузите сервер в обычном режиме. Убедитесь, что службы ADDS стартовали и контроллер домена доступен по сети. Проверьте здоровье контроллера домена и состояние репликации Active Directory.

Обновлено 06.05.2022

0xc00002e2

Добрый день! Уважаемые читатели и гости одного из крупнейших IT блогов Pyatilistnik.org. В прошлый раз мы с вами рассматривали менеджер пакетов Winget, который позволяет с помощью PowerShell много чего устанавливать. В сегодняшней статье я буду бороться с пресловутым синим экраном 0xc00002e2, который я поймал на одном из контроллеров домена. Что ж не приятно, но не смертельно, давайте выходить из этой ситуации.

❌Описание ситуации с BSOD  0xc00002e2 на контроллере домена

И так есть Active Directory состоящий из леса и трех доменов, в одном из доменов есть четыре контроллера домена. Один из них в какой-то момент перестал отвечать в системе мониторинга. Это была виртуальная машина на базе Vmware ESXI. Подключившись к консольному подключению я увидел вот такую картину:

0xc00002e2

После перезагрузки сервер опять выпадал в BSOD, и далее по циклу. В логах вы можете потом обнаружить, если доберетесь:

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.

Как исправить синий экран 0xc00002e2

Надеюсь, что у вас это не последний контроллер домена в сети, поэтому самый простой способ это:

  • Восстановить из резервной копии данный контроллер, при условии, что его копия не старше дня, чтобы не было проблем с репликацией
  • Полностью удалить недоступный контроллер домена и заменить его на новый. Если на сервере были роли FSMO, то их сначала нужно захватить и перенести.
  • Но если решились восстанавливать то давайте приступать, может, что и получиться.

Когда вы раза три увидите синий экран с кодом 0xc00002e2, то сервер загрузиться в режиме восстановления WinPE, его при желании можно вызвать клавишей F8 при загрузке. У любого контроллера домена есть специальный режим восстановления службы каталогов (Directory Services Repair Mode — DSRM).

На экране «Choose an option»  выберите пункт «Troubleshoot«.

Choose an option troubleshoot

Далее выбираем пункт «Startup Settings«.

advanced options startup settings

Перезагружаем сервер.

Restart to change Windows options such as

Далее при загрузке найдите пункт «Directory Services Repair Mode»

Выберите пункт Directory Services Restore Mode

Начнется загрузка DSRM, по сути вы увидите привычную загрузку Windows, в которую вы сможете войти под локальным администратором DSRM, он задается при настройке.

Если вы не помните пароль от Администратора DSRM, то придется его сбрасывать, например через MsDART или любой другой загрузочный диск

Попав в систему вы первым делом должны запустить командную строку от имени администратора, и далее нам понадобиться одна из самых важных утилит в Active Directory ntdsutil. Вводим команды:

  • Ntdsutil (Запускаем саму утилиту)
  • activate instance ntds (Подключаемся к активной БД Active Directory)
  • Files (Делаем запрос к файлам. где лежит БД)
  • Info (Смотрим все файлы и их расположение)

(по умолчанию это будет директория C:WindowsNTDS)

В моем случае это нестандартный каталог, у меня все лежит в папке C:ADDSNTDS. Тут же вы можете посмотреть размер файла БД NTDS.dit.

ntdsutil просмотр файлов БД AD

Теперь попробуйте проверить целостность базы данных, для этого вводим:

У меня выскочила ошибка:

Error: Access to source database ‘C:ADDSNTDSntds.dit’ failed with Jet error — 1206. Operation terminated with error — 1206 (Jet_errDatabaseCorrupted, Non database file or corrupted db) after 0.0 seconds

ntdsutil error 1206

Или еще распространенная ошибка:

Could not initialize the Jet engine: database is inconsistent.
Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113

Error -2147418113

Попробуем восстановить целостность Базы данных Active Directory, для этого есть всем известная утилита esentutl, она очень часто используется при работе с почтовым сервером Exchange. Перед любыми работами всегда нужно сделать резервную копию данных, для этого:

mkdir c:ntds_backup  — Создаем папку для резервных копий
xcopy c:ADDSNTDS*.* c:ntds_backup — Копируем содержимое c:ADDSNTDS в c:ntds_backup

Проверим целостность файла ntds.dit:

esentutl /g c:ADDSNTDSntds.dit

Утилита вам сообщит. что с базой не все хорошо и она повреждена:

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.

После чего начнется процесс восстановления,  а может и не начаться и вы легко можете опять получить ошибку Jet error — 1206.

ntdsutil -файл базы Active Directory ntds.dit поврежден

Первый процесс закончен, попробуем исправить найденные ошибки, для этого выполните команду:

esentutl /p c:ADDSNTDS\ntds.dit

Если все хорошо, то вы должны получить сообщение «Operation completed successfully in xx seconds«.

исправить ошибки в файле базы AD ntds.dit

Обязательно еще раз проверьте в целостности базы данных, выполните:

должно появиться сообщение:

Integrity test successful. It is recommended you to run semantic database analysis to ensure semantic database consistence as well.

проверка целостности базы Active Directory

теперь выполним семантический анализ, для этого:

ntdsutil
activate instance ntds
semantic database analysis
go

При обнаружении семантических ошибок примените ключ fixup:

active directory ntdsutil проверка семантики semantic database analysis

Произведем сжатие БД ntds.dit:

activate instance ntds
files
compact to c:ADDSNTDSTemp

Перезапишем оригинальный файл ntds.dit:

copy c:ADDSNTDSTempntds.dit c:ADDSNTDSntds.dit

Удалите все лог файлы из каталога NTDS:

Перезагрузка

Проверка прав на файлы NTDS

Еще очень важно проверить не сброшены ли были чем-то права на файлы из папки NTDS. Для этого в командной строке введите предварительно попав нужный каталог:

Должны быть права NT AUTHORITYSYSTEM: (ID) F и BUILTINAdministrators: (id) f

Должны быть D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)

Должно быть NT AUTHORITYSYSTEM: (ID) F и BUILTINAdministrators: (id) f

Должно быть D:AI (A; ID; FA;;; SY) (A; ID; FA;;; BA)

Проверка прав на файлы NTDS

Надеюсь, что было полезно. С вам был Иван Сёмин, автор и создатель IT проекта Pyatilistnik.org.

Validate the Active Directory Domain Services role

by 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… read more


Updated on May 26, 2023

Reviewed by
Alex Serban

Alex Serban

After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more

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

0xc00002e2

XINSTALL BY CLICKING THE DOWNLOAD FILE

Easily get rid of Windows errors
Fortect is a system repair tool that can scan your complete system for damaged or missing OS files and replace them with working versions from its repository automatically.
Boost your PC performance in three easy steps:

  1. Download and Install Fortect on your PC.
  2. Launch the tool and Start scanning
  3. Right-click on Repair, and fix it within a few minutes
  • 0 readers have already downloaded Fortect so far this month

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

  1. Restart your Windows PC and hold the Shift+F8 key until the boot menu appears on the screen. 
  2. 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. 0xc00002e2
  3. 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 0xc00002e2
  4. 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
  5. Now restart normally and use the Shift + F8 key combination to access the boot menu once again. 
  6. Log into the Directory Services Restore Mode by providing the password as you did previously. 
  7. Type or paste the following command to remove the remove Active Directory Domain Services from the domain controller. dcpromo.exe /forceremoval
Read more about this topic

  • Fix: Remote Desktop Services is Currently Busy Error
  • Event ID: 10036 Distributed COM [Fix]
  • wsmprovhost.exe: What is it & How to Stop its High CPU Usage

1.2 Windows Server 2012 and later versions

  1. Reboot your computer and hold down the Shift key. Now, keep pressing the F8 key until the boot menu appears on the screen. 
  2. Next, select Troubleshoot from the Choose an option menu. 0xc00002e2
  3. Select Advanced Options.
  4. Choose Startup Settings from the next screen. 0xc00002e2
  5. Click the Restart button.
  6. Select Directory Services Repair Mode (DSRM), and provide the DSRM password created during the Domain Controller promotion process to log in successfully. 
  7. 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 0xc00002e2
  8. Next, execute the following command to add the DirectoryServices-DomainController role back to the server. dism.exe /online /enable-feature/featurename:DirectoryServices-DomainController
  9. 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. 
  10. Press the Windows key, type powershell in the search bar on top, and choose Run as administrator from the search result.
  11. 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 icon
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

  1. 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. 0xc00002e2
  2. Type or paste the following command and press Enter to execute it. ntdsutil.exe
  3. Execute the following command to enable the ntds instance: activate instance ntds
  4. Now, execute the following: Files
  5. Now type the following command and hit the Enter key. Make sure that the folder here is C:WindowsNTDS: Info
  6. After this, type the following command and press Enter. compact to
  7. Now, you need to copy the file Ntds.dit in the temp folder to replace the old instance in NTDS. 
  8. 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. 

newsletter icon

How to fix Error 0xc00002e2 after rebooting Windows Domain Controller

This error is an indication that the Active Directory database (NTDS.DIT) is corrupt.

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.

In Directory Services Restore Mode, you can check if there is a problem with the database by running the following commands:

ntdsutil.exe

activate instance ntds

files

If there is a problem with the Active Directory database NTDS.DIT, you will see an error like the following:

Could not initialize the Jet engine: Jet Error -501. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113

To resolve this issue, rename all of the .log files located in C:WindowsNTDS to .log.old, so the logs can be recreated after reboot.

This should fixed the database after the server is rebooted once more. If you continue to get the error, you can access again Directory Services Restore Mode and run the following command:

esentutl /p «c:windowsntdsntds.dit»

Reboot the server and the issue should be solved.

Created: October 02, 2018 22:30

Last Updated: October 08, 2020 05:41

Related articles

Have More Questions?

Contact our support instantly via Live Chat

Источник

Server 2012 CRASH – ERROR 0XC00002E2

нормально грузится в режиме восстановления . файл базы сначало вообще не давал ничего с собой делать через ntdsutil. ругался что не может запустить JET .

журналы переименовывал (как одно из средств восстановления, создаются по новой.)

после Esentutl с разными ключами , база начала хоть как то дефрагментироваться и проверяться. но есть ошибка:

ntdsutil: Activate Instance NTDS
Активный экземпляр — «NTDS».
ntdsutil: files
file maintenance: Compact to c:temptempNTDS
Запуск режима ДЕФРАГМЕНТАЦИИ.
Исходная база данных: C:WindowsNTDSntds.dit
Конечная база данных: c:temptempNTDSntds.dit

Defragmentation Status (% complete)

0 10 20 30 40 50 60 70 80 90 100
|—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
. Операция прекращена с
ошибкой -1605( JET_errKeyDuplicate, Illegal duplicate key ).
______________________________

проверял все доступы к папкам журнала и базы . все нормально.

recover проходит без ошибок. а вот

file maintenance: integrity
Выполнение проверки целостности для базы данных: C:WindowsNTDSntds.dit.

Checking database integrity.

Scanning Status (% complete)

Integrity check completed. Database is CORRUPTED!
Операция прекращена с ошибкой -1206( JET_errDatabaseCorrupted, Non database file
or corrupted db ).

— в домене трудится второй контроллер — с него как то можно взять файл базы или синхронизировать ?

— можно сломанный сервер освободить от роли AD загрузиться в нормальном режиме и опять развернуть службу AD — домен его как » страый «второй КД подхватит?

Ответы

ВОПРОС — МОЖНО ЕГО СЕЙЧАС В СЕТЬ ВОЗВРАЩАТЬ чтоб он реплицировался и встал в строй полноценно??

проверки есть какие нибудь ??

Лучше не возвращать, а принудительно понизить (Uninstall-ADDSDomainController -ForceRemoval в Powershell), вычистить на другом КД информацию о нём из Active Directory (к примеру — удалить подобъект NTDS Settings объекта этого сервера в AD Sites and services) и, если он ещё нужен как КД — повысить заново.

Дело в том, что после выполнения esentutl /p потеря данных при таком исправлении может привести к рассогласованию БД Active Directory с копией на другом КД, которое практически невозможно выявить. А также — к другим трудновыявляемым ошибкам.

Поэтому Microsoft советует (есть статья 258062 в MS KB) прибегать к esentutl /p только как крайней мере — для восстановления единственного КД в домене при отсутствии резервной копии — и даже рекомендует после этого по возможности быстрее произвести миграцию учётных записей пользователей и компьютеров в неповреждённый домен.

Источник

Memorise

How to Fix C00002E2 Directory Services Could Not Start – Blue Screen

There are several reasons you may get get this error. The most common being a corrupt Active Directory database (NTDS.DIT). I know this sounds detrimental, but it’s actually easy to fix this blue screen.

*** This is the Active Directory Database we’re talking about here, so make sure you have a good backup of the server, in case this doesn’t work***

This Stop code is only seen on a system with Active Directory on it. You notice it when the server is booting. You’ll get a blue screen and an error code, like the following:

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.

To begin, do as the message says, and boot into Directory Services Restore Mode. When the server powers on, press F8 before the OS begins to load. You should see a selection screen like this. Choose Directory Services Restore Mode:

Once in Directory Services Restore Mode, you can check if there is a problem with the database by running the following commands:

ntdsutil.exe

activate instance ntds

files

If there is a problem with it, you’ll see something like this returned:

To fix, just rename all of the .log files located in C:windowsntds to .log.old, or anything else, so they can be recreated.

Now reboot the server. For most people, this fixed the database, and the server booted up. For others, it still blue screened after this. If you continue to get a blue screen, run the following command in Directory Services Restore Mode, and then reboot:

esentutl /p “c:windowsntdsntds.dit”

—– Same instruction above in details —

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.

  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 windowssystem32
  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 windowsntds
  11. Type: copy ntds.dit c:backupad
  12. Type: cd windowssystem32
  13. Type: esentutl /g c:windowsntdsntds.dit
  14. This will perform an integrity check, (the results indicate that the jet database is corrupt)
  15. Type: esentutl /p c:windowsntdsntds.dit
  16. Agree with the prompt
  17. Type: cd windowsntds
  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 windowssystem32
  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)

I then rebooted and windows started normally.

Источник

Обновлено 06.05.2022

0xc00002e2

Добрый день! Уважаемые читатели и гости одного из крупнейших IT блогов Pyatilistnik.org. В прошлый раз мы с вами рассматривали менеджер пакетов Winget, который позволяет с помощью PowerShell много чего устанавливать. В сегодняшней статье я буду бороться с пресловутым синим экраном 0xc00002e2, который я поймал на одном из контроллеров домена. Что ж не приятно, но не смертельно, давайте выходить из этой ситуации.

❌Описание ситуации с BSOD  0xc00002e2 на контроллере домена

И так есть Active Directory состоящий из леса и трех доменов, в одном из доменов есть четыре контроллера домена. Один из них в какой-то момент перестал отвечать в системе мониторинга. Это была виртуальная машина на базе Vmware ESXI. Подключившись к консольному подключению я увидел вот такую картину:

0xc00002e2

После перезагрузки сервер опять выпадал в BSOD, и далее по циклу. В логах вы можете потом обнаружить, если доберетесь:

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.

Надеюсь, что у вас это не последний контроллер домена в сети, поэтому самый простой способ это:

  • Восстановить из резервной копии данный контроллер, при условии, что его копия не старше дня, чтобы не было проблем с репликацией
  • Полностью удалить недоступный контроллер домена и заменить его на новый. Если на сервере были роли FSMO, то их сначала нужно захватить и перенести.
  • Но если решились восстанавливать то давайте приступать, может, что и получиться.

Когда вы раза три увидите синий экран с кодом 0xc00002e2, то сервер загрузиться в режиме восстановления WinPE, его при желании можно вызвать клавишей F8 при загрузке. У любого контроллера домена есть специальный режим восстановления службы каталогов (Directory Services Repair Mode — DSRM).

На экране «Choose an option»  выберите пункт «Troubleshoot«.

Choose an option troubleshoot

Далее выбираем пункт «Startup Settings«.

advanced options startup settings

Перезагружаем сервер.

Restart to change Windows options such as

Далее при загрузке найдите пункт «Directory Services Repair Mode»

Выберите пункт Directory Services Restore Mode

Начнется загрузка DSRM, по сути вы увидите привычную загрузку Windows, в которую вы сможете войти под локальным администратором DSRM, он задается при настройке.

Если вы не помните пароль от Администратора DSRM, то придется его сбрасывать, например через MsDART или любой другой загрузочный диск

Попав в систему вы первым делом должны запустить командную строку от имени администратора, и далее нам понадобиться одна из самых важных утилит в Active Directory ntdsutil. Вводим команды:

  • Ntdsutil (Запускаем саму утилиту)
  • activate instance ntds (Подключаемся к активной БД Active Directory)
  • Files (Делаем запрос к файлам. где лежит БД)
  • Info (Смотрим все файлы и их расположение)

(по умолчанию это будет директория C:WindowsNTDS)

В моем случае это нестандартный каталог, у меня все лежит в папке C:ADDSNTDS. Тут же вы можете посмотреть размер файла БД NTDS.dit.

ntdsutil просмотр файлов БД AD

Теперь попробуйте проверить целостность базы данных, для этого вводим:

У меня выскочила ошибка:

Error: Access to source database ‘C:ADDSNTDSntds.dit’ failed with Jet error — 1206. Operation terminated with error — 1206 (Jet_errDatabaseCorrupted, Non database file or corrupted db) after 0.0 seconds

ntdsutil error 1206

Или еще распространенная ошибка:

Could not initialize the Jet engine: database is inconsistent.
Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113

Error -2147418113

Попробуем восстановить целостность Базы данных Active Directory, для этого есть всем известная утилита esentutl, она очень часто используется при работе с почтовым сервером Exchange. Перед любыми работами всегда нужно сделать резервную копию данных, для этого:

mkdir c:ntds_backup  — Создаем папку для резервных копий
xcopy c:ADDSNTDS*.* c:ntds_backup — Копируем содержимое c:ADDSNTDS в c:ntds_backup

Проверим целостность файла ntds.dit:

esentutl /g c:ADDSNTDSntds.dit

Утилита вам сообщит. что с базой не все хорошо и она повреждена:

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.

После чего начнется процесс восстановления,  а может и не начаться и вы легко можете опять получить ошибку Jet error — 1206.

ntdsutil -файл базы Active Directory ntds.dit поврежден

Первый процесс закончен, попробуем исправить найденные ошибки, для этого выполните команду:

esentutl /p c:ADDSNTDSntds.dit

Если все хорошо, то вы должны получить сообщение «Operation completed successfully in xx seconds«.

исправить ошибки в файле базы AD ntds.dit

Обязательно еще раз проверьте в целостности базы данных, выполните:

должно появиться сообщение:

Integrity test successful. It is recommended you to run semantic database analysis to ensure semantic database consistence as well.

проверка целостности базы Active Directory

теперь выполним семантический анализ, для этого:

ntdsutil
activate instance ntds
semantic database analysis
go

При обнаружении семантических ошибок примените ключ fixup:

active directory ntdsutil проверка семантики semantic database analysis

Произведем сжатие БД ntds.dit:

activate instance ntds
files
compact to c:ADDSNTDSTemp

Перезапишем оригинальный файл ntds.dit:

copy c:ADDSNTDSTempntds.dit c:ADDSNTDSntds.dit

Удалите все лог файлы из каталога NTDS:

Перезагрузка

Проверка прав на файлы NTDS

Еще очень важно проверить не сброшены ли были чем-то права на файлы из папки NTDS. Для этого в командной строке введите предварительно попав нужный каталог:

Должны быть права NT AUTHORITYSYSTEM: (ID) F и BUILTINAdministrators: (id) f

Должны быть D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)

Должно быть NT AUTHORITYSYSTEM: (ID) F и BUILTINAdministrators: (id) f

Должно быть D:AI (A; ID; FA;;; SY) (A; ID; FA;;; BA)

Проверка прав на файлы NTDS

Надеюсь, что было полезно. С вам был Иван Сёмин, автор и создатель IT проекта Pyatilistnik.org.

День добрый. 

подскажите пожалуйста по такой проблеме . 

есть домен на 2х контроллерах Win srv 2012 r2 .

один не смог загрузиться из-за переполнения диска где лежит журнал AD. вываливается теперь с 

Server 2012 CRASH – ERROR 0XC00002E2

нормально грузится в режиме восстановления . файл базы сначало вообще не давал ничего с собой делать через ntdsutil. ругался что не может запустить JET . 

журналы переименовывал (как одно из средств восстановления, создаются по новой.)

после Esentutl с разными ключами , база начала хоть как то дефрагментироваться
и проверяться. но есть ошибка:

_____________________________

ntdsutil: Activate Instance NTDS
Активный экземпляр — «NTDS».
ntdsutil: files
file maintenance: Compact to c:temptempNTDS
Запуск режима ДЕФРАГМЕНТАЦИИ…
     Исходная база данных: C:WindowsNTDSntds.dit
     Конечная база данных: c:temptempNTDSntds.dit

                  Defragmentation  Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
          ………………………………………….Операция прекращена с
 ошибкой -1605( JET_errKeyDuplicate, Illegal duplicate key ).
______________________________

проверял все доступы к папкам журнала и базы . все нормально. 

recover проходит без ошибок. а вот 

—————————————

file maintenance: integrity
Выполнение проверки целостности для базы данных: C:WindowsNTDSntds.dit.

Checking database integrity.

                     Scanning  Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
          ……………………………………………

Integrity check completed.  Database is CORRUPTED!
Операция прекращена с ошибкой -1206( JET_errDatabaseCorrupted, Non database file
 or corrupted db ).

———————————————————

вопроса 2 :

— в домене трудится второй контроллер — с него как то можно взять файл базы или синхронизировать ?

— можно сломанный сервер освободить от роли AD загрузиться в нормальном режиме и опять развернуть службу AD — домен его как » страый «второй КД подхватит?

  • Изменено

    20 июля 2016 г. 6:53

За месяц встретил два сервера у различных организаций с такой ошибкой. И первый и второй являлись контроллерами домена.

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

Случилось это все из-за перепада напряжения, и резервных копий конечно не было.

Сервер загружался только в режиме восстановления служб и каталогов.

Поиск в интернете подсказал использовать утилиту ntdsutil для починения:

  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 windowssystem32
  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 windowsntds
  11. Type: copy ntds.dit c:backupad
  12. Type: cd windowssystem32
  13. Type: esentutl /g c:windowsntdsntds.dit
  14. This will perform an integrity check, (the results indicate that the jet database is corrupt)
  15. Type: esentutl /p   c:windowsntdsntds.dit
  16. Agree with the prompt
  17. Type: cd windowsntds
  18. Type: move *.log c:backupad   (or just delete the log files)

Это должно завершить ремонт. Чтобы убедиться, что после ремонта успешно работает:

  1. Type: cd windowssystem32
  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

You have no rights to post comments

Windows Server running on a virtualized domain controller might face an issue like this. It just would not boot up properly and display an error message that would say “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).”

Active directory contains very sensitive and valuable data that can can get damaged. This sometimes occurs if you are implemented a Certificate Authority, deploying a Lync server, or data corruption in DC (Domain Controller) Databases, or just plain old power interruption.

The host/base server running the Hyper-V server would boot up smoothly and you can still see all the virtual machines. However, the Domain Controller server or virtual machine would show it is rebooting in a loop with this error:

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)

In cases of power failure, it will really cause an issue because the DC has a specific cache memory handled by the OS not RAID controller. The said cache will get corrupted and thus would result to the 0xc00002e2 error.

Before you do anything else, make sure to do a backup to avoid further data loss.

Here is how you could recover from this issue.

Restart the machine/virtual machine/instance and press F8 until you reach the boot menu.

Boot into Directory Services Repair Mode (DSRM).

Login with a local administrator account. This is important since Active Directory service is not running during this time.

Open a Command Prompt (Win-R, CMD, Enter)
Navigate to C:WindowsNTDS folder
Create a backup copy of everything in this location.
Type NTDSUTIL and press Enter.
Type “activate instance ntds” and press Enter.
Type “Files” and press Enter.
Type “Info” and press Enter.
Navigate to logs Location and delete (or rename) the *.log.
reboot normally.

Boot into Directory Services Repair Mode for second time
A defrag/compact is necessary.
Open a Command Prompt (Win-R, CMD, Enter).
Type NTDSUTIL and press Enter.
Type “activate instance ntds” and press Enter.
Type “Files” and press Enter.
Type “Info” and press Enter.
Verify the folder is actually C:WindowsNTDS.
Type “Compact to ” and press Enter. I created C:WindowsNTDSTemp and used that.
Copy the new file Ntds.dit in the temp folder over the old one in NTDS, and delete all the *.log files.
Reboot normally.

How to fix Error 0xc00002e2 after rebooting Windows Domain Controller

This error is an indication that the Active Directory database (NTDS.DIT) is corrupt.

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.

In Directory Services Restore Mode, you can check if there is a problem with the database by running the following commands:

ntdsutil.exe

activate instance ntds

files

If there is a problem with the Active Directory database NTDS.DIT, you will see an error like the following:

Could not initialize the Jet engine: Jet Error -501. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113

To resolve this issue, rename all of the .log files located in C:WindowsNTDS to .log.old, so the logs can be recreated after reboot.

This should fixed the database after the server is rebooted once more. If you continue to get the error, you can access again Directory Services Restore Mode and run the following command:

esentutl /p «c:windowsntdsntds.dit»

Reboot the server and the issue should be solved.

Created: October 02, 2018 22:30

Last Updated: October 08, 2020 05:41

Related articles

Have More Questions?

Contact our support instantly via Live Chat

Источник

Server 2012 CRASH – ERROR 0XC00002E2

нормально грузится в режиме восстановления . файл базы сначало вообще не давал ничего с собой делать через ntdsutil. ругался что не может запустить JET .

журналы переименовывал (как одно из средств восстановления, создаются по новой.)

после Esentutl с разными ключами , база начала хоть как то дефрагментироваться и проверяться. но есть ошибка:

ntdsutil: Activate Instance NTDS
Активный экземпляр — «NTDS».
ntdsutil: files
file maintenance: Compact to c:temptempNTDS
Запуск режима ДЕФРАГМЕНТАЦИИ.
Исходная база данных: C:WindowsNTDSntds.dit
Конечная база данных: c:temptempNTDSntds.dit

Defragmentation Status (% complete)

0 10 20 30 40 50 60 70 80 90 100
|—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
. Операция прекращена с
ошибкой -1605( JET_errKeyDuplicate, Illegal duplicate key ).
______________________________

проверял все доступы к папкам журнала и базы . все нормально.

recover проходит без ошибок. а вот

file maintenance: integrity
Выполнение проверки целостности для базы данных: C:WindowsNTDSntds.dit.

Checking database integrity.

Scanning Status (% complete)

Integrity check completed. Database is CORRUPTED!
Операция прекращена с ошибкой -1206( JET_errDatabaseCorrupted, Non database file
or corrupted db ).

— в домене трудится второй контроллер — с него как то можно взять файл базы или синхронизировать ?

— можно сломанный сервер освободить от роли AD загрузиться в нормальном режиме и опять развернуть службу AD — домен его как » страый «второй КД подхватит?

Ответы

ВОПРОС — МОЖНО ЕГО СЕЙЧАС В СЕТЬ ВОЗВРАЩАТЬ чтоб он реплицировался и встал в строй полноценно??

проверки есть какие нибудь ??

Лучше не возвращать, а принудительно понизить (Uninstall-ADDSDomainController -ForceRemoval в Powershell), вычистить на другом КД информацию о нём из Active Directory (к примеру — удалить подобъект NTDS Settings объекта этого сервера в AD Sites and services) и, если он ещё нужен как КД — повысить заново.

Дело в том, что после выполнения esentutl /p потеря данных при таком исправлении может привести к рассогласованию БД Active Directory с копией на другом КД, которое практически невозможно выявить. А также — к другим трудновыявляемым ошибкам.

Поэтому Microsoft советует (есть статья 258062 в MS KB) прибегать к esentutl /p только как крайней мере — для восстановления единственного КД в домене при отсутствии резервной копии — и даже рекомендует после этого по возможности быстрее произвести миграцию учётных записей пользователей и компьютеров в неповреждённый домен.

Источник

Memorise

How to Fix C00002E2 Directory Services Could Not Start – Blue Screen

There are several reasons you may get get this error. The most common being a corrupt Active Directory database (NTDS.DIT). I know this sounds detrimental, but it’s actually easy to fix this blue screen.

*** This is the Active Directory Database we’re talking about here, so make sure you have a good backup of the server, in case this doesn’t work***

This Stop code is only seen on a system with Active Directory on it. You notice it when the server is booting. You’ll get a blue screen and an error code, like the following:

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.

To begin, do as the message says, and boot into Directory Services Restore Mode. When the server powers on, press F8 before the OS begins to load. You should see a selection screen like this. Choose Directory Services Restore Mode:

Once in Directory Services Restore Mode, you can check if there is a problem with the database by running the following commands:

ntdsutil.exe

activate instance ntds

files

If there is a problem with it, you’ll see something like this returned:

To fix, just rename all of the .log files located in C:windowsntds to .log.old, or anything else, so they can be recreated.

Now reboot the server. For most people, this fixed the database, and the server booted up. For others, it still blue screened after this. If you continue to get a blue screen, run the following command in Directory Services Restore Mode, and then reboot:

esentutl /p “c:windowsntdsntds.dit”

—– Same instruction above in details —

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.

  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 windowssystem32
  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 windowsntds
  11. Type: copy ntds.dit c:backupad
  12. Type: cd windowssystem32
  13. Type: esentutl /g c:windowsntdsntds.dit
  14. This will perform an integrity check, (the results indicate that the jet database is corrupt)
  15. Type: esentutl /p c:windowsntdsntds.dit
  16. Agree with the prompt
  17. Type: cd windowsntds
  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 windowssystem32
  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)

I then rebooted and windows started normally.

Источник

Yesterday morning I discovered that my Synology NAS had an unexpected shutdown in the middle of the night while my homelab VMs/workloads were still running.  This caused both of my Domain Controllers databases to become corrupt resulting in being unable to boot those machines.  When attempting to boot them, they would get stuck in a BSOD boot-loop and would display a Stop Error Code of 0x00002e2.

.

After some research I was able to figure out how to recover my VMs and get them to boot up again.  This had happened to me once before sometime earlier this year and luckily I remembered that I had taken some notes on how to fix it so I figured this time I would put together a formal “How To:” guide to have it documented for myself and hopefully to help others facing this issue as well.  So without further adieu…let’s get to it!

.

To start, you will need to power-on the machine and then keep pressing the F8 key to bring up the “Advanced Boot Options” boot menu.  Navigate down to Directory Services Repair Mode enter press Enter to boot you into Safe Mode.

When you reach the login screen, log in with the Local Administrator account since Active Directory Domain Services are obviously unavailable.

Once at the Desktop, open an elevated Command Prompt window.

As a best practice, I feel it is always wise and important to make a backup of the files before doing any modifications.  Since we will be backing up the NTDS directory, create a directory at your preferred location to store the backup files.  I chose to make a backup folder on the root of “C:” and a sub-directory with the name/date of the directory I am backing up.

md C:BackupNTDS_11122017

Then copy everything from the “C:WindowsNTDS” directory to this new location using xcopy.

xcopy C:WindowsNTDS* C:BackupNTDS_11122017 /E /Y /V /C /I

Once done, let’s rename any .log file extensions in the NTDS directory to .log.old

cd C:WindowsNTDS

ren *.log *.log.old

Now, this is where we get to the good stuff!

First, run the following command to repair the database.

esentutl /p "C:WindowsNTDSntds.dit"

This will display the following warning message, click “OK

Let it do its thing and you will see the following once complete.

Now we need to use the NTDS Utility (ntdsutil.exe) to activate the NTDS instance and compact the DB to a new file which will then be used to overwrite the original.  I will be compacting it to a new TEMP directory within the NTDS directory.  The command will automatically create the new directory if it’s not already present.  Enter the following commands.

ntdsutil

activate instance ntds

files

compact to C:WindowsNTDSTEMP

If successful, you will be presented with instructions to copy the newly compacted file to the NTDS directory, overwriting the original, and also to delete any .log files in the NTDS directory.  Before we can do that we need to exit out of the ntdsutil.  Type quit twice to exit.

quit

quit

Let’s follow those instructions and also delete the *.log.old files we renamed earlier.

copy "C:WindowsNTDSTEMPntds.dit" "C:WindowsNTDSntds.dit"

Yes

Ensure you are still in the NTDS directory before entering the following delete commands.

del *.log

del *.log.old

The hard part is now over!  Let’s go ahead and reboot the machine normally.

If all goes well and as expected, your machine will boot successfully and you can log in again with an Active Directory Domain Admin account.

Awesome!  Well, I hope you’ve found this guide useful.  Please feel free to share this and provide me some feedback/comments below.  Thanks for reading!

-virtualex-

CC BY-NC-SA 4.0
Fixing A Corrupt Domain Controller – Stop Code 0x00002e2 by virtualex is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Hi.  I have a server running Windows Server 2012 R2 Standard that has worked just fine for 3 years that will no longer boot. Each time it comes up with error 0xc00002e2.

It all started about 4 months ago after I installed a Microsoft CRM upgrade on my server and it did not work properly so I did an image restore like I have done maybe 10 or 15 times over the years.

As soon as the restore completed the error came up and it has been there ever since.

I have tried restoring from 3 other backups that I have done and each time I get the same error.

I have tried using both NTDSUTIL and ESENTUTL that people have successfully used to eliminate this problem that are listed on various forums but it keeps appearing for me.

I have tried replacing the hard drive and I still get that error.

I have 2 4 GB memory chips in the server so I have tried just having 1 chip in and then the other and I still get the error.

My biggest concern with just replacing the server is that I don’t want to lose all of my information that is in my Microsoft CRM data base.

Any other ideas of what I can try before I just consider the server a complete loss?

Thanks.

Rick Bellefond
RB Data Services
www.rbdata.com


Rick Bellefond RB Data Services www.rbdata.com

Возможно, вам также будет интересно:

  • Ошибка 0xc0000255 windows 10
  • Ошибка 0xc000025 при загрузке windows
  • Ошибка 0xc0000242 при запуске windows 10
  • Ошибка 0xc0000225 windows 10 x64 как исправить
  • Ошибка 0xc0000221 oem drv64 sys

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии