"Spinning circle" Issue on Windows OS Boot After Image-Based Restore
Situation
After restoring from an image-based backup Windows OS does not boot and stays on the "Spinning Circle" screen indefinitely.
Cause
Common cause for such an issue is restoration of an image-based backup of a Windows-based machine that was in "Pending Reboot" state during backup.
Sometimes software installation may require a reboot of Windows OS. This happens because some applications modify or replace system files that are currently in use. Backup of an operating system in a "Pending Reboot" state counts as inconsistent and could be problematic upon restoration and boot.
Potential scenario leading to a Windows OS boot problem:
- Windows OS in a "Pending Reboot" state is backed-up via image-based backup.
- This image is then restored on a different machine.
- After restoration, the state of Windows OS changes from "Pending Reboot" to "FirstBoot" state. In order to proceed, it is required to perform internal initialization of the hardware.
- After initialization, Windows OS boots successfully.
- Once the system properly boots for the first time, its state changes back to "Pending Reboot", requiring to apply previously delayed changes.
- After the requested reboot, Windows OS does not boot again and stays on a "Spinning Circle" screen indefinitely.
Known applications installation of which might cause the aforementioned Windows OS boot problem:
- Windows Updates.
- System & Hardware Drivers.
- Antivirus software (Sentinel One, Trend Micro, etc.)
Solutions
Solution A. Repair with Recovery Partition
This solution requires the recovery partition to be present in the backed up / restored system.
- Boot into OS Recovery mode and navigate to Troubleshoot > Advanced Options > Command Prompt:
- Perform the following commands:
- Locate Windows volume letter (find it in "list vol" output):
diskpart
list vol
exit
- Check internet connection:
ipconfig
ping 8.8.8.8
- In case of a network connection failure:
wpeutil initializentwork
For the below commands, if necessary, make sure to change "c:" to a letter corresponding to your system volume, and specify the implied values and paths that could be specific to your system.
- Run System File Check (SFC):
sfc /offbootdir=c: /offwindir=c:\windows /offlogfile=c:\sfc_log.txt /scannow
- Check image health:
dism /image:c: /cleanup-image /scanhealth
dism /image:c: /cleanup-image /checkhealth
- Restore health:
dism /image:c: /cleanup-image /restorehealth
If the Restore Health command fails with error code 0x800f0906, or 0x800f0950, or 0x800F081F, it means that system files are corrupted. Source installation image (".wim" or ".esd" file, or other Windows directory mounted) will be required to proceed. The source installation image must be placed locally. The source installation image version must match the restored Windows OS version. Once everything is ready, proceed with the following commands
- List information about all images in a WIM:
dism /Get-ImageInfo /imagefile:C:\path_to_\install.wim
- Inspect ESD:
dism /Get-WimInfo /WimFile:install.esd
- Export WIM from ".esd" file:
dism /export-image /SourceImageFile:c:\install.esd /SourceIndex:# /DestinationImageFile:c:\install.wim /CheckIntegrity /Compress:max
- Run "Restore Health" from source:
dism /image:c: /cleanup-image /restorehealth /source:d:\path_to_local\os_installation_or_.wim_.esd
- Revert any pending updates:
dism /image:c: /cleanup-image /revertpendingactions
If the "revert pending actions" command fails with error code 0x800f082f, proceed with the commands specified below.
reg load hklm\offline_sw C:\Windows\System32\config\Software
reg add "hklm\offline_sw\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending" /v Exclusive /d 0 /f
reg unload hklm\offline_sw
dism /image:c: /cleanup-image /revertpendingactions
- Try to boot Windows OS after the above changes. If it still doesn't boot, consider proceeding with the solution B.
References and further reading: Take Inventory of an Image or Component Using DISM DISM Image Management Command-Line Options Description of System File Checker (sfc.exe)
Solution B. Reset the PC
- Boot into OS Recovery mode and navigate to Troubleshoot > Reset PC. Follow the steps on the screen:
- Note that upon completion, "Reset PC" option removes all installed apps, settings and resets Windows to a default state.
Additional details that may help to investigate the "Spinning Circle" issue further in case it persists past solutions A and/or B.
Specify the following commands in the OS Recovery Command Prompt.
Enumerate Boot Configuration Data (BCD):
bcdedit /enum
Make sure to locate Windows Boot Loader {identifier} in the "bcdedit" command output.
Enable boot logging:
bcdedit /set {identifier} bootlog Yes
- Enable safe boot minimal:
bcdedit /set {identifier} safeboot minimal
- Enable safe boot with network:
bcdedit /set {identifier} safeboot network
- Try to boot Windows OS.