How to Fix Windows Server 2012 R2 Boot Loop Issue

Windows Server 2012 (R2) boot loops are an annoying problem. Read this article to learn why it happens and how to fix it effectively.

Yuka

By Yuka Updated on February 13, 2023

Share this: instagram reddit

User Case: Windows Server 2012 R2 Restart Loop

“Today we facing windows server 2012 R2 keep on restart loop after trying to load the windows login. It prompt "Your PC ran into a problem and needs to restart. We're just collecting some error info, and then we"ll restart for you". This problem happen to 2 servers. We suspect is due to windows updates. We don't know which update causing this problem. We tried enter to safe mode, but cannot go in as well. We are using HP DL380e G8. Please advice on how to resolve this issue.”

-Question from Microsoft Community

Why Windows Server 2012 R2 is Stuck in Boot Loops

It is not uncommon to encounter Server 2012 (R2) boot loops, and the specifics of boot loops can vary widely. Your machine may enter a reboot loop after an update and display the message "We couldn’t complete the updates", it may always boot to the blue "Choose an Option" screen. And it may get stuck in a reboot loop like your PC is experiencing problems and now reboots with an error code. In either case, this is an annoying problem.

Before you learn how to fix the Windows Server 2012 (R2) boot loop issue, take a look at what could be causing this:

  • Update failure.
  • Corrupted RAM sticks.
  • Outdated drivers.
  • Bad Registry entries.
  • Hard drive issues...

Precaution: Back Up Windows Server 2012 R2 Before Fixing Errors

Every operation can lead to data loss or system crash, so you need to create a backup in advance, especially if you have problems with your computer. If you can't access your system, you can go into safe mode and back up what you like on Windows Server 2012 R2. Since Windows Server backup has many limitations, such as 2 TB limit, limit of number of backups, etc., I would like to recommend the best server backup software - AOMEI Backupper Server. It has rich features to meet all your needs for server backup.

  • It enables you to create system/disk/partition/file backups. You can also create cloud backups to back up important files to AOMEI cloud.
  • You can run automatic backups in five schedule modes. Daily/Weekly/Monthly/Event Triggers/USB Plug In. Various backup destinations are supported, including internal/external hard drives, network shares, NAS devices, etc.
  • It works well on Windows Server 2003, 2008, 2012, 2016, 2019, 2022 (including R2), SBS 2003, 2008, 2011 and Windows PC systems.

Don't hesitate to download this powerful server backup software. After installing it on your server, you can use it to backup Windows Server 2012 R2 easily.

Download Free Trial Windows Server & PC
Secure Download

System Backup

Possible Fixes for Windows Server 2012 R2 Boot Loop Issue

The causes of Server 2012 R2's endless boot loops are complex and vary. To resolve this issue, you can start by unplugging all peripherals, rolling back drivers or disabling Automatic Restart. If the boot failure persists, you may need to access a command prompt and then restore pending updates, restore the system registry, scan system files, rebuild the BCD, or do something else.

☞ To access Command Prompt

  1. Insert the Windows Server 2012 R2 installation CD/DVD into the machine and boot from it by changing the boot drive in the BIOS.
  2. When prompted with "Press any key to boot from CD or DVD", press a key.
  3. Select the language, time and currency format, keyboard or input method you want to install, then click "Next".
  4. Select "Repair your computer" in Windows Server 2012 R2. Then, click "Next".

Repair Your Computer

  1. In the "System Recovery Options" window, select "Command Prompt".

Command Prompt

  1. After entering the "Command Prompt", you can try one or more of the measures proposed below, depending on your situation.  

Solution 1. Run DISM Command to Revert Pending Updates

When Windows Server 2012 R2 stuck on restarting screen after an update and says "We couldn’t complete the updates. Undoing changes. Don’t turn off your computer", you can restore the pending update by running the following command to resolve the error.

  • mkdir d:\scratch (This command is used to create a new directory called Scratch)
  • dism /image:d:\ /scratchdir:d:\scratch /cleanup-image /revertpendingactions

Revert Pending Actions

🥝 Note: “d” is the drive letter of the drive that holds “Windows” folder. You can change it according to your own case.

After reverting, exit from Command Prompt and restart your machine from system hard drive.

Solution 2. Restore Bad Registry from Regback

If Windows Server 2012 automatic repair loop issue is related with missing or corrupted system registry files, follow steps below to restore system registry files from backup.

  1. Confirm your system drive. For example, if you're not sure if C is your system drive, you can run "dir c: " to see if there are Program Files, Users, etc.
  2. Type " copy d:windowssystem32configRegBack* d:windowssystem32config " and hit enter.

Restore Windows Registry

🥝 Notes:

  • If the disk letter of your system drive is not d, replace "d" with the corresponding disk letter.
  • This method may not work when the backup of the registry is too old.

Solution 3. Scan And Replace Corrupted System Files

If the Windows Server 2012 R2 boot loop problem is not related to update failures or system registry files, consider scanning all protected system files for integrity and fixing the incorrectness by entering the command "sfc/scannow" and hitting enter.

SFC Command

Solution 4. Run Bootrec Command to Repair MBR

In many cases, boot failure occurs due to corrupted MBR. To scan and repair it, you can run the commands given below.

  1. Firstly, to rebuild BCD and repair MBR. You can type the command below:
  • bootrec.exe /fixmbr (writes a new MBR (Master Boot Record) to the system partition.)
  • bootrec.exe /fixboot (writes a new boot sector onto the system partition.)
  •  bootrec/scanos
  • bootrec.exe /rebuildbcd (scans all disks for Windows installations and provides a choice of which entries to add to the BCD store.)

Bootrec

  1. Then you can run Chkdsk to check and repair the hard drive filesystem corruption.. Type the following command with partition driver letter.
  • chkdsk/r c:
  1. Restart your computer and see if this works.

Solution 5. Uninstall Update

Microsoft released the Windows Server 2012 R2 KB5009624 update, installing this update will cause your Server 2012 domain controller boots in loops. And the update also affects the Hyper-V servers and most admins have observed the Hyper-V not starting, and inaccessible ReFS volumes until the updates are rolled back. You can try to boot from the installation media, then, open CMD and use command lines to uninstall specific updates:

  1. Boot from your installation media, go to the Command Prompt as you did at the beginning.
  2. Then type the following command and press Enter:
  • wusa /uninstall /kb:4093123

Conclusion

Now you have mastered how to deal with Windows Server 2012 R2 boot loop issues. But there are many more errors that cause Server blue screen, for example, BSoD Error 0xC000021A on Windows Server 2012 R2. The solution for each problem will also be different. To save your effort and time. It is recommended that you clone Windows Server 2012 R2 disk as a backup or back up the OS in advance.

Yuka
Yuka · Editor
Yuka, our dedicated editor at AOMEI Technology, is committed to bringing you valuable insights and guidance in data protection. Her mission is to empower everyone with her knowledge in computer backup and recovery, disk cloning, file synchronization, and more. Yuka's goal is to do her best to make complex tech tasks simple and ensure that your digital world remains safe and secure.