<s>
In	O
computing	O
,	O
CHKDSK	B-Device
(	O
short	O
for	O
"	O
check	B-Device
disk	I-Device
"	O
)	O
is	O
a	O
system	B-Application
tool	I-Application
and	O
command	B-Application
in	O
DOS	B-Device
,	O
Digital	B-Operating_System
Research	I-Operating_System
FlexOS	I-Operating_System
,	O
IBM/Toshiba	O
4690	B-Language
OS	I-Language
,	O
IBM	B-Application
OS/2	I-Application
,	O
Microsoft	B-Application
Windows	I-Application
and	O
related	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
It	O
verifies	O
the	O
file	B-Application
system	I-Application
integrity	O
of	O
a	O
volume	B-Application
and	O
attempts	O
to	O
fix	O
logical	O
file	B-Application
system	I-Application
errors	O
.	O
</s>
<s>
It	O
is	O
similar	O
to	O
the	O
fsck	B-Device
command	B-Application
in	O
Unix	B-Application
and	O
similar	O
to	O
Microsoft	O
ScanDisk	O
,	O
which	O
co-existed	O
with	O
CHKDSK	B-Device
in	O
Windows	B-Application
9x	O
and	O
MS-DOS	B-Application
6.x	O
.	O
</s>
<s>
An	O
early	O
implementation	O
of	O
a	O
'	O
CheckDisk	B-Device
 '	O
