From LQWiki
Jump to navigation Jump to search

e2fsck is a command used to check a Linux second extended file system (ext2fs). E2fsck also supports ext2 filesystems containing a journal, which are also sometimes known as ext3 filesystems. The command automatically saves the bad blocks found into the filesystem, so that those parts of the hard drive are no longer used.

e2fsck must be run against an unmounted file system. Boot from a rescue CD or live CD. Only after that run the e2fsck -command.

Read-only method

# e2fsck -c /dev/hda

Non-destructive read/write method

# e2fsck -c -c /dev/hda

External links