CHKDSK
GPLv2 | |
Website | learn |
---|
In computing, CHKDSK
(short for "check disk") is a system tool and command in DOS, Digital Research FlexOS,[1] IBM/Toshiba 4690 OS,[2] IBM OS/2,[3] Microsoft Windows and related operating systems. It verifies the file system integrity of a volume and attempts to fix logical file system errors. It is similar to the fsck
command in Unix and similar to Microsoft ScanDisk, which co-existed with CHKDSK
in Windows 9x and MS-DOS 6.x.
Implementations
An early implementation of a 'CheckDisk' was the CHECKDSK that was a part of Digital Equipment Corporation hardware's diagnostics, running on early 1970s TENEX and TOPS-20.[4] [5]
SCP 86-DOS
The CHKDSK
command was first implemented in 1980 by Tim Paterson and included in Seattle Computer Products 86-DOS.[6]
MS-DOS / IBM PC DOS
The command is available in MS-DOS versions 1 and later.[7]
CHKDSK
is implemented as an external command. MS-DOS versions 2.x - 4.x use chkdsk.com
as the executable file. MS-DOS versions 5.x and later use chkdsk.exe
as the executable file.[8]
CHKDSK
can also show the memory usage, this was used before the command MEM.EXE
was introduced in MS-DOS 4.0 to show the memory usage. In DR DOS the parameter /A
limited the output to only show the memory usage.
MS-DOS 5.0 bug
CHKDSK
and UNDELETE
in MS-DOS 5.0 have a bug which can corrupt data: If the
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 CHKDSK.EXE
and UNDELETE.EXE
bearing a datestamp of April 9, 1991. This bug was fixed in MS-DOS 5.0a.[9]Microsoft Windows
CHKDSK
can be run from
On
Fragments of files and directories deemed as corrupt as a result of, for example, power outages while writing, file name overlength, and/or invalid characters in file name, are moved into a directory under the partition's root, named found.000
, and renamed into generic hexadecimally numbered files and directories starting with file00000000.chk
and dir_00000000.chk
respectively.[12][13]
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. The 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.[14][15]
Due to the requirement of the monopolized access to the drive, the CHKDSK
cannot check the system disk in the normal system mode. Instead, the system sets a
Because of the exclusive access requirement and the time-consuming nature of CHKDSK
operation, Windows Vista 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.[16]
Windows Vista and Windows Server 2008 added self-healing ability, turned on by default, in addition to providing the CHKDSK
command. It detects physical file system errors and silently fixes them on the fly. Thus, many problems previously discovered on running CHKDSK
never appear. It is administered by fsutil repair
command.[17][18]
Criticism has been aimed at the tendency of AUTOCHK
to automatically modify the file system when not explicitly solicited by the user who may wish to
The alleged Windows 7 bug
Before the release of
chkdsk /r
, by design, does not work on the system drive while Windows is online, Bott concluded "it's arguably a feature, not a bug, and the likelihood that you'll ever crash a system this way is very, very small and completely avoidable."[24]DR/Novell DOS
CHKDSK
command.[25]FreeDOS
The
ReactOS
The ReactOS implementation is based on a free clone developed by Mark Russinovich for Sysinternals in 1998.[27] It was adapted to ReactOS by Emanuele Aliberti in 1999 and supports volumes using the
See also
References
- ^ "FlexOS User's Guide" (PDF). www.bitsavers.org. 1986. Archived from the original (PDF) on 2018-09-14. Retrieved 2020-09-14.
- ^ [1][dead link]
- ^ "JaTomes Help - OS/2 Commands". Archived from the original on 2019-04-14. Retrieved 2019-07-20.
- ^ "134-TENEX JOBZRO.MAC". BitSavers. 1979-09-16. Archived from the original on 2019-01-27. Retrieved 2020-08-14.
- ^ "Xerox Palo Alto Research Center" (PDF).
Under Tenex .. Hardware Maintenance Procedures .. Recovery from Checkdsk Errors
- ^ "86-DOS User's Manual - Version 0.3" (PDF). Archived from the original (PDF) on 2019-07-14. Retrieved 2019-06-09.
- ISBN 0-7356-1812-7.
- ^ "MS-DOS and Windows command line chkdsk command". www.computerhope.com.
- ^ "When Not to Use MS-DOS 5.0
CHKDSK
andUNDELETE
Commands". Support (1.1 ed.). Microsoft. 16 November 2006. - ^ "Description of the Windows XP Recovery Console for advanced users". Support (8.0 ed.). Microsoft. 11 July 2013. Retrieved 4 September 2014.
- ISBN 9780735614376.
- ^ "What Are the FOUND.000 Folder and FILE0000.CHK File in Windows?". 5 December 2016.
- ^ "Delete File when Path Too Long or Name Ends with Dots or Space".
- ^ "An explanation of the new /C and /I Switches that are available to use with Chkdsk.exe". Microsoft Support. Microsoft. 1 December 2007. Archived from the original on 24 October 2014. Retrieved 25 January 2019.
- ^ "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. Archived from the original on 2012-05-12.
- ^ Chen, Ken (4 August 2014). "NTFS Self-Healing is An Overlooked but Useful Feature in Windows 7". Next of Windows.
- ^ Pawar, Amit (13 February 2008). "Self-healing NTFS in Windows Server 2008 and Windows Vista". Amit Pawar - Infrastructure blog. Microsoft.
- ^ "Will Scandisk or CHKDSK Cause Computer Data Loss?". Data Recovery Blog. 8 February 2017.
- ^ "Disable or Stop Auto CHKDSK During Windows Startup • Raymond.CC". Raymond.CC. 23 February 2008.
- ^ "How to Fix a Corrupted Windows NTFS Filesystem With Ubuntu". MakeUseOf. 22 September 2010.
- ^ Kennedy, Randall C. (5 August 2009). "Critical Windows 7 bug risks derailing product launch". InfoWorld. IDG. Retrieved 19 February 2015.
- ^ Warren, Tom (5 August 2009). "Windows 7 RTM contains a rather nasty chkdsk bug". Neowin. Retrieved 19 February 2015.
- CBS Interactive.
- ^ "DR DOS 6.0 User Guide Optimisation and Configuration Tips" (PDF). Archived from the original (PDF) on 2019-09-30. Retrieved 2019-08-13.
- ^ "ibiblio.org FreeDOS Package -- chkdsk (FreeDOS Base)". www.ibiblio.org.
- ^ "reactos/reactos". GitHub. 3 January 2022.
Further reading
- Wolverton, Van (1990). MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition. ISBN 978-1556152894.
- Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. ISBN 978-0078818714.
- Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. ISBN 978-0-596-00148-3.