was	O
the	O
CHECKDSK	O
that	O
was	O
a	O
part	O
of	O
Digital	O
Equipment	O
Corporation	O
hardware	O
's	O
diagnostics	O
,	O
running	O
on	O
early	O
1970s	O
TENEX	B-Operating_System
and	O
TOPS-20	B-Operating_System
.	O
</s>
<s>
The	O
CHKDSK	B-Device
command	B-Application
was	O
first	O
implemented	O
in	O
1980	O
by	O
Tim	O
Paterson	O
and	O
included	O
in	O
Seattle	B-Operating_System
Computer	I-Operating_System
Products	I-Operating_System
86-DOS	I-Operating_System
.	O
</s>
<s>
The	O
command	B-Application
is	O
available	O
in	O
MS-DOS	B-Application
versions	O
1	O
and	O
later	O
.	O
</s>
<s>
CHKDSK	B-Device
is	O
implemented	O
as	O
an	O
external	O
command	B-Application
.	O
</s>
<s>
MS-DOS	B-Application
versions	O
2.x	O
-	O
4.x	O
use	O
chkdsk.com	B-Device
as	O
the	O
executable	O
file	O
.	O
</s>
<s>
MS-DOS	B-Application
versions	O
5.x	O
and	O
later	O
use	O
chkdsk.exe	B-Device
as	O
the	O
executable	O
file	O
.	O
</s>
<s>
CHKDSK	B-Device
can	O
also	O
show	O
the	O
memory	O
usage	O
,	O
this	O
was	O
used	O
before	O
the	O
command	B-Application
MEM.EXE	O
was	O
introduced	O
in	O
MS-DOS	B-Application
4.0	O
to	O
show	O
the	O
memory	O
usage	O
.	O
</s>
<s>
In	O
DR	B-Application
DOS	I-Application
the	O
parameter	O
/A	O
limited	O
the	O
output	O
to	O
only	O
show	O
the	O
memory	O
usage	O
.	O
</s>
<s>
CHKDSK	B-Device
and	O
UNDELETE	O
in	O
MS-DOS	B-Application
5.0	O
have	O
a	O
bug	O
which	O
can	O
corrupt	O
data	O
:	O
If	O
the	O
file	B-Application
allocation	I-Application
table	I-Application
of	O
a	O
disk	O
uses	O
256	O
sectors	O
,	O
running	O
CHKDSK	B-Device
/F	O
can	O
cause	O
data	O
loss	O
and	O
running	O
UNDELETE	O
can	O
cause	O
unpredictable	O
results	O
.	O
</s>
<s>
This	O
applies	O
to	O
CHKDSK.EXE	B-Device
and	O
UNDELETE.EXE	O
bearing	O
a	O
datestamp	O
of	O
April	O
9	O
,	O
1991	O
.	O
</s>
<s>
This	O
bug	O
was	O
fixed	O
in	O
MS-DOS	B-Application
5.0a	O
.	O
</s>
<s>
CHKDSK	B-Device
can	O
be	O
run	O
from	O
DOS	B-Operating_System
prompt	I-Operating_System
,	O
Windows	B-Protocol
Explorer	I-Protocol
,	O
Windows	B-Device
Command	I-Device
Prompt	I-Device
,	O
Windows	B-Application
PowerShell	I-Application
or	O
Recovery	O
Console	O
.	O
</s>
<s>
On	O
Windows	B-Device
NT	I-Device
operating	B-General_Concept
systems	I-General_Concept
,	O
CHKDSK	B-Device
can	O
also	O
check	O
the	O
disk	O
surface	O
for	O
bad	B-Device
sectors	I-Device
and	O
mark	O
them	O
(	O
in	O
MS-DOS	B-Application
6.x	O
and	O
Windows	B-Application
9x	O
,	O
this	O
is	O
a	O
task	O
done	O
by	O
Microsoft	O
ScanDisk	O
)	O
.	O
</s>
<s>
The	O
Windows	B-Device
Server	I-Device
version	O
of	O
CHKDSK	B-Device
is	O
RAID-aware	O
and	O
can	O
fully	O
recover	O
data	O
in	O
bad	B-Device
sectors	I-Device
of	O
a	O
disk	O
in	O
a	O
RAID-1	B-General_Concept
or	O
RAID-5	B-General_Concept
array	O
if	O
other	O
disks	O
in	O
the	O
set	O
are	O
intact	O
.	O
</s>
<s>
On	O
Windows	B-Device
NT	I-Device
family	I-Device
,	O
a	O
standard	O
CHKDSK	B-Device
scan	O
consists	O
of	O
three	O
phases	O
of	O
testing	O
file	O
metadata	O
.	O
</s>
<s>
CHKDSK	B-Device
requires	O
exclusive	O
write	O
access	O
to	O
the	O
volume	B-Application
to	O
perform	O
repairs	O
.	O
</s>
<s>
Due	O
to	O
the	O
requirement	O
of	O
the	O
monopolized	O
access	O
to	O
the	O
drive	O
,	O
the	O
CHKDSK	B-Device
cannot	O
check	O
the	O
system	O
disk	O
in	O
the	O
normal	O
system	O
mode	O
.	O
</s>
<s>
Instead	O
,	O
the	O
system	O
sets	O
a	O
dirty	B-Operating_System
bit	I-Operating_System
to	O
the	O
disk	B-Application
volume	I-Application
and	O
then	O
reboots	O
the	O
computer	O
.	O
</s>
<s>
During	O
the	O
Windows	B-Operating_System
start-up	I-Operating_System
,	O
a	O
special	O
version	O
of	O
CHKDSK	B-Device
called	O
Autochk	O
(	O
a	O
native	B-Language
mode	I-Language
application	O
)	O
is	O
started	O
by	O
the	O
SMSS.EXE	O
and	O
checks	O
and	O
attempts	O
repairing	O
the	O
file	B-Application
system	I-Application
if	O
the	O
dirty	B-Operating_System
bit	I-Operating_System
is	O
set	O
.	O
</s>
<s>
Because	O
of	O
the	O
exclusive	O
access	O
requirement	O
and	O
the	O
time-consuming	O
nature	O
of	O
CHKDSK	B-Device
operation	O
,	O
Windows	B-Application
Vista	I-Application
implemented	O
a	O
new	O
file	B-Application
system	I-Application
health	O
model	O
in	O
which	O
the	O
operating	B-General_Concept
system	I-General_Concept
fixes	O
errors	O
on	O
the	O
volumes	O
as	O
it	O
encounters	O
them	O
.	O
</s>
<s>
In	O
the	O
event	O
that	O
the	O
problem	O
is	O
grave	O
and	O
a	O
full	O
scan	O
is	O
required	O
,	O
Action	O
Center	O
notifies	O
the	O
user	O
to	O
take	O
the	O
volume	B-Application
offline	O
at	O
the	O
first	O
convenience	O
.	O
</s>
<s>
Windows	B-Application
Vista	I-Application
and	O
Windows	B-Device
Server	I-Device
2008	I-Device
added	O
self-healing	O
ability	O
,	O
turned	O
on	O
by	O
default	O
,	O
in	O
addition	O
to	O
providing	O
the	O
CHKDSK	B-Device
command	B-Application
.	O
</s>
<s>
It	O
detects	O
physical	O
file	B-Application
system	I-Application
errors	O
and	O
silently	O
fixes	O
them	O
on	O
the	O
fly	O
.	O
</s>
<s>
Thus	O
,	O
many	O
problems	O
previously	O
discovered	O
on	O
running	O
CHKDSK	B-Device
never	O
appear	O
.	O
</s>
<s>
It	O
is	O
administered	O
by	O
fsutil	O
repair	O
command	B-Application
.	O
</s>
<s>
Criticism	O
has	O
been	O
aimed	O
at	O
the	O
tendency	O
of	O
AUTOCHK	O
to	O
automatically	O
modify	O
the	O
file	B-Application
system	I-Application
when	O
not	O
explicitly	O
solicited	O
by	O
the	O
user	O
who	O
may	O
wish	O
to	O
back	B-Protocol
up	I-Protocol
their	I-Protocol
data	I-Protocol
in	O
prior	O
,	O
as	O
an	O
attempted	O
repair	O
may	O
scramble	O
,	O
undermine	O
and	O
disown	O
file	O
and	O
directory	O
paths	O
,	O
especially	O
on	O
a	O
multiboot	B-Operating_System
installation	O
where	O
multiple	O
operating	B-General_Concept
systems	I-General_Concept
may	O
have	O
interferingly	O
written	O
to	O
the	O
same	O
partition	O
.	O
</s>
<s>
Before	O
the	O
release	O
of	O
Windows	B-Device
7	I-Device
,	O
InfoWorld	O
reported	O
an	O
alleged	O
memory	B-Error_Name
leak	I-Error_Name
in	O
CHKDSK	B-Device
;	O
according	O
to	O
the	O
report	O
,	O
the	O
chkdsk	B-Device
/r	O
command	B-Application
would	O
cause	O
the	O
memory	O
consumption	O
to	O
reach	O
the	O
maximum	O
and	O
the	O
system	O
to	O
crash	B-General_Concept
.	O
</s>
<s>
Randall	O
C	B-Language
.	O
Kennedy	O
of	O
InfoWorld	O
attributed	O
the	O
original	O
report	O
to	O
"	O
various	O
Web	O
sources	O
"	O
and	O
said	O
that	O
in	O
his	O
tests	O
,	O
the	O
memory	O
consumption	O
reached	O
above	O
90%	O
,	O
although	O
he	O
did	O
not	O
experience	O
a	O
crash	B-General_Concept
.	O
</s>
<s>
Nevertheless	O
,	O
Kennedy	O
took	O
the	O
memory	O
consumption	O
for	O
a	O
critical	O
bug	O
that	O
would	O
derail	O
Windows	B-Device
7	I-Device
's	O
launch	O
and	O
chastised	O
Microsoft	O
.	O
</s>
<s>
Steven	O
Sinofsky	O
of	O
Microsoft	O
also	O
responded	O
that	O
Microsoft	O
could	O
not	O
reproduce	O
a	O
crash	B-General_Concept
either	O
but	O
that	O
the	O
massive	O
memory	O
consumption	O
was	O
by	O
design	O
,	O
to	O
improve	O
performance	O
,	O
and	O
not	O
a	O
leak	O
.	O
</s>
<s>
Ed	O
Bott	O
of	O
ZDNet	O
also	O
reviewed	O
the	O
claim	O
with	O
his	O
own	O
tests	O
and	O
observed	O
that	O
no	O
crash	B-General_Concept
would	O
occur	O
.	O
</s>
<s>
Noting	O
that	O
chkdsk	B-Device
/r	O
,	O
by	O
design	O
,	O
does	O
not	O
work	O
on	O
the	O
system	B-Application
drive	I-Application
while	O
Windows	B-Application
is	O
online	O
,	O
Bott	O
concluded	O
"	O
it	O
’s	O
arguably	O
a	O
feature	O
,	O
not	O
a	O
bug	O
,	O
and	O
the	O
likelihood	O
that	O
you	O
’ll	O
ever	O
crash	B-General_Concept
a	O
system	O
this	O
way	O
is	O
very	O
,	O
very	O
small	O
and	O
completely	O
avoidable.	O
"	O
</s>
<s>
DR	B-Application
DOS	I-Application
6.0	O
also	O
includes	O
an	O
implementation	O
of	O
the	O
command	B-Application
.	O
</s>
<s>
The	O
FreeDOS	B-Application
version	O
was	O
developed	O
by	O
Imre	O
Leber	O
and	O
is	O
licensed	O
under	O
the	O
GNU	O
GPL	O
2	O
.	O
</s>
<s>
The	O
ReactOS	B-Application
implementation	O
is	O
based	O
on	O
a	O
free	B-Application
clone	O
developed	O
by	O
Mark	O
Russinovich	O
for	O
Sysinternals	O
in	O
1998	O
.	O
</s>
<s>
It	O
was	O
adapted	O
to	O
ReactOS	B-Application
by	O
Emanuele	O
Aliberti	O
in	O
1999	O
and	O
supports	O
volumes	O
using	O
the	O
FAT32	B-Application
filesystem	B-Application
.	O
</s>
<s>
The	O
command	B-Application
does	O
not	O
support	O
volumes	O
using	O
the	O
Btrfs	B-Operating_System
filesystem	B-Application
,	O
although	O
ReactOS	B-Application
supports	O
it	O
since	O
version	O
0.4.1	O
.	O
</s>
