Windows Chkdsk Utility Tutorial


Check Disk or chkdsk command is used to detect FAT16, FAT32, NTFS file system related errors, and fix them. Chkdsk can not recover corrupted files which are a hard situation. Chkdsk can be run from the command line or from GUI but the command line use is the most practical way.

What Is Chkdsk?

chkdsk is a system tool which is command line based. There is also a GUI to run chkdsk command. The chkdsk command is very similar to the Linux counter part fsck command. The chkdsk command is used to verify integrity of a volume and fix logical file system errors. The chkdsk command can be used in different Windows versions like Windows XP, Windows 7, Windows 8, Windows 10 and Windows Servers.

Syntax

Syntax of chkdsk is very simple. There is two types of parameters like OPTIONS and VOLUME.

chkdsk OPTIONS VOLUME
  • OPTIONS is used to specify the behavior of the chkdsk command.
  • VOLUME is the drive, partition, or volume we want to operate with the chkdsk command.

Print chkdsk Help Information

We can use the /? option in order to print detailed help information about the options and usage.

> chkdsk /?
Print chkdsk Help Information

In general following options are provided by the chkdsk command.

ParameterDescription
<volume>Specifies the drive letter (followed by a colon), mount point, or volume name.
[<path>]<filename>Use with file allocation table (FAT) and FAT32 only. Specifies the location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use the ? and * wildcard characters to specify multiple files.
/fFixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer.
/vDisplays the name of each file in every directory as the disk is checked.
/rLocates 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.
/xForces the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
/iUse with NTFS only. Performs a less vigorous check of index entries, which reduces the amount of time required to run chkdsk.
/cUse with NTFS only. Does not check cycles within the folder structure, which reduces the amount of time required to run chkdsk.
/l[:<size>]Use with NTFS only. Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size.
/bUse with NTFS only. 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 imaging a volume to a new hard disk drive.
/scanUse with NTFS only. Runs an online scan on the volume.
/forceofflinefixUse with NTFS only (must be used with /scan). Bypass all online repair; all defects found are queued for offline repair (for example, chkdsk /spotfix).
/perfUse with NTFS only (must be used with /scan). Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.
/spotfixUse with NTFS only. Runs spot fixing on the volume.
/sdcleanupUse with NTFS only. Garbage collect unneeded security descriptor data (implies /f).
/offlinescanandfixRuns an offline scan and fix on the volume.
/freeorphanedchainsUse with FAT/FAT32/exFAT only. Frees any orphaned cluster chains instead of recovering their contents.
/markcleanUse with FAT/FAT32/exFAT only. Marks the volume clean if no corruption was detected, even if /f was not specified.
/?Displays help at the command prompt.

Schedule Check Disk At System Start

One of the most popular use cases for chkdsk is scheduling a check at the system startup or restart. Because we can not check system volume which is generally C: at run time. Before mounting the volume the check operation is done.

> chkdsk /F C:
Schedule Check Disk At System Start
Schedule Check Disk At System Start

Fix Errors On Disk

File systems used to store files and folders, user data in an appropriate way. file systems have very complex structures related to their features. Shutdown down a system in an unexpected way Halting system, disk-related issues may create errors in file systems. We can simply use /F option with the volume name which is D: in this example.

> chkdsk /F D:
Fix Errors On Disk
Fix Errors On Disk

Locate Bad Sector

Disk drives store data in sectors. Each sector holds some data according to its size configuration. Disk drives can lose some of their sectors in time. This is physical damage so it can not be fixed in a physical way. We can locate and label these sectors as bad sectors and prevent them to be used by the file system. We can do this with /R option. In this example, we check bad sectors of volume D:

> chkdsk /R D:
Locate Bad Sector
Locate Bad Sector

Force Unmount Of Volume, Partition or Disk

While doing disk related operations we need to unmount the volume in order to prevent unexpected errors. Checking mounted volumes and file systems will create conflicts. We can unmount the filesystem and volume before the operation with /X option.

> chkdsk /X D:
Force Unmount Of Volume
Force Unmount Of Volume

Fast Check Of Volume, Partition or Disk

Checking the file system and disk errors may take some time. By default, chkdsk uses very detailed check procedures. But some of them are not necessary in most cases. We can prevent to use detailed checks to make check faster. We will use /I  /C for checking in a fast way.

> chkdsk /I /C D:
Fast Check Of Volume, Partition or Disk
Fast Check Of Volume, Partition or Disk

Check Disk In Verbose Manner

Verbose mode provides more detailed information about the current operation. We can get details with /V option.

> chkdsk /V D:
Check Disk In Verbose Manner
Check Disk In Verbose Manner

chkdsk GUI

There is a GUI for the chkdsk command. Even we can access this GUI the most practical way is right clicking on the disk or partition we want to check like below. Then we will click to the Properties .

Disk or Partition Properties

Properties screen provides the Tools tab where we can access from the Error checking part by clicking to the Check button like below.

Disk or Partition Check

We will see the followin screen where we will click to the Scan drive button. Alternatively we can cancel by clicking to the Cancel button.

Error Checking and Scan Drive

During the disk or partition error check we will see the following screen. This screen will provide information about the current status and remaining time.

Disk or Partition Error Checking

When the scan or check is completed we will see the following screen which will provide short information about the like error count etc.

Disk or Partition Error Check Result

LEARN MORE  What is File System Block And Super Block?

1 thought on “Windows Chkdsk Utility Tutorial”

Leave a Comment