Reboot loop after restarting computer in Safe Mode
Windows can stop booting for many reasons. Here we've asked Windows to perform the simple task of restarting into Safe Mode. An option that allows Windows to boot with only the bare minimum of what's necessary for it operate. Except, in this case, Windows didn't reach the desktop after configuring it to restart in this mode. Instead, you've noticed that it's continuously rebooting and is now stuck in a loop that you can't get back into Windows to resolve.
This had happened to me recently with a client's network. While connected remotely using the software TeamViewer, I was destined with the task of removing the antivirus solution to prepare it for a replacement. This particular computer is a domain controller and failed to uninstall this security software through traditional means. However, there's a procedure outlined by the software manufacturer to resolve this failure by running a removal tool in Safe Mode. Using the option available in TeamViewer to reboot the computer into Safe Mode, I went ahead with this procedure. Only to have this server never return to an online state. A continuous ping to this server from another computer on site would fail initially, but then respond for a few seconds before timing out again. This repetitive outcome would confirm that the server was now stuck in a reboot loop.
Unfortunately there won't be a way to resolve this remotely. This guide will show you how to resolve this troubling issue with physical access to the computer using the command prompt within the Windows recovery environment.
Step 1: Boot to Windows Recovery Environment & open Command Prompt
Due to the reboot loop caused by the attempt to enter Safe Mode, we're now not able to access Windows as we normally would to complete any repair procedures from there. This now requires us to boot to the Windows Recovery Environment to access the tools that'll be needed to resolve the issue.
This environment will contain a variety of useful tools to repair a Windows installation. We'll be looking for the link to the Command Prompt that'll be used later in this article to remove the option that's instructing Windows to boot directly to Safe Mode. The Command Prompt utility will be located under the Advanced Options after entering the Troubleshooting section of the Windows Recovery Environment. You may be prompted to enter the password to your administrator account when first launching the Command Prompt.
Step 2: Use BCDEdit to revert Safe Mode
Once you've gained access to the Windows recovery environment and have opened the command prompt, we'll then be able to enter the commands to repair the problem that's preventing Windows from starting. This will be done by removing the safeboot option that's instructing Windows to boot directly into Safe Mode upon startup. From within the Windows recovery environment, select Troubleshoot and then Command Prompt. In some cases, you may need to select Troubleshoot, Advanced Options, and then Command Prompt to launch the application. Remember that you may be prompted to select and enter the password for a Windows administrator account during these steps.
Once the Windows command prompt has been successfully launched, issue the following command that'll display the current boot configuration data.
bcdedit
This will output the current configuration that'll look similar to what's shown in figure 2 below. You'll need to look for the safeboot option and take note of the Identifier that's in that section of the boot configuration data. We'll need to use this identifier in the next steps to remove the safeboot option that's in place.
Once the correct identifier has been gathered, the command to remove the safeboot option can then be submitted. Figure 2 above shows the identifier value as {default} and will be used in our example below. You may also notice that your safeboot option is set to "minimal" or another value. This will not change the input of the command on your end. You'll only need to replace the identifier with your identifier that was obtained in the previous step. Submit the following command using the command prompt to remove the safeboot option from the boot configuration data. Changing the {default} identifier to the correct identifier if necessary.
bcdedit /deletevalue {default} safeboot
Once this command has been successfully applied, you may exit the command prompt and the Windows recovery environment and restart the computer. Windows should now hopefully startup successfully in its normal mode.