> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Windows Server Won't Boot or Is Stuck in Automatic Repair

> Windows Server won't boot or loops on Automatic Repair? Boot the recovery tools, undo pending updates, run Startup Repair and rebuild the BCD.

If Windows Server won't boot, shows "Preparing Automatic Repair" or ends on "Automatic Repair couldn't repair your PC", open the server's console to see the exact message, then boot the Windows Recovery Environment (from **Advanced options** or a Windows Server ISO). From there, run **Startup Repair**, undo a failed update with `DISM /Image:C:\ /Cleanup-Image /RevertPendingActions`, and rebuild the boot configuration with `bootrec /rebuildbcd`. Restore a backup if none of these work.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Intermediate to advanced | 20 to 60 minutes | Windows Server 2019 / 2022 / 2025 | Console access, a Windows Server ISO of the same version |

## Before you start

* **VPS:** open the [VNC console](https://help.freakhosting.com/portals/vps-panel/how-to-enable-and-use-vnc-console-access.md). RDP doesn't work until Windows has started.
* **Dedicated server:** you need KVM or IPMI access to see the screen. [Open a ticket](https://freakhosting.com/clientarea/submitticket.php) and tell us the message you see.
* Windows starts the recovery environment (WinRE) by itself after two failed starts in a row; that is the "Preparing Automatic Repair" screen.

Write down the exact message. Common ones are:

```text theme={null}
Automatic Repair couldn't repair your PC
Boot Configuration Data (BCD) missing or corrupted
Bootmgr missing or corrupted
INACCESSIBLE_BOOT_DEVICE (stop code 0x0000007B)
```

## How to reach the recovery tools

> [tab] From Automatic Repair
>
> On the **Automatic Repair** screen, click **Advanced options**. You reach **Troubleshoot > Advanced options**, with **Startup Repair**, **Command Prompt** and **System Image Recovery**.

> [tab] From a Windows Server ISO (VPS)
>
> Attach the ISO for your Windows Server version and set it first in the boot order with [mount custom ISOs](https://help.freakhosting.com/portals/vps-panel/how-to-mount-custom-isos-and-configure-boot-order.md). Restart, press a key to boot from the ISO, choose your language, then click **Repair your computer > Troubleshoot > Advanced options**.

## Cause 1: an update or role change failed during the restart

**Check:** the problem started after Windows Update or after adding a role, often after a long "Working on updates" screen.

**Fix:** undo the pending changes. In **Command Prompt** from the recovery tools, first find the Windows drive (it is not always `C:` here):

```bat theme={null}
dir C:\Windows
```

If that fails, try `D:\Windows`. Then, using the drive you found:

```bat theme={null}
DISM /Image:C:\ /Cleanup-Image /RevertPendingActions
```

Close the prompt and restart the server to start Windows. The update will try to install again later; if it fails again, see [Windows Update stuck or failing](https://help.freakhosting.com/portals/other/how-to-fix-windows-update-stuck-or-failing.md).

## Cause 2: damaged boot files or startup configuration

**Check:** messages about the BCD, Bootmgr or a missing operating system.

**Fix:** first run **Troubleshoot > Advanced options > Startup Repair**. If it fails, open **Command Prompt** and run:

```bat theme={null}
bootrec /scanos
bootrec /rebuildbcd
```

If `rebuildbcd` finds no installation, back up and rebuild the BCD store as Microsoft describes:

```bat theme={null}
bcdedit /export C:\bcdbackup
attrib C:\boot\bcd -r -s -h
ren C:\boot\bcd bcd.old
bootrec /rebuildbcd
```

Startup Repair writes its findings to `C:\Windows\System32\LogFiles\Srt\SrtTrail.txt`.

## Cause 3: corrupted system files or disk errors

**Check:** Startup Repair runs but reports it couldn't fix the problem, or the server crashed or lost power before it stopped booting.

**Fix:** in **Command Prompt**, check the file system, then repair system files offline:

```bat theme={null}
chkdsk C: /f /r
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
```

`chkdsk /r` reads the whole disk and can take a long time on large drives.

## Cause 4: a new driver, service or program

**Check:** the problem started after installing software, a driver or security tools, or Windows shows a stop code after the logo.

**Fix:** start in **Safe Mode**: **Troubleshoot > Advanced options > Startup Settings > Restart**, then press **4** (or **F4**). Press **5** for Safe Mode with Networking. If Windows starts, uninstall the new software or roll back the driver, then restart normally. Check [Event Viewer](https://help.freakhosting.com/portals/other/how-to-use-event-viewer-to-find-errors.md) for event `7045` (new service) and `1001` (bugcheck) to find what changed.

## Cause 5: the boot type was changed

**Check:** on a VPS, the [boot type (BIOS or UEFI)](https://help.freakhosting.com/portals/vps-panel/how-to-configure-boot-type-bios-vs-uefi.md) was changed after Windows was installed.

**Fix:** set it back to the mode Windows was installed with and restart.

## Last resort: restore or reinstall

If nothing works, restore the latest [backup](https://help.freakhosting.com/portals/vps-panel/how-to-schedule-and-restore-backups.md). To save files first, boot the VPS into [rescue mode](https://help.freakhosting.com/portals/vps-panel/how-to-use-rescue-mode.md) and copy your data off. As a final step, [reinstall the VPS](https://help.freakhosting.com/portals/vps-panel/how-to-rebuild-and-reinstall-your-vps.md), which erases the disk.

> [!WARNING]
>
> Rebuilding or reinstalling deletes everything on the server. Copy your data off first.

## How to check it worked

Windows reaches the sign-in screen in the console and you can connect with Remote Desktop again. Remove the ISO and set the disk first in the boot order again.

## Frequently asked questions

### How do I stop the Automatic Repair loop?

Fix the cause with the steps above. Microsoft also documents `bcdedit /set {default} recoveryenabled no` to stop Windows from entering recovery automatically, but that only hides the loop.

### Will Startup Repair delete my files?

No. Startup Repair and the commands above don't remove your data. Reinstalling or rebuilding the server would.

### Which ISO do I need?

The installation ISO for the same Windows Server version (2019, 2022 or 2025) that is installed.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Repair with SFC and DISM](https://help.freakhosting.com/portals/other/how-to-repair-windows-with-sfc-and-dism.md)
>
> Repair once Windows starts.

> [card] [Windows Update stuck or failing](https://help.freakhosting.com/portals/other/how-to-fix-windows-update-stuck-or-failing.md)
>
> Updates that break restarts.

> [card] [Back up a Windows server](https://help.freakhosting.com/portals/other/how-to-back-up-a-windows-server.md)
>
> Be ready next time.

> [card] [Mount a custom ISO](https://help.freakhosting.com/portals/vps-panel/how-to-mount-custom-isos-and-configure-boot-order.md)
>
> Boot the VPS from an ISO.

> [card] [Rescue mode](https://help.freakhosting.com/portals/vps-panel/how-to-use-rescue-mode.md)
>
> Copy data off a broken VPS.

***

> [!NOTE]
>
> **Checked against [Microsoft Learn: Windows startup issues troubleshooting](https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/windows-boot-issues-troubleshooting) , [Windows Recovery Environment technical reference](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-recovery-environment--windows-re--technical-reference?view=windows-11) and [Microsoft Support: Start in Safe Mode](https://support.microsoft.com/en-us/windows/start-your-pc-in-safe-mode-in-windows-92c27cff-db89-8644-1ce4-b3e5e56fe234)** on 4 November 2026. Steps were not tested on a live Windows server for this page; recovery menus can differ slightly between Windows Server versions.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.