1. Reboot the server. As it's booting, press F8
repeatedly until you come to a stop screen
2. Select Directory Services Restore Mode
3. Log into the server with a local user account
4. Open a command prompt and run the following:
> activate instance ntds
This will likely throw an error similar to "Could not initialize the Jet engine: Database is inconsistent. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113" or "Could not initialize the Jet engine: Jet Error -501. Failed to open DIT for AD DS/LDS instance NTDS. Error -2147418113". If so, continue with the next steps.
5. Open Windows Explorer to C:\Windows\NTDS and rename all the .log files to .log.old so they can be recreated
6. Reboot the server normally. If it succeeds, you're done. If not, continue with the next steps
7. If the server still fails to boot with the same error, boot back into Directory Services Restore Mode
8. Login, open a command prompt and run the following:
> esentutl /p "c:\windows\ntds\ntds.dit"
9. Reboot normally