Skip to content

Windows 10/11 File Repair: Use CHKDSK & SFC to Fix System Corruption

System corruption in Windows 10 or 11 can manifest in various ways, from frequent crashes and blue screens of death (BSODs) to applications failing to launch or specific features not working. Fortunately, Windows includes powerful built-in command-line tools, CHKDSK (Check Disk) and SFC (System File Checker), designed to diagnose and repair such issues. This guide will explain how to use them effectively.

Understanding CHKDSK (Check Disk)

CHKDSK is a utility that scans your hard drive's file system (like NTFS) for logical errors and, optionally, physical bad sectors. File system errors can prevent Windows from accessing files correctly, leading to instability. Running CHKDSK can often resolve these underlying disk-related problems.

When to Use CHKDSK

  • Your computer is unusually slow or freezes frequently.
  • You encounter errors related to reading or writing files.
  • Windows prompts you to check the disk for errors.
  • Before running SFC, to ensure the disk integrity is sound.

How to Run CHKDSK

You need administrator privileges to run CHKDSK effectively.

  1. Type cmd in the Windows search bar.
  2. Right-click on Command Prompt and select Run as administrator.
  3. In the Command Prompt window, type the command:
    chkdsk C: /f /r /x

Let's break down the parameters:

  • C: specifies the drive letter you want to check (replace with another letter if needed, e.g., D:).
  • /f tells CHKDSK to fix any errors it finds on the disk.
  • /r locates bad sectors and recovers readable information (implies /f). This scan is more thorough and takes longer.
  • /x forces the volume to dismount first, if necessary (implies /f). This can be useful if files are in use.

If you're checking the system drive (usually C:), CHKDSK might display a message: "CHKDSK cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)". Type Y and press Enter. The scan will then run automatically the next time you restart your computer. This process can take a significant amount of time, depending on the size and health of your drive, so be patient.

Important: Always back up your important data before running CHKDSK with repair parameters, especially if you suspect severe disk issues. While CHKDSK is designed to fix problems, there's always a small risk with disk operations.

For more details on CHKDSK parameters, you can refer to the official Microsoft documentation on CHKDSK.

Understanding SFC (System File Checker)

SFC is a utility that scans for and attempts to restore corrupted or missing protected Windows system files. These files are crucial for the operating system's stability and functionality. If SFC finds any problematic files, it will try to replace them with correct versions from a cached copy located in a compressed folder at %WinDir%\System32\dllcache or from the Windows installation source.

When to Use SFC

  • Windows features are not working correctly.
  • You experience frequent application crashes or system instability.
  • After a malware infection has been removed, as malware can damage system files.
  • If CHKDSK has completed and issues persist.

How to Run SFC

Like CHKDSK, SFC requires administrator privileges.

  1. Open Command Prompt as administrator (as described in the CHKDSK section).
  2. In the Command Prompt window, type the command:
    sfc /scannow

The /scannow parameter instructs SFC to scan all protected system files immediately and repair problematic files when possible. This process can also take some time. Once completed, SFC will provide one of several messages:

  • "Windows Resource Protection did not find any integrity violations." This means your system files are fine.
  • "Windows Resource Protection found corrupt files and successfully repaired them." Details are included in the CBS.Log file (%WinDir%\Logs\CBS\CBS.log).
  • "Windows Resource Protection found corrupt files but was unable to fix some of them." This indicates more severe issues. Details are also in the CBS.Log.

When SFC Cannot Repair Files: Enter DISM

If SFC reports that it found corrupt files but couldn't fix them, the Windows Component Store (which SFC uses as a source for repairs) might itself be corrupted. In this scenario, the Deployment Image Servicing and Management (DISM) tool can be used to repair the Windows image/component store.

Run these DISM commands (one after another) in an administrator Command Prompt before running sfc /scannow again:

  1. Check Health: This command checks if the component store is reported as corrupted.

DISM /Online /Cleanup-Image /CheckHealth

  1. Scan Health: This performs a more advanced scan to see if the component store is repairable.

DISM /Online /Cleanup-Image /ScanHealth

  1. Restore Health: This command attempts to repair the Windows image using Windows Update to provide the necessary files. Ensure you have an active internet connection.

DISM /Online /Cleanup-Image /RestoreHealth

After DISM completes the /RestoreHealth operation successfully, try running sfc /scannow again. It should now be able to repair the system files using the corrected component store.

Microsoft provides comprehensive information on using SFC and DISM on their support page, and more detailed guidance on repairing a Windows image with DISM.

For comprehensive system file and disk health checking, it's generally recommended to run these tools in the following order:

  1. CHKDSK: To ensure the underlying file system on the disk is sound (e.g., chkdsk C: /f /r). Restart if prompted.
  2. DISM: To repair the Windows component store if necessary (DISM /Online /Cleanup-Image /RestoreHealth).
  3. SFC: To scan and repair protected system files (sfc /scannow).

Running these utilities can resolve many common Windows stability and performance issues caused by file system errors or corrupted system files. They are essential tools for any Windows user's troubleshooting toolkit. Remember to be patient, as these scans can take time, and always ensure your important data is backed up as a general precaution.

Magic Leopard™ by MagicCat Technology Limited