Chkdsk (short for check disk) is a system utility in Windows operating systems that scans a disk drive and helps detect, recover and repair logically damaged files systems or corrupted system files. While chkdsk is an important tool for checking and repairing certain types of file system and file corruption, it does have limitations in what types of corruption it can detect and repair.
What chkdsk does
Chkdsk examines the file system and metadata on a drive and looks for inconsistencies that could indicate corruption or damage. Some key things that chkdsk checks and attempts to repair include:
- File system structural integrity – Makes sure folders and directories are linked properly and that file clusters and allocation units are in good order.
- Metadata corruption – Checks for things like invalid filenames, mismatched file sizes, cross linked files, invalid security identifiers, and directory errors.
- Physical errors – Scans disk surface for bad sectors and attempts to repair them by recovering readable information.
- Lost file fragments and orphaned clusters – Tries to match file fragments and orphaned clusters back to original files as much as possible.
When chkdsk detects these types of errors, it will often try to repair them automatically if possible. Some repairs chkdsk attempts include:
- Rejoining orphaned file fragments back into original files.
- Reconnect lost clusters into file allocation chains.
- Convert found bad sectors to good sectors.
- Repair file name errors and directory errors.
- Validate file sizes with allocated clusters.
After chkdsk makes any repairs, it writes changes to a log file and reports back results. This allows you to see what errors were found and if repairs were successful or not.
Limitations of what chkdsk can repair
While chkdsk is a useful utility, there are a number of limitations to what types of corruption and errors it can actually repair:
- Logical file corruption – If logical corruption occurs within a file’s contents, chkdsk cannot repair this type of damage. It can only fix file system structural issues.
- Physical damage – chkdsk can remap some bad sectors but cannot repair physical damage on the drive surface or failed drive components.
- Advanced corruption – Severe corruption caused by things like viruses, severe file system damage, or very advanced errors exceed chkdsk’s repair abilities.
- Deleted files – Any files deleted and marked for overwrite cannot be recovered by chkdsk.
- Format damage – chkdsk cannot repair corruption or errors related to an entire damaged or reformatted file system. The drive must be readable by the operating system for chkdsk to run.
The key things to understand are that chkdsk focuses on file system structural repairs, basic metadata repairs, and remapping bad sectors. Repairing advanced corruption within files themselves or recovering deleted files is beyond chkdsk’s scope.
When should you run chkdsk?
Some common situations where running chkdsk is recommended include:
- You notice signs of file system corruption – Errors opening or copying files, strange file sizes, missing files, or other odd behavior may indicate file system issues chkdsk could repair.
- Programs or operating system crashes unexpectedly – Corruption that causes system instability could potentially be repaired by chkdsk.
- Drives or files take much longer than normal to open – This slow performance may be caused by file system errors chkdsk could fix.
- Hard drive has developed bad sectors – chkdsk can scan surface and remap bad sectors to prevent using them.
In general, running chkdsk on a regular basis as preventative maintenance is a good idea. Many IT professionals recommend scheduling chkdsk to run every 30-60 days. This can head off potential corruption issues before they escalate.
How to run chkdsk in Windows
There are a couple different ways to run chkdsk in Windows:
Using a command prompt
- Open a command prompt window as administrator
- Type “chkdsk C: /f” – Replace C: with drive you want to check
- Restart computer when prompted so chkdsk can run before Windows loads
- It will scan drive on reboot and fix errors
- View log file when done to see results
Using File Explorer
- Open File Explorer and right click on the drive you want to scan
- Select “Properties” > “Tools” > Click “Check” under Error checking.
- Check “Scan drive” and select repair errors if prompted
- Schedule disk check to run on next restart if desired
The command prompt method allows using “/f” parameter to force a scan on next reboot, but gives the same repair results.
Reading chkdsk log files
After chkdsk completes, it creates a log text file indicating what errors were found and details on any fixes attempted. Viewing this can confirm if corruption issues were resolved. Log files are named chkdsk[drive letter].log and located in the \Windows\Logs\CBS folder.
Some key things to look for in the log:
- Errors Found – Lists types of errors discovered.
- Errors Fixed – Details any repairs made if possible.
- Errors Left Unfixed – Highlights unrepairable issues remaining.
- Bad Sectors – Shows any remapped bad sectors.
The status at the end will indicate if corruption was fixed or still remains. You can run additional chkdsk scans if needed to repair lingering issues.
Using chkdsk in Windows 10/8/7
The general process for running chkdsk is the same across Windows 10, Windows 8, and Windows 7 but here are key points for each OS:
Windows 10 chkdsk
- Open admin Command Prompt
- Type “chkdsk C: /f” (replace C: with drive letter)
- Chkdsk will run on restart
- View \Windows\Logs\CBS\chkdsk.log for results
Windows 8 chkdsk
- Access Command Prompt under “Apps” > “Command Prompt”
- Type “chkdsk C: /f” (replace C: with drive letter)
- Chkdsk will run on restart
- Log file located in \Windows\Logs\CBS
Windows 7 chkdsk
- Open admin-level Command Prompt
- Type “chkdsk C: /f” (replace C: with drive letter)
- Chkdsk will run on restart
- Log file located in \Windows\Logs\CBS
The overall process is very similar across versions. Key is to open an admin command prompt, use /f parameter, then view logs after restart.
Advanced chkdsk options
Chkdsk has a number of command line parameters to customize scans. Some useful ones include:
- /F – Fixes errors on disk
- /R – Locates bad sectors and recovers readable info
- /X – Forces dismount on locked volumes for scan
- /V – Verbose output, shows files processed
- /I – Perform less intensive check, quicker results
Example usage:
chkdsk C: /f /r /x
This runs an intensive scan on C: drive forcing dismount if locked while fixing errors and locating bad sectors.
Can chkdsk damage drives?
There is minimal risk of chkdsk damaging a drive if used properly. The key things to keep in mind are:
- Don’t interrupt chkdsk – Let it complete fully before restarting system.
- Avoid scanning healthy partitions – Only scan drives showing signs of corruption.
- Review logs – Verify chkdsk completed properly without errors.
Interruptions while chkdsk is rewriting file system metadata could potentially lead to further corruption. But otherwise chkdsk is designed to be non-destructive and repair issues, not cause them.
Alternatives to chkdsk
Some other disk repair tools beyond just chkdsk include:
- sfc /scannow – Scans Windows system files and replaces corrupted ones.
- DISM – Deployment Image Servicing and Management tool repairs Windows image files.
- Spinrite – Third-party commercial utility focused on disk and file recovery.
- fsck – Linux/Unix file system check and repair tool.
These tools can help fix more advanced corruption that exceeds chkdsk’s abilities in some situations. But chkdsk remains a good first line option.
Conclusion
While chkdsk cannot repair all types of file corruption, it remains an important disk repair utility on Windows. Regularly running chkdsk provides an effective method to detect and fix certain file system and metadata errors before they become more serious. Reviewing chkdsk logs allows verifying if repairs were successful. Used properly, chkdsk can optimize drive health and performance by addressing disk problems early on.