---
tags: [disks, procedural, Linux]
created: Saturday, April 26, 2025
---

# Repair disks with fsck

Identify file system errors on a disk.

Be sure to unmount the device beforehand.

```sh
sudo fsck.vfat -a /dev/sdf1
```

This will automatically apply repairs. An example output:

```
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
  Not automatically fixing this.
/.Trash-1000/files/retropie
 Start does point to root directory. Deleting dir.
Reclaimed 312130 unused clusters (2556968960 bytes) in 1553 chains.
Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
 Automatically removing dirty bit.
Free cluster summary wrong (1516247 vs. really 1516241)
  Auto-correcting.

*** Filesystem was changed ***
Writing changes.
/dev/sdf1: 1582 files, 396097/1912338 clusters

```
