< -- BuySellAds Ad Code ALLEN -->
  • Home
  • Microsoft
  • Domain Controller in Directory Services Restore Boot Loop

Domain Controller in Directory Services Restore Boot Loop

IT Problem

Came across this issue a few days back on a SBS2008 Server and it took AGES after going through the usual diag routes to get it resolved, the clients Domain Controller after a reboot booted into directory services restore mode.

(Update:I believe this error was down to the user removing snapshots manually that veeam had created when it had failed to backup. Manually deleting the snapshots caused the issues.)

Strange I thought, so another reboot and the same, directory services restore mode.The domain controller was in a directory services restore mode loop.Then the diag process started , did an AD database integrity check, did a scan disk of the volume, CHKDSK /f. Ran MSconfig and set it to boot into normal mode. I also noted that under the environment variable section under My Computer > Advanced, there was a variable saying SAFEBOOT – DSREPAIR, so I deleted that. no success.

It was with reluctance that I then tried to do a restore of active directory, so once i restored to a week old backup , guess what…it did EXACTLEY THE SAME. I just could not understand what was happening. Finally I did the steps below and after a reboot the server came up clean.

IT Solution

The first thing you need to do it locate your “boot” folder, most of the time it is on the root of C however on my server which was a HP ml350 G7 it was on a hidden drive. So if this is the case Right click Computer > Manage > Disk Management. Then right click the volume and allocate it a drive letter.

Ok, so go to that drive then CD into the boot folder. We then need to run the commands below.

	bcdedit /set safeboot dsrepair

	bcdedit /deletevalue safeboot

	shutdown -f -r

What this does is clear the DSrepair status from the registry so the server can boot normally, in msconfig if you set the server to boot normal it does not effect this registry key.

You should now find that your domain controller does not boot into directory services restore mode.

Tags: Active directory

Allen White

Allen is an IT Consultant and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5, 6 and HP ASE, AIS - Network Infrastructure.

Comments (11)

  • Avatar

    Travis

    |

    Fantastic article, I just had nearly the exact issue on a SBS2008 DC and my search terms eventually let me here. Failed Veeam jobs, stuck in DSRM, etc… I didn’t think about resetting the boot mode in the BCD store like that. I had tried all of the same things and was nearly to the point of restoring the DC VM from backup. Great job!

    Reply

    • Avatar

      Allen White

      |

      Glad to help Travis, I thought I cannot be the only one who has had this, took me days to fix it initialy and like you was close to a DC restore and the problems that that brings.

      Reply

  • Avatar

    RP

    |

    You’ve just saved my night, Sir. After patching the server hung on configuring system and needed a kick (aka reset) in the pants, but then it went into the DSRM loop.

    Your little trick set things straight and it’s likely that I’ll get to bed on time (I work the overnight shift).

    Reply

  • Avatar

    yossi Amara

    |

    man you are the it pro just saved me on sbs2011 that run on vmware after 2 ours of hard work with no luck until crossed over your awesome idea
    thanks alot

    Reply

  • Avatar

    Nate D

    |

    Worked perfectly, I had a similar issue with a reboot loop on a 2008R2 Domain Controller. Server came up nicely after running the commands. Thanks again!

    Reply

  • Avatar

    Scott McKenzie

    |

    As per the others above, had exactly the same issue… thankfully I found this BEFORE attempting the AD restore.

    Reply

    • Avatar

      Allen White

      |

      Excellent, glad to help. I remember spending days on this before finding the fix.

      Reply

  • Avatar

    Andy

    |

    Good fix. When I see this I usually login to the local server account and run msconfig. Click the boot tab and uncheck safe boot.

    Reply

  • Avatar

    JK

    |

    Awesome, saved me in a failed VMware to HyperV migration for a 2008 DC.

    Reply

  • Avatar

    Daniel B

    |

    Thank you! Thank you! Thank you! Saved my day. Our SBS 2011 on VMWare needed this fix after a restore from a Veeam backup.

    Reply

  • Avatar

    Romain

    |

    THANKS A LOT !!!!
    After 2 day of search on internet i find your tips.

    My crash is arrival after moving manually my Server2012 VM.

    The method work ! And now my AD too. 🙂

    Thanks you men

    Reply

Leave a comment

Categories

Vote!

What Web Browser Do You Use?

View Results

Loading ... Loading ...

Vote!

What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...