CHKDSK (pronounced “Check Disk”) is a very useful and vital tool to monitor the health of your disk drive. This tool uses a multi-pass analysis of a drive to verify that its robustness and functionality are intact. Using CHKDSK to make sure your drives are working properly is a great way to speed up Windows 10, and we suggest using the tool every few months to keep your drives safe and healthy.
In this article, we will see what CHKDSK is, how it works, and how to use it to fix your hard drive in Windows 10.
How CHKDSK works
CHKDSK begins by scanning the file system on the disk drive and analyzing the integrity of files, file system, and file metadata on the drive.
When CHKDSK detects logical file system errors, it corrects them by saving the data that is on disk so that nothing is lost. Logical file system errors are things like corrupt entries in the drive's Master File Table (MFT), a table that tells the drive how files are connected in the obscure labyrinths of the drive's hardware.
CHKDSK also fixes misaligned timestamps, file size data, and security flags on files on the drive. CHKDSK can then perform a full scan of the drive, accessing and testing every sector of the hardware. Hard drives are divided into logical sectors, defined areas of the disk where a certain defined amount of data will be stored.
Sectors can develop soft errors, in which case data was written incorrectly to the magnetic media, or hard errors, which are cases where the drive itself has an actual physical defect in the area designated as the sector. CHKDSK corrects soft errors by overwriting faulty data and resolves hard errors by marking that section of the disk as damaged and "out of bounds" for future use.
Since CHKDSK has been repeatedly updated and upgraded with each new generation of storage hardware, the program continues to work well for scanning and repairing hard drives of all kinds. The same process that was run to scan a floppy disk containing 160 KB, can now be run to scan an SSD containing 15 terabytes.
Run CHKDSK in Windows 10
While there are several different ways to invoke CHKDSK on a Windows 10 machine, by far the most common and ordinary place to run the utility is Windows PowerShell, the intended replacement for the Windows Command Prompt.
However, since CHKDSK communicates directly with the drive hardware, it requires a special level of operating system permission called administrative privileges. It just means that CHKDSK is allowed to run as if it were the account in charge of the computer.
- Right-click on the Start menu and select Windows PowerShell (Admin).
- The next screen that appears is a User Account Control (UAC) window that will ask your permission to launch the Windows Command Processor and let it make changes to the PC. To select Yes.
- Now type “chkdsk c: /x /r“, without the quotes, to unmount the drive, check for errors, and repair it. You can also type “chkdsk /scan” to scan the disk online and attempt to repair it.
- If you are having trouble running the above command because the drive is in use by another process, that's because you're trying to scan your primary drive (boot drive), when it's in use by the operating system. Reboot into recovery mode to perform the scan or create a Windows recovery tool to perform the process.
The basic CHKDSK invocation, simply "chkdsk [drive]", will scan the disk and display status information, but it will not fix errors encountered.
That's why, to run CHKDSK in a mode where it will actually fix the issues it encounters, you need to add several parameters. In a Windows PowerShell program, parameters are additional commands appended to the end of the program name, with "/" characters before each parameter. In this case, to have CHKDSK perform a full scan and repair pass, we typed “chkdsk c: /x /r“.
The "/r" switch performs the same tasks as "/f", which corrects errors on the disk, and also tells CHKDSK to locate any bad sectors and recover any readable information it finds there. The "/x" parameter tells CHKDSK to unmount the drive (take it offline from the operating system) before the process begins.
Additional CHKDSK Settings
CHKDSK has a large library of optional parameters that you can use to modify the behavior of the program.
- – The Volume parameter allows you to specify a drive letter (with a colon) or a volume label. You don't actually need the characters.
- [ ] – The Path and FileName parameters can only be used on a drive using the FAT or FAT32 organization models. With Path and FileName, you can specify the location and name of a file or set of files that you want CHKDSK to check for fragmentation. You can use the ? and * wildcards to specify multiple files.
- /f – The /f parameter tells CHKDSK to fix errors on the disk. The disc must be locked. If CHKSDK cannot lock the drive, a message appears asking if you want to check the drive the next time you restart the computer.
- /v – The /v parameter displays the name of each file in each directory when the disk is checked.
- /r – The /r parameter locates bad sectors and recovers readable information. The disc must be locked. /r includes the functionality of /f, with the additional analysis of physical disk errors.
- /x – The /x parameter forces the volume to unmount first, if necessary. All open handles on the player are invalidated. /x also includes /f functionality.
- /i – The /i parameter can only be used with a drive formatted with the NTFS model. This speeds up CHKDSK by performing less rigorous checking of index entries, which reduces the time it takes to run CHKDSK.
- /c – The /c parameter is also only usable on an NTFS disk. This tells CHKDSK not to check for cycles in the folder structure, reducing the time it takes to run CHKDSK.
- /L[: ] – The /i parameter can only be used with NTFS. It changes the size of the resulting log file to the size you type. If you omit the size parameter, /l displays the current size.
- /b – The /b parameter can only be used with NTFS. It clears the list of bad clusters on the volume and rescans all allocated and free clusters for errors. /b includes the functionality of /r. Use this parameter after creating an image of a volume on a new hard disk.
- /? - The /? parameter displays a help file containing this list of parameters and other instructions for using CHKDSK.
To summarize, the full command that needs to be typed in the command prompt is:
chkdsk [Drive:] [parameters]
In our example, it is:
chkdsk C: /x /r
Using CHKDSK on a startup disk
A boot drive is the partition on your hard drive from which the computer boots. Boot partitions are special in many ways, and one of them is that they require special handling for CHKDSK to manage them.
CHKDSK must be able to lock any boot drive it scans, meaning it cannot examine the system boot drive if the computer is in use. If your target drive is an external or non-bootable internal disk, the CHKDSK process will start as soon as we enter the above command.
If, however, the target drive is a boot disk, the system will ask you if you want to run the command before the next boot. Type "yes" (or "y"), restart the computer, and the command will run before the operating system loads, allowing it full access to the disk.
Running a CHKDSK command can take a long time, especially when run on larger disks. Once done, however, it will present a summary of the results, including total disk space, byte allocation, and most importantly, any errors that were found and fixed.
CHKDSK in previous editions of Windows
The CHKDSK command is available in all versions of Windows, so users running Windows 7, 8, or XP can also perform the steps above to initiate a scan of their hard drive.
- In the case of older versions of Windows, users can access the Command Prompt by going to Start > Run and typing "cmd".
- Once the Command Prompt output is displayed, right-click on it and select Execute as administrator to grant the program the necessary privileges to run CHKDSK successfully.
A word of warning: if you use CHKDSK on an older hard drive, you may find that your hard drive space has been significantly reduced after running the command. This result is caused by a failing hard drive, as one of the crucial functions of CHKDSK is to identify and block bad sectors on the drive.
A few bad sectors on an old disk will usually go unnoticed by the user, but if the disk fails or has serious problems, you might have a large number of bad sectors which, when mapped and blocked by CHKDSK, seem "stealing" parts of your hard drive's capacity.
Other Ways to Launch CHKDSK
If you don't like using the command prompt, there are other ways to invoke CHKDSK on your system. The simplest is perhaps directly via Windows Explorer.
- Open a Windows File Explorer window, right-click the drive you want to check and select Properties.
- Then select the Tools tab and click Vérifier to launch CHKDSK with standard parameters.
CHKDSK is a very powerful tool to scan and repair hard drives on Windows 10 computers. By following the steps given above, you can use this useful feature to optimize your PC performance.
How to scan and fix errors on drives in Windows 10? Share your opinion in the comments below.