Skip to content

Instantly share code, notes, and snippets.

@germanviscuso
Last active November 25, 2023 18:44
Show Gist options
  • Save germanviscuso/f04b67f212e88545eb78 to your computer and use it in GitHub Desktop.
Save germanviscuso/f04b67f212e88545eb78 to your computer and use it in GitHub Desktop.
Fix for RPi: "Volume was not properly unmounted. Some data may be corrupt. Please run fsck."
# dmesg | grep corrupt
[ 21.280705] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
# umount /boot
# git clone http://daniel-baumann.ch/git/software/dosfstools.git
# cd dosfstools
# make
cc -O2 -fomit-frame-pointer -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -g -c -o fatlabel.o src/fatlabel.c
.
.
.
cc mkfs.fat.o -o mkfs.fat
# ./fsck.fat -V /dev/mmcblk0p1
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
Starting check/repair pass.
Starting verification pass.
Leaving filesystem unchanged.
/dev/mmcblk0p1: 14 files, 2383/7161 clusters
./fsck.fat -a /dev/mmcblk0p1
#mount /boot
@Bra1nsen
Copy link

Bra1nsen commented Nov 4, 2022

root@allskyLA:~# umount /boot
root@allskyLA:~# git clone http://daniel-baumann.ch/git/software/dosfstools.git
Cloning into 'dosfstools'...
fatal: repository 'http://daniel-baumann.ch/git/software/dosfstools.git/' not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment