I'm trying to repair a SD card with FAT, but fsck
doesn't write changes — even the magic -w
option doesn't help
$ sudo fsck.fat -aw /dev/sda1
fsck.fat 3.0.26 (2014-03-07)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Free cluster summary wrong (240886 vs. really 241296)
Auto-correcting.
Performing changes.
/dev/sda1: 3471 files, 240319/481615 clusters
Looks like repaired ↑. But every restart of fsck, it reports the same problems, and pretends that it fixes them with the same text.
Here's the verbose variant
$ sudo fsck.fat -awv /dev/sda1
fsck.fat 3.0.26 (2014-03-07)
fsck.fat 3.0.26 (2014-03-07)
Checking we can access the last sector of the filesystem
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
32 reserved sectors
First FAT starts at byte 16384 (sector 32)
2 FATs, 32 bit entries
1926656 bytes per FAT (= 3763 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3869696 (sector 7558)
481615 data clusters (1972695040 bytes)
62 sectors/track, 61 heads
2048 hidden sectors
3860480 sectors total
Reclaiming unconnected clusters.
Checking free cluster summary.
Free cluster summary wrong (240886 vs. really 241296)
Auto-correcting.
Performing changes.
/dev/sda1: 3471 files, 240319/481615 clusters
fsck
output some kind of IO errors?