How to Scan & Fix Hard Drives with CHKDSK in Windows 10
CHKDSK (often pronounced “Check Disk”) is a handy and vital tool for monitoring your HDD or SSD health. This tool uses multipass scan activity to verify that a drive’s health and functionality are intact. Using CHKDSK to ensure your HDDs and SSDs are running correctly is a great way to speed up Windows 10, and we suggest you use the tool every few months to keep your drives safe and healthy.
This article explains the details of CHKDSK, how it works, and how you can use it to repair your hard drive in Windows 10.
How Windows CHKDSK Works
CHKDSK starts by scanning the file system on the HDD/SSD and analyzing the integrity of the files, file system, and file metadata on the drive.
When CHKDSK finds logical file system errors, it fixes them in place, saving the data that is on the disk so that nothing is lost. Logical file system errors include several things, such as corrupted entries in the drive’s master file table (MFT)—a table that tells the drive how files are connected in the murky labyrinths of the drive’s hardware.
CHKDSK also fixes misaligned time stamps, file size data, and security flags on HDD files. CHKDSK can conduct a complete disk drive scan, accessing and testing every hardware sector. Hard drives are divided into logical sectors, defined areas where a certain quantity of data will be stored.
Sectors can develop “soft errors,” in which data has been miswritten to the magnetic medium. They can also get “hard errors” when the drive has an actual physical defect in the area designated as a sector. CHKDSK fixes soft errors by rewriting the erroneous data and resolves hard errors by marking that disk section as being damaged and “out of bounds” for future use.
Because CHKDSK has been updated and upgraded repeatedly with each new generation of storage hardware, the program continues to work correctly to analyze and repair hard drives and SSDs. The exact process used to analyze a floppy disk holding 160K can today be executed to analyze an SSD holding 15 terabytes.
Running CHKDSK on Windows 10
Although there are several different ways that you can 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 Windows Command Prompt.
However, because CHKDSK talks directly to drive hardware, it requires a certain level of operating system permission known as administrative privileges. This means that CHKDSK is allowed to run as though it was the account in charge of the computer.
- Right-click the “Start menu” and select “Windows PowerShell (Admin).”
- In the User Account Control (UAC) window, select “Yes” to give it permission to launch the Windows Command Processor and make changes.
- Type “chkdsk c: /x /r” without the quotes to dismount the drive, scan it for errors, and repair it. You can also type “chkdsk /scan” to check the disk online and attempt to fix it.
- If you’re having issues running the above command because the drive is noted as “in use” by another process, you’re trying to scan your primary drive (boot drive) when the OS is using it. Reboot into recovery mode to perform the scan or create a Windows Recovery Tool to handle the process.
The basic invocation of CHKDSK, such as “chkdsk c:” will scan the disk and display status information, but it will not fix any encountered errors.
That’s why you need to add several parameters to run CHKDSK in a mode where it will fix problems that it encounters. In a Windows PowerShell program, parameters are additional commands added to the end of the program name, with “/” characters before each parameter. To get CHKDSK to do a full scan and repair pass, we typed “chkdsk c: /x /r” in the Powershell console.
The “/r” parameter performs the same tasks as “/f,” which fixes errors on the disk and tells CHKDSK to locate any bad sectors and recover any readable information.
The “/x” parameter tells CHKDSK to dismount the drive (take it offline from the operating system) before the process begins.
Additional CHKDSK Parameters
CHKDSK has an extensive library of optional parameters that you can use to modify the program’s behavior.
- <Volume> – The Volume parameter allows you to specify a drive letter (with a colon) or volume name. You do not need the < and > characters.
- [<Path>]<FileName> – The Path and FileName parameters can be used only on a drive using the FAT or FAT32 organizational 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. To specify multiple files, you can use the “?” and “*” wildcard characters.
- /f – The /f parameter instructs CHKDSK to fix errors on the disk. The disk must be locked, so if CHKSDK cannot do it, a message asks 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 every directory as the disk is checked.
- /r – The /r parameter locates bad sectors and recovers readable information. The disk 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 dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
- /i – The /i parameter can only be used with a drive formatted with the NTFS model. This speeds up CHKDSK by performing a less vigorous check of index entries, reducing the time required to run CHKDSK.
- /c – The /c parameter is only usable on an NTFS disk. This tells CHKDSK not to check cycles within the folder structure, reducing the time required to run CHKDSK.
- /l[:<Size>] – The /l parameter can only be used with NTFS. It changes the size of the resulting log file to what you type. If you were to omit the size parameter, /l displays the current size instead.
- /b – The /b parameter is usable only with NTFS. It clears the list of bad clusters on the volume and rescans all allocated and free ones for errors. /b includes the functionality of /r. Use this parameter after imaging a volume to a new hard disk drive.
- /? – The /? parameter displays a help file containing this list of parameters and other instructions for using CHKDSK.
To summarize, the entire command that should be typed into the Command Prompt or PowerShell is:
chkdsk [Drive:] [parameters]
In our example, it’s:
chkdsk C: /x /r
Using CHKDSK on a Boot Drive
A boot drive is the partition of your hard drive that the computer starts up from. Boot partitions are particular in many ways, and one of those ways is that they require special handling for CHKDSK to be able to deal with them.
CHKDSK needs to be able to lock any boot drive it scans, meaning that it cannot examine the system’s boot drive if the computer is in use. If your target drive is an external or non-boot internal disk, the CHKDSK process will begin as soon as we enter the command above.
If the target drive is a boot disk, the system will ask you if you’d like to run the command before the next boot. Type “yes” (or “y”), restart the computer, and it will run before the operating system loads, allowing it to gain full access to the disk.
A CHKDSK command can take a long time to execute, primarily when performed on larger drives. Once done, it will present a summary of results, including total disk space, byte allocation, and, most importantly, any errors that were found and corrected.
CHKDSK In Previous Editions of Windows
The CHKDSK command is available in all versions of Windows, so users running on 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 get to the Command Prompt by going to Start > Run and typing “cmd.”
- Once the Command Prompt result is displayed, right-click on it and select Run as administrator to grant the program the necessary privileges to execute CHKDSK successfully.
One warning note: if you use CHKDSK on an older hard drive, you may find that your hard drive space was significantly reduced after running the command. This result is due to a failing hard drive, as one of the crucial functions CHKDSK performs is identifying and blocking bad sectors.
A few bad sectors on an old drive will typically go unnoticed by the user. Still, if the drive is failing or has serious problems, you could have vast numbers of bad sectors that, when mapped and blocked by CHKDSK, appear to “steal” significant portions of your hard drive’s capacity.
Other Ways to Launch CHKDSK
If you dislike using the command prompt, there are other ways to invoke CHKDSK on your system. Perhaps the easiest is directly through Windows Explorer.
- Open up “File Explorer,” right-click on the drive you want to check, and select “Properties.”
- Next, select the “Tools” tab and click on “Check” to launch CHKDSK with standard parameters.
CHKDSK is a very powerful tool for scanning and fixing hard drives on Windows 10 computers. Following the steps outlined in this article, you can use the CHKDSK function to optimize your PC’s performance and fix issues with your drive.
Windows CHKDSK FAQs
Does chkdsk work on an external drive?
You can use the “chkdsk” command on an external drive. All you need to do is indicate that drive in the command when executing.
Here’s an example:
1. Open up Windows Power Shell or Command Prompt as an Administrator, as shown above.
2. Then, type in “chkdsk d: /f”, and hit Enter.
For this example, the external drive is listed as the D drive; the/f command scans the disk and attempts to repair it.
How do you view the output logs of the chkdsk scan?
1. Type Windows key + R simultaneously to open the Run program, type in “eventvwr“, and hit Enter.
2. Now, click on Windows Logs.
3. Next, click on Application.
4. Now scroll through the logs and look for “Wininit” in the “Source” tab. You want the one that has chkdsk information in the “General” tab.
How do you scan a drive with CHKDSK that’s in use?
Sometimes, scanning a drive with chkdsk can cause a message that states the drive is still in use. If this happens to you, you’ll either need to unmount the drive or boot up a flash drive with Windows Recovery Tools on them.