The SrtTrail.txt error is Windows telling you that Automatic Repair tried and failed. You’ll see a blue screen saying your PC couldn’t start correctly, referencing C:\Windows\System32\Logfiles\Srt\SrtTrail.txt. The frustrating part: rebooting just runs the same failed repair again, forever.

Here’s the mindset shift that fixes it: stop running Automatic Repair. It’s a diagnostic that already gave you its answer (it can’t fix this). The “best way” through this error is a short, decisive sequence — break the repair loop, rebuild the boot data, check the disk — that resolves most cases in under 30 minutes. For the longer diagnostic walkthrough, see our SrtTrail.txt troubleshooting guide .

Resist the urge to try random fixes from forum threads — the sequence matters. Rebuilding the BCD before checking the disk, for example, can fail if disk errors are the actual problem, sending you in circles. The order below is deliberate: break the loop, stabilize the boot path, verify the disk, then repair the files.

Why this happens

  • Corrupted Boot Configuration Data (BCD): The most common cause — Windows can’t find its own boot files, and the repair tool can’t rebuild them automatically.
  • Disk errors or bad sectors: Damage on the system partition breaks files that both Windows and the repair tool need.
  • Corrupted system files: A failed update or power loss damaged critical boot files (winload.exe, ntoskrnl.exe).
  • Driver conflicts: A bad driver (often storage or display) installed just before the failure prevents boot, and repair can’t remove it.
  • Recent Windows update damage: A half-applied update leaves the system in a state neither normal boot nor repair can handle.
  • Failing SSD/HDD: If the drive itself is dying, repairs fail because the underlying storage can’t reliably hold data.
  • Full EFI or recovery partition: A boot partition with no free space can cause boot writes to fail.

How to fix it

Work through these in order. You’ll need the WinRE Command Prompt for most of them.

Fix 1: Get to WinRE and open Command Prompt

  1. If you’re stuck in the Automatic Repair loop, click Advanced options on the blue screen (don’t click Restart — it just loops again).
  2. Go to Troubleshoot > Advanced options > Command Prompt.
  3. If the PC asks you to choose an account, pick your administrator account and enter the password. Microsoft’s recovery environment guide documents these options.

Everything from here happens in this Command Prompt window.

Fix 2: Break the Automatic Repair loop

This stops the endless repair attempts so you can work on the actual problem. It doesn’t fix anything by itself — but it transforms an infinite loop into a diagnosable boot attempt, which is the foundation for everything that follows.

  1. In Command Prompt, type bcdedit /set {default} recoveryenabled No and press Enter.
  2. Type exit, then choose Continue to restart.
  3. Windows will now show you the real underlying error (often a specific stop code) instead of hiding behind Automatic Repair. Note what it says — it guides the next steps. If it boots, you’re done.

Fix 3: Rebuild the BCD and boot files

This is the fix that resolves the majority of SrtTrail.txt cases.

  1. Back in WinRE’s Command Prompt, run bootrec /fixmbr.
  2. Run bootrec /fixboot. If it says “Access is denied,” run diskpart, then list vol, find the FAT32 EFI partition, sel vol <number>, assign letter=S:, exit, then bcdboot C:\Windows /s S: /f UEFI (adjust C: if your Windows drive has a different letter in WinRE — verify with dir C: first).
  3. Run bootrec /scanos followed by bootrec /rebuildbcd, typing Y to add found installations.
  4. Type exit and restart.

Fix 4: Check the disk for errors

If the BCD rebuild didn’t do it, disk corruption is the next suspect. The /r flag does a full surface scan — slow, but it’s the only way to find physical defects hiding under the file system.

  1. In the WinRE Command Prompt, identify your Windows drive letter (often D: or E: in WinRE — check with diskpart > list vol).
  2. Run chkdsk C: /r (using the correct letter). The /r flag finds bad sectors and recovers readable data — this takes a while on large drives, let it finish.
  3. If chkdsk reports unrecoverable bad sectors on an SSD, back up immediately after booting — the drive is telling you it’s dying.

Fix 5: Repair system files offline

  1. Still in Command Prompt, run sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows (adjust the drive letter to match yours).
  2. If SFC can’t fix everything, run DISM /Image:C:\ /Cleanup-Image /RestoreHealth — this needs the drive letter too and can take 15+ minutes.
  3. Restart and test.

Fix 6: Disable early-launch anti-malware and test

A corrupted ELAM driver can block boot in ways repair can’t fix.

  1. From WinRE: Troubleshoot > Advanced options > Startup Settings > Restart, press 8 to Disable early launch anti-malware protection.
  2. If Windows boots, update or reinstall your antivirus — its boot driver was the problem.

Fix 7: System Restore to before the failure

  1. In WinRE: Troubleshoot > Advanced options > System Restore.
  2. Choose the most recent restore point from before the problem started.
  3. Complete the wizard and restart. Files are untouched.

If your system never had restore points enabled, our System Restore guide for laptops shows how to set them up for next time.

Fix 8: Reset Windows (keep files) as the final option

  1. In WinRE: Troubleshoot > Reset this PC > Keep my files.
  2. Choose Local reinstall.
  3. This rebuilds Windows from scratch while preserving your personal files. You’ll reinstall applications afterward, but the boot problem will be gone. If the built-in reset fails, create USB media from the Windows 11 download page for a clean install.

Closing

SrtTrail.txt looks scary but it’s just a failed repair log, not a diagnosis. The winning sequence is: stop the repair loop, rebuild the BCD, check the disk, repair system files — in that order. That chain fixes the overwhelming majority of cases without touching your data. If chkdsk keeps finding new bad sectors or the drive disappears from BIOS intermittently, stop troubleshooting software and replace the drive; no amount of bootrec will fix failing hardware. And if you ever see SrtTrail.txt again after fixing it, check the disk first that time — a recurring SrtTrail.txt is the signature of a drive that’s degrading, not a boot configuration that keeps breaking on its own.

Frequently asked questions

What is the SrtTrail.txt error?
It’s the log file Windows creates when Automatic Repair runs and fails. The blue screen message (often with stop code 0xc000021a or similar) means Windows couldn’t boot, tried to repair itself, and the repair also failed. The file itself at C:\Windows\System32\Logfiles\Srt\SrtTrail.txt just documents what the repair attempted.
Why does Automatic Repair keep looping with SrtTrail.txt?
Because the underlying cause — corrupted boot files, a bad driver, or disk errors — is still there, so every boot triggers another doomed repair attempt. Breaking the loop requires fixing the root cause from the Command Prompt in WinRE, not running Automatic Repair again.
Will fixing SrtTrail.txt delete my files?
No. The standard fixes — rebuilding the BCD, running chkdsk, disabling automatic repair, and System Restore — don’t touch personal files. Only a clean Windows reinstall would, and that’s the last resort.
How do I stop the Automatic Repair loop?
From WinRE’s Command Prompt, run bcdedit /set {default} recoveryenabled No to stop the loop, then address the actual boot problem with bootrec commands and chkdsk. This gets you off the repair merry-go-round so you can fix the real issue.