Home

e2fsck

e2fsck is a filesystem check and repair utility for the ext2, ext3, and ext4 filesystems. It is part of the e2fsprogs package and is used to detect and correct inconsistencies in filesystem metadata, including inodes, block bitmaps, directory structures, and link counts. The tool helps ensure filesystem integrity after events such as improper shutdowns, crashes, or disk errors. It can operate in a purely diagnostic mode or perform repairs as needed, often by writing changes back to the filesystem.

Operationally, e2fsck examines the filesystem’s metadata and data structures to identify corruption or inconsistencies. It can

Typical usage involves invoking e2fsck on a device or image, with common options such as -p to

e2fsck is closely related to fsck, serving as the ext family’s specific checker within the broader file-system

fix
issues
such
as
orphaned
inodes,
incorrect
block
counts,
and
directory
mislinks.
In
general,
repairs
should
be
performed
on
unmounted
filesystems
or
from
a
maintenance
environment;
running
with
the
filesystem
mounted
read-write
is
risky
and
discouraged.
It
supports
non-interactive
modes
suitable
for
automatic
checks,
and
interactive
prompts
allow
the
user
to
approve
repairs.
preen
(repair
without
prompting),
-y
to
assume
“yes”
for
all
questions,
-f
to
force
a
check,
and
-C
fd
to
display
a
progress
bar.
It
can
operate
on
block
devices
or
filesystem
images,
and
it
can
use
backup
superblocks
to
recover
when
the
primary
superblock
is
damaged.
After
repairs,
a
filesystem
should
be
remounted
cleanly
and
a
backup
plan
should
be
in
place.
integrity
toolkit.
It
is
widely
used
by
system
administrators
and
during
boot-time
filesystem
checks.