Linux – Unable to resolve data corruption warning with fsck

corruptionfat32fscklinuxpartition

In order to create a contiguous space for my file system to grow, I created a new EFI System partition at sda1 so that I can migrate it from the current partition at sda5. The move itself has been successful except for a warning which says:

kernel: FAT-fs (sda1): Volume was not properly unmounted. Some data
may be corrupt. Please run fsck.

I didn't notice the warning which has been there for two days when I first created the EFI partition. I unmounted the file system and performed a file system check as follows:

# umount /dev/sda1
# fsck -V /dev/sda1
fsck from util-linux 2.24
[/sbin/fsck.vfat (1) -- /boot/efi] fsck.vfat /dev/sda1 
fsck.fat 3.0.24 (2013-11-23)
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Leaving filesystem unchanged.
/dev/sda1: 14 files, 2435/51145 clusters

I thought removing the dirty bit would resolve this. But it didn't. What should actually be done?

Best Answer

This is stupid. I find myself answering my own question again. It says,

Leaving filesystem unchanged.

suggesting that nothing is changed. This actually mean that typing 1 followed by pressing enter inside the fsck prompt did not work. Anyway, the following does work:

# fsck.vfat -v -a -w /dev/sda1

The above command automatically write changes to disk. It would be great if anyone can tell me whether this is a bug in fsck or it is due to something else.

Related Topic