Detect, repair and recover Linux filesystems with the fsck front-end and its helpers. 16.03.2026 | reading time: 3 min A disk crash leaves a partition unmountable; what now? `fsck` is the standard Linux front-end that inspects and repairs filesystem metadata to restore consistency and get the system back online. Detecting filesystem failure Mount failures, repeated I/O errors in dmesg, or unclean shutdown notices are concrete signs; do not keep writing to the affected partition. Unmount the device or boot a rescue image before attempting repairs, because running `fsck` on a mounted, writable filesystem can worsen damage. Practical repair walkthrough Here is a minimal, hands-on sequence that tells and shows what to do: ```bash sudo umount /dev/sdb1 sudo fsck -y /dev/sdb1 fsck from util-linux 2.36 e2fsck 1.46.4 (18-Aug-2021) /dev/sdb1: recovering journal /dev/sdb1: Inodes that were part of a corrupted orphan linked list found. Clearing orphan list. /dev/sdb1: ***** FILE SYSTEM WAS MODIFIED ***** /dev/sdb1: 12345/327680 files (4.0% non-contiguous), 54321/1310720 blocks ``` This shows `fsck` invoking the ext4 checker, applying fixes after confirmation was suppressed by `-y`, and reporting the cleaned filesystem summary. Options and cautions Common switches are `-y` to answer yes to all fixes, `-n` to do a dry run with no changes, `-A` to walk /etc/fstab, `-t` to restrict to specific types, and `-C` to show a progress bar for e2fsck; use them deliberately. Always back up important data first, prefer offline repairs from a live USB, and avoid automatic mass-fixing on critical mounts without inspection because automatic repairs can hide underlying hardware faults. Tools that join the repair `fsck` dispatches to filesystem-specific checkers, so know the helpers: `e2fsck` for ext2/3/4, `xfs_repair` for XFS (XFS has limited fsck wrapper behavior), and `btrfs check` for Btrfs; combine these with SMART and bad-block checks when corruption recurs. Where to go from here Practice on non-production images, learn to interpret `dmesg` and filesystem logs, and build a rescue toolkit with live media and backups; mastering these steps reduces downtime. Consider deepening skills and pursuing certifications such as CompTIA Linux+ or LPIC-1 and use intensive exam preparation like bitsandbytes.academy to structure study. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage backup troubleshooting