<s>
badblocks	B-Device
is	O
a	O
Linux	B-Application
utility	O
to	O
check	O
for	O
bad	B-Device
sectors	I-Device
on	O
a	O
disk	B-Device
drive	I-Device
.	O
</s>
<s>
It	O
can	O
create	O
a	O
text	O
file	O
with	O
list	O
of	O
these	O
sectors	O
that	O
can	O
be	O
used	O
with	O
other	O
programs	O
,	O
like	O
mkfs	B-Device
,	O
so	O
that	O
they	O
are	O
not	O
used	O
in	O
the	O
future	O
and	O
thus	O
do	O
not	O
cause	O
corruption	O
of	O
data	O
.	O
</s>
<s>
It	O
is	O
part	O
of	O
the	O
e2fsprogs	B-Application
project	O
,	O
and	O
a	O
port	O
is	O
available	O
for	O
BSD	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
When	O
run	O
as	O
a	O
standalone	O
program	O
,	O
badblocks	B-Device
gives	O
a	O
list	O
of	O
blocks	B-General_Concept
with	O
problems	O
,	O
if	O
any	O
.	O
</s>
<s>
This	O
makes	O
it	O
a	O
good	O
option	O
for	O
checking	O
whether	O
the	O
disk	B-Device
drive	I-Device
is	O
healthy	O
,	O
independent	O
of	O
SMART	O
data	O
and	O
file	O
system	O
checks	O
.	O
</s>
<s>
A	O
more	O
common	O
use	O
case	O
is	O
the	O
invocation	O
of	O
badblocks	B-Device
as	O
part	O
of	O
e2fsck	B-Device
when	O
passing	O
the	O
option	O
"	O
-c	O
"	O
to	O
scan	O
for	O
bad	B-Device
blocks	I-Device
and	O
prevent	O
data	O
from	O
being	O
stored	O
on	O
these	O
blocks	B-General_Concept
.	O
</s>
<s>
This	O
is	O
done	O
by	O
adding	O
the	O
list	O
of	O
found	O
bad	B-Device
blocks	I-Device
to	O
the	O
bad	B-Device
block	I-Device
inode	B-Application
to	O
prevent	O
the	O
affected	O
sectors	O
from	O
being	O
allocated	O
to	O
a	O
file	O
or	O
directory	O
.	O
</s>
<s>
Running	O
dumpe2fs	O
-b	O
will	O
display	O
the	O
list	O
of	O
bad	B-Device
blocks	I-Device
recorded	O
by	O
e2fsck	B-Device
or	O
tune2fs	B-Application
.	O
</s>
<s>
This	O
would	O
check	O
the	O
sixth	O
partition	B-Application
of	O
the	O
drive	O
"	O
sdb	O
"	O
,	O
in	O
destructive	O
read	O
–	O
write	O
mode	O
(	O
-w	O
=	O
write-mode	O
)	O
,	O
which	O
writes	O
4	O
different	O
patterns	O
on	O
the	O
whole	O
partition	B-Application
and	O
verifies	O
each	O
by	O
reading	O
back	O
.	O
</s>
<s>
All	O
data	O
on	O
the	O
partition	B-Application
will	O
be	O
overwritten	O
at	O
the	O
block	O
level	O
.	O
</s>
<s>
This	O
does	O
the	O
same	O
as	O
above	O
,	O
but	O
to	O
the	O
entire	O
drive	O
,	O
with	O
a	O
block	B-General_Concept
size	I-General_Concept
(	O
-b	O
)	O
of	O
4096	O
.	O
</s>
<s>
This	O
destroys	O
MBRs	O
,	O
partitions	B-Application
and	O
data	O
alike	O
.	O
</s>
<s>
Modern	O
disk	B-Device
drives	I-Device
will	O
probably	O
not	O
show	O
any	O
defective	O
sectors	O
because	O
they	O
silently	O
remap	O
bad	B-Device
sectors	I-Device
to	O
spare	O
tracks	O
,	O
but	O
running	O
the	O
program	O
with	O
a	O
new	O
drive	O
for	O
several	O
days	O
will	O
test	O
the	O
whole	O
surface	O
,	O
and	O
when	O
reading	O
it	O
afterwards	O
S.M.A.R.T.	O
</s>
