Skip to content

Instantly share code, notes, and snippets.

@germanviscuso

germanviscuso/rpi_boot_fix

Last active Aug 29, 2015
Embed
What would you like to do?
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment