Skip to Content

What errors does CHKDSK fix?

What errors does CHKDSK fix?

CHKDSK (short for Check Disk) is a utility in Windows that scans a hard drive and fixes various file system errors. When run, CHKDSK examines the file system and metadata on a volume for logical and physical errors. If it finds errors, CHKDSK attempts to repair them. Some of the key errors that CHKDSK can detect and fix include:

Cross-linked files

Cross-linked files occur when two or more hard links point to the same file cluster on a hard disk. This can happen when the file system metadata gets corrupted. CHKDSK can detect cross-linked file errors and remove the improper hard links, ensuring one unique file cluster per file.

Invalid security descriptors

Security descriptors contain the access control lists (ACLs) for files and folders. They dictate what level of access specific users and groups have. If a security descriptor gets corrupted, access permissions may be inadvertently changed. CHKDSK can detect invalid security descriptors and restore the proper permissions.

Directory errors

The file system’s directory contains indexes and allocation information about folders and files. If the data structures in the directory become corrupt or inconsistent, CHKDSK can detect these directory errors and rebuild the damaged directory indexes and allocation tables.

Invalid file record segments

The master file table (MFT) is a database in NTFS volumes that contain records about every file and folder. Each file record contains attributes like the file name, time stamps, security identifiers, and data runs that indicate the physical location of the file on disk. If file records get corrupted, CHKDSK can detect errors like invalid data runs and rebuild the file record entries.

Volume bitmap errors

Volume bitmaps are data structures that track which clusters are in use versus free space on a volume. CHKDSK can detect errors in volume bitmaps and reconstruct them to accurately reflect used and unused clusters.

Bad sectors

Bad sectors are physical surface defects on a hard disk that prevent data from being stored reliably. CHKDSK can detect bad sectors and mark them so they are no longer used for file storage.

Lost file fragments

When files are deleted, their data clusters are marked as free space and may become scattered among used clusters on the volume. CHKDSK can reorganize free space and consolidate file fragments so used space is contiguous.

Orphaned file records

Sometimes file records in the MFT can become orphaned from their parent directory records. CHKDSK finds and removes orphan file records, recovering the disk space.

Incorrect file sizes

If file system metadata becomes corrupt, the recorded file size may not match the actual space allocated to the file on disk. CHKDSK will correct file sizes that do not align with their actual disk usage.

Lost chains

Files chains describe the sequence of clusters used to store a file. If part of the file chain is lost, CHKDSK rebuilds the cluster chains using the volume bitmap so file data continuity is maintained.

Invalid volume labels

Volume labels can be used to name a disk drive. If this label is lost or corrupted, CHKDSK will attempt to recover or rebuild the volume label.

When to Run CHKDSK

CHKDSK should be run periodically to proactively detect and repair file system errors. It is also commonly used to fix various volume problems that may cause data loss or corruption:

  • Frequent or recurring Blue Screens of Death (BSODs)
  • Failing to boot properly or load the operating system
  • Corrupted system files or invalid boot configuration data
  • Hard drive making errors or unusual noises
  • Programs crashing unexpectedly or failing to open files
  • Unexplained changes to file sizes, timestamps, or attributes
  • Antivirus program finding a high rate of errors or corruption
  • Hard drive SMART diagnostics report read/write errors
  • Detected bad sectors during error checking or imaging software

How to Run CHKDSK

To run CHKDSK in Windows, there are a couple options:

Option 1) Run CHKDSK in Windows GUI

  1. Open File Explorer and right click on the drive letter you want to scan.
  2. Select “Properties” from the right-click menu.
  3. Click the “Tools” tab in the Properties window.
  4. Under Error-Checking there is a “Check” button, click it.
  5. This will open the Check Disk tool. Check “Scan drive” and select desired options.
  6. Click “Start” to run CHKDSK and scan the volume.

Option 2) Run CHKDSK from Command Prompt

  1. Open the Command Prompt as administrator.
  2. Type “chkdsk C: /f” and hit Enter to run CHKDSK on drive C: (replace C: with desired drive letter).
  3. Add the “/f” option to fix errors, “/r” for bad sector recovery, “/x” for dismount first.
  4. CHKDSK will run and display status, errors found, and requested repairs.

Option 3) Schedule CHKDSK to Run at Next Reboot

  1. At the Command Prompt, type: “chkdsk C: /f /x”
  2. This schedules a disk check to run on drive C: at the next reboot.
  3. The “/f” fixes errors and “/x” dismounts the volume first.
  4. Reboot the PC and CHKDSK will run before Windows loads.

Understanding CHKDSK Output

CHKDSK goes through several phases when scanning and repairing drive errors:

Stage 1: Checking File System

Checks the file system integrity, looking for issues like bad sectors. This initial read-only scan locates problems.

Stage 2: Checking File Name Linkage

Examines file and folder names, checks for inconsistencies in the file name linkage or orphaned files not linked to a directory.

Stage 3: Checking Security Descriptors

Checks the security descriptors and access control lists (ACLs) for consistency.

Stage 4: Checking Volume Bitmap

Checks the volume bitmap and allocation information for consistency. Identifies any used clusters marked as unused.

Stage 5: Checking Databases

Examines databases like the master file table (MFT) and ensures their consistency.

After the initial scan stages, if the /F or /R options were specified, CHKDSK performs requested repairs.

Finally, a summary is displayed reporting errors found and actions taken.

CHKDSK Log Files

CHKDSK creates a log file after it completes which provides details on any errors found and repairs made. The main log files created are:

Log File Description
Chkdsk.log Log file stored on the volume that was scanned.
CBS.log Contains CHKDSK results and repair actions if run from GUI.
Wininit.log Logs CHKDSK activity at boot time if a scan was scheduled.

These log files can provide valuable troubleshooting data about specific errors found and repairs conducted by CHKDSK.

How to Read CHKDSK Logs

CHKDSK log files use technical language but can be decoded to understand the errors and repairs. Here are some tips for analyzing CHKDSK logs:

  • Look at the Stage headings – These show the check sequence and types of errors scanned for.
  • Errors will list the file or folder – The path and name will identify the corrupted file object.
  • Status messages document repairs – “Correcting error in file” indicates repairs performed.
  • Repaired objects are logged – Files, folders, indexes, security descriptors, etc fixed by CHKDSK.
  • Total errors/repairs summarized – Totals highlight extent of corruption and fixes.
  • Unknown errors need deeper investigation – Unclear errors typically require advanced recovery.

Pay attention to patterns in the errors and evaluate next steps. A few isolated minor errors may not require action. But many errors or critical system file corruption should be addressed.

Troubleshooting CHKDSK Problems

In some cases, CHKDSK may fail to run properly or not repair issues fully. Some troubleshooting tips include:

  • Run CHKDSK from Command Prompt for more visibility into errors.
  • Schedule CHKDSK to run at next reboot to dismount volume.
  • Run advanced recovery tools instead like Spinrite, DiskDrill, or Disk Warrior.
  • Back up data and reformat the drive if corruption is widespread.
  • Replace failing hard disk drive if physical sectors are damaged.
  • Seek professional recovery help for critical file system issues.

Conclusion

CHKDSK is a long-standing Windows utility that scans drives and fixes various file system errors. It can detect and repair corruption like bad sectors, directory issues, security descriptor problems, and file record inconsistencies. Regularly running CHKDSK helps identify and address drive reliability issues before they cause serious data loss or system instability. Paying attention to the errors it reports can reveal patterns requiring additional troubleshooting or recovery steps.