|A component of Microsoft Windows|
Chkdsk.exe in action on drive C:
|Included with||DOS, OS/2 and Windows|
|Microsoft ScanDisk (Co-existed with Chkdsk in Windows 9x and MS-DOS 6.x)|
CHKDSK (short for "check disk") is a system tool in DOS, OS/2 and Windows. It verifies the file system integrity of a volume and fixes logical file system errors. It is similar to the fsck command in Unix.
On Windows NT operating systems, CHKDSK can also check the disk surface for bad sectors and mark them. (In MS-DOS 6.x and Windows 9x, this is a task done by Microsoft ScanDisk.) Windows Server version of CHKDSK is RAID-aware and can fully recover data in bad sectors of a disk in a RAID-1 or RAID-5 array if other disks in the set are intact.
On Windows NT family, a standard CHKDSK scan consists of three phases of testing file metadata. It looks for errors but does not fix them unless it is explicitly ordered to do so. Same applies to surface scan: This test, which could be extremely time-consuming on large or low-performance disks, is not carried out unless explicitly requested. CHKDSK requires exclusive write access to the volume to perform repairs.
Because of the exclusive access requirement and the time-consuming nature of CHKDSK operation, Windows 8 implemented a new file system health model in which the operating system fixes errors on the volumes as it encounters them. In the event that the problem is grave and a full scan is required, Action Center. notifies the user to take the volume offline at the first convenience.
Windows 7 has a little-known self-healing ability, turned on by default, in addition to providing the CHKDSK command. It will detect a physical file system error and silently fix it on the fly, so, many problems previously discovered on running CHKDSK never appear.
fsutil repair query c: reports whether it is enabled.
The MS-DOS 5 bug
CHKDSK and UNDELETE in MS-DOS 5.0 have a bug which can corrupt data: If the file allocation table of a disk uses 256 sectors, running
CHKDSK /F can cause data loss and running
UNDELETE can cause unpredictable results. This normally affects disks with a capacity of approximately a multiple of 128 MB. This applies to
UNDELETE.EXE with a date of 04/09/91 (April 9, 1991). This bug was fixed in MS-DOS 5.0a.
- Holm, Dan; Thomas, Orin (2003). "11-3: Maintaining Disk Storage Volumes". Managing and Maintaining a Microsoft Windows Server 2003 Environment. Microsoft Press. p. 11.25. ISBN 9780735614376.
- "Description of the Windows XP Recovery Console for advanced users". Support (8.0 ed.). Microsoft. 11 July 2013. Retrieved 4 September 2014.
- "An explanation of the new /C and /I Switches that are available to use with Chkdsk.exe". Support (4.4 ed.). Microsoft. 1 December 2004. Retrieved 4 September 2014.
- "Troubleshooting Disks and File Systems". Windows XP Professional Resource Kit. Microsoft. 3 November 2005. Retrieved 4 September 2014.
- Bangalore, Kiran (10 May 2012). Sinofsky, Steven, ed. "Redesigning chkdsk and the new NTFS health model". Building Windows 8. Microsoft.
- Chen, Ken (4 August 2014). "NTFS Self-Healing is An Overlooked but Useful Feature in Windows 7". Next of Windows.
- "When Not to Use MS-DOS 5.0 CHKDSK and UNDELETE Commands". Support (1.1 ed.). Microsoft. 16 November 2006.
|Wikimedia Commons has media related to Screenshots of CHKDSK.|