CHKDSK
| Company type | Utility software |
|---|---|
| Industry | Computing / Software |
| Founded | 1980 |
| Founder | Tim Paterson |
| Products | File system integrity checking and repair utility |
In the realm of computing, CHKDSK—an abbreviation for "check disk"—is a utility and command present in DOS and Microsoft Windows operating systems, as well as related platforms like Digital Research FlexOS, IBM/Toshiba's 4690 OS, and IBM's OS/2. Its primary function is to assess the file system's integrity on a storage volume, typically a partition, and to attempt corrections for logical file system faults. These logical errors generally arise from software-related issues such as system crashes or improper shutdowns, distinguishing them from hardware faults which necessitate specialized recovery procedures. The CHKDSK tool is analogous to the fsck command found in Unix systems and Microsoft's ScanDisk utility, which operated alongside CHKDSK in Windows 9x and MS-DOS 6.x environments.
Implementations
An early variant known as CHECKDSK was included in diagnostic tools from Digital Equipment Corporation during the 1970s for the TENEX and TOPS-20 operating systems.
SCP 86-DOS
The CHKDSK command first appeared in 1980, created by Tim Paterson at Seattle Computer Products for the 86-DOS operating system.
MS-DOS / IBM PC DOS
Introduced with MS-DOS version 1, CHKDSK functions as an external command. Versions ranging from 2.x through 4.x utilize chkdsk.com, whereas from version 5.x onward, chkdsk.exe is employed.
Prior to MS-DOS 4.0’s inclusion of MEM.EXE, CHKDSK could report memory usage; similarly, DR DOS provided a /A switch that limited output exclusively to memory statistics.
MS-DOS 5.0 bug
A significant flaw existed in MS-DOS 5.0’s CHKDSK and UNDELETE utilities affecting disks with a file allocation table spanning 256 sectors—typically those sized near multiples of 128 MB. Executing CHKDSK /F risked data corruption, while using UNDELETE produced unpredictable outcomes. This issue impacted executables dated April 9, 1991, and was corrected in MS-DOS version 5.0a.
Microsoft Windows
The CHKDSK command can be launched from the DOS prompt, Windows Explorer, Windows Command Prompt, Windows PowerShell, or the Recovery Console.
On systems based on Windows NT, CHKDSK includes capabilities to scan disk surfaces for bad sectors and mark them accordingly—a function previously performed by Microsoft ScanDisk in earlier Windows editions. The version designed for Windows Server environments is aware of RAID configurations and can attempt data recovery on defective sectors within RAID-1 or RAID-5 arrays if other disks remain operational.
When files or directories become corrupted—due to events like power failures, invalid filenames, or illegal characters—they are relocated to a directory named found.000, located at the root of the partition. They are renamed using generic hexadecimal identifiers such as file00000000.chk or dir_00000000.chk.
A typical CHKDSK operation on Windows NT proceeds through three stages that verify file metadata integrity without repairing errors unless explicitly requested. Surface scans—which can be time-intensive on large drives—require manual initiation. Repairing detected issues demands exclusive write access to the target volume.
Due to this exclusivity requirement, checking the system drive during normal operation is not possible. Instead, the system flags the volume with a dirty bit and triggers a reboot. During startup, an internal tool called Autochk, executed by SMSS.EXE, performs the disk check and attempts repairs if the dirty bit is set.
To mitigate lengthy scans and exclusive access constraints, Windows Vista introduced a new health model for file systems that automatically repairs errors as they occur. For more severe problems, users receive notifications via the Action Center, prompting them to take the volume offline for comprehensive scanning.
Both Windows Vista and Windows Server 2008 incorporated default self-healing features capable of detecting and silently correcting physical file system issues in real time, thereby reducing reliance on manual execution of CHKDSK. This functionality is managed through the fsutil repair command.
Nonetheless, some criticism has been directed at AUTOCHK's automatic modifications without user approval, which can interfere with backup strategies or cause file path corruption—particularly in environments where multiple operating systems share access to the same partition (multiboot setups).
The purported Windows 7 defect
Prior to the launch of Windows 7, InfoWorld circulated reports alleging a memory leak within CHKDSK, asserting that executing chkdsk /r would exhaust system memory and lead to a system crash. Randall C. Kennedy traced this allegation back to "various online sources" and observed in his own experiments that although memory consumption surpassed 90%, no crash occurred. He viewed this as a significant flaw potentially jeopardizing Windows 7’s release and voiced criticism towards Microsoft. Conversely, Tom Warren from Neowin minimized the severity of the claim, and Microsoft’s Steven Sinofsky verified that no crashes could be replicated, clarifying that the elevated memory usage was deliberate, designed to enhance performance rather than indicating a leak. Additionally, Ed Bott of ZDNet conducted tests without encountering crashes, emphasizing that chkdsk /r does not operate on the active system partition during runtime, thereby reducing and mitigating any associated risks.[1]
DR/Novell DOS
The command is also implemented within DR DOS 6.0.[2]
FreeDOS
In FreeDOS, the CHKDSK utility was created by Imre Leber and is distributed under the terms of the GNU GPL 2.Cite error: The opening <ref> tag is malformed or has a bad name
ReactOS
ReactOS’s version of CHKDSK derives from a free clone originally developed by Mark Russinovich for Sysinternals in 1998. This version was adapted for ReactOS by Emanuele Aliberti in 1999 and provides support for volumes formatted with the FAT32 filesystem. Nevertheless, it lacks compatibility with volumes formatted using the Btrfs filesystem, despite ReactOS having incorporated Btrfs support starting with release 0.4.1.