Think Like a Computer
No ads, no affiliate links, no software recommendations you did not ask for.

Automatic Repair Loop: Causes and Fixes

Learn why Windows Automatic Repair loops, how to read its log, and step-by-step fixes before reinstalling. Covers bootrec, DISM, SFC, and more.

When Windows fails to start twice in a row, the recovery environment takes over and runs Startup Repair (also called Automatic Repair). The tool is meant to diagnose and fix boot problems, but on many machines it instead enters a loop: the screen shows “Preparing Automatic Repair”, then “Diagnosing your PC”, then “Automatic Repair couldn’t repair your PC”, and then the machine restarts and does it all again. The loop happens because the recovery tool cannot determine the cause of the boot failure, so it keeps retrying the same generic fix. The actual reason may be a corrupted system file, a failing disk, a recent update, or a misconfigured boot entry.

The recovery environment itself is a minimal Windows PE (Preinstallation Environment). It has its own drivers and a limited set of tools. When it cannot repair the boot, it leaves a log file that records what it found. Reading that log is the first step in understanding what is wrong, because it often names the failing component.

What the Log Tells You

The log file is at X:\Windows\System32\Logfiles\Srt\SrtTrail.txt where X: is the drive letter of the Windows partition as seen from the recovery environment. To view it, you need to open a command prompt from the recovery screen.

  1. On the “Automatic Repair couldn’t repair your PC” screen, select Advanced options.
  2. Go to Troubleshoot > Advanced options > Command Prompt.
  3. Identify the drive letter of the Windows installation. Often it is C:, but in recovery it may be D: or another letter. Use diskpart to list volumes:
diskpart
list volume
exit

Note the volume that contains the Windows folder. Then open the log:

notepad X:\Windows\System32\Logfiles\Srt\SrtTrail.txt

Replace X: with the correct drive letter. The log shows the results of each repair attempt. Look for lines that mention a specific file or driver. Common entries include:

  • Root cause found: A recently installed driver or software caused the problem. – This points to a driver or update.
  • Boot status: 0xc000000f – This indicates a boot configuration data (BCD) problem.
  • File: \Windows\System32\drivers\... – A specific driver file may be missing or corrupt.

The log may also say No root cause found – that means the tool could not identify a single cause, which is common when the issue is a failing disk or a corrupted system file that the tool cannot read.

Causes in Order of Likelihood

CauseHow to Tell It ApartWhen This Fix Does NOT Apply
Corrupted system filesThe log shows a file that cannot be read, or No root cause found; other repairs failIf the disk itself is failing – you will see disk errors in the log or hear clicking sounds
Boot configuration (BCD) corruptionError 0xc000000f or 0xc000000e; the machine may say “Bootmgr is missing”If the log points to a driver file instead
Recent driver or updateThe log says “recently installed driver or software”If the machine has not been updated recently
Failing hard disk or SSDchkdsk reports bad sectors, or the disk is not detected in diskpartIf the disk is healthy and all files are intact
Misconfigured BIOS/UEFI settingsThe machine boots to the wrong device or shows a “No bootable device” errorIf the machine reaches the Windows logo before the loop starts

Repairs, Least-Destructive First

1. Let the Recovery Tool Finish

Sometimes the loop is just the tool restarting before it has finished. On the “Automatic Repair couldn’t repair your PC” screen, select Advanced options and then Continue to exit to Windows. If Windows loads, the repair actually succeeded but the machine rebooted prematurely. If it does not load, proceed.

2. Boot into Safe Mode

If the cause is a driver or update, Safe Mode may load a minimal set of drivers and allow you to uninstall the problem.

From the recovery screen, go to Troubleshoot > Advanced options > Startup Settings and click Restart. After the restart, press 4 or F4 to enter Safe Mode. If Safe Mode loads, use Device Manager to roll back or uninstall recently updated drivers, or use Settings > Update & Security > Windows Update to uninstall the latest quality update.

3. Use Bootrec to Rebuild the Boot Configuration

If the BCD is corrupted, the built-in tool bootrec can rebuild it. This does not touch personal files.

From the Command Prompt in the recovery environment, run:

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
  • /fixmbr rewrites the master boot record – does not affect data.
  • /fixboot writes a new boot sector – does not affect data.
  • /scanos scans for installed Windows installations.
  • /rebuildbcd rebuilds the boot configuration data – this may remove custom boot entries, such as Linux dual-boot options.

After running these, restart the machine. If the loop persists, continue.

4. Run System File Checker and DISM

Corrupted system files are a common cause. Use sfc and dism from the recovery command prompt. These tools repair the Windows image and system files.

First, run DISM to repair the Windows image:

dism /online /cleanup-image /restorehealth

This command requires internet access to download missing files, but it can also use the Windows installation media as a source. If you have a USB or DVD with Windows, insert it and run:

dism /online /cleanup-image /restorehealth /source:X:\sources\install.wim /limitaccess

Replace X: with the drive letter of the installation media. The /limitaccess flag prevents DISM from using Windows Update as a source.

Then run System File Checker:

sfc /scannow

sfc verifies the integrity of system files and replaces corrupted ones. It may take several minutes. After both commands complete, restart.

5. Check the Disk for Errors

A failing disk can cause the loop because the recovery tool cannot read the files it needs. Use chkdsk to scan for bad sectors and file system errors.

From the command prompt, run:

chkdsk C: /r

Replace C: with the drive letter of the Windows partition. The /r flag locates bad sectors and recovers readable information. This command can take hours on a large disk. It does not delete files, but if the disk is failing, it may not be able to recover everything.

If chkdsk reports many bad sectors, the disk is likely failing. Back up any important data immediately, because further use may cause more data loss.

6. Reset This PC

If none of the above works, the Windows installation may be too damaged to repair. The recovery environment offers a reset option that reinstalls Windows while optionally keeping personal files.

From the recovery screen, select Troubleshoot > Reset this PC. Choose Keep my files to preserve personal data, but note that this will remove installed applications and settings. Choose Remove everything to wipe the drive – this deletes all personal files, so use it only if you have a backup or no important data.

This is a destructive step. It will reinstall Windows and may delete all personal files if you choose that option. Before proceeding, ensure you have a backup of anything you cannot afford to lose.

7. Reinstall Windows from Installation Media

If Reset fails or the disk is too damaged, a clean install is the last resort. This completely erases the drive and installs a fresh copy of Windows. It destroys all data on the drive, so it is only appropriate when all other options have been exhausted and you have confirmed the disk is still functional.

To do this, you need a Windows installation USB or DVD. Boot from it, choose Install now, and when asked for the installation type, select Custom. Delete all existing partitions on the drive and install to the unallocated space.

What People Get Wrong About This

A common mistake is assuming the loop is always caused by a corrupted system file or a virus. In reality, the most frequent cause is a recent Windows update or driver that conflicts with the boot process. The recovery tool’s log often points to this, but many users skip reading the log and jump straight to reinstalling.

Another natural mistake is to immediately suspect the hard drive. While a failing disk can cause the loop, it is less common than a software issue. The disk is easy to blame because the symptoms are similar: the machine cannot boot. However, running chkdsk and checking the log will often reveal that the disk is healthy and the problem is a corrupted boot configuration or a bad driver.

People also tend to run sfc and dism in the wrong order. DISM should be run first because it repairs the system image that SFC relies on. Running SFC first may result in it failing to repair files because the image itself is corrupt.

Finally, some users try third-party “repair” tools that promise to fix the boot with one click. These tools are not recommended because they often make the problem worse by modifying the boot configuration incorrectly. The built-in tools are sufficient and safer.

Common questions

How do I get out of the automatic repair loop?

First try selecting 'Advanced options' and then 'Continue' to exit to Windows. If that doesn't work, use the recovery command prompt to run bootrec, DISM, and SFC. If those fail, try Reset This PC, which reinstalls Windows while optionally keeping your files.

What does 'Automatic Repair couldn't repair your PC' mean?

It means the recovery tool attempted to fix the boot problem but could not identify or resolve the cause. The tool leaves a log file at X:\Windows\System32\Logfiles\Srt\SrtTrail.txt that may contain clues about what went wrong.

Can a failing hard drive cause the automatic repair loop?

Yes, a failing hard drive can cause the loop because the recovery tool cannot read the files it needs. Run chkdsk from the recovery command prompt to check for bad sectors. If chkdsk reports many errors, the drive is likely failing and should be replaced.

Will I lose my files if I use Reset This PC?

Reset This PC gives you the option to keep personal files or remove everything. Choosing 'Keep my files' preserves your documents and photos but removes installed apps and settings. Choosing 'Remove everything' deletes all files, so back up important data first.

Why does the automatic repair loop keep happening after I try to fix it?

The loop persists if the underlying cause is not addressed. Common reasons include a corrupted boot configuration, a recent driver or update that conflicts, or a failing disk. Reading the SrtTrail.txt log and following the repair steps in order will help resolve it.

Read next