Volume was not properly unmounted …
- Code: Select all
# dmesg | grep corrupt
[ 21.280705] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
- Code: Select all
# 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
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip
- Code: Select all
sudo apt-get install dosfstools
(which only needs to be done once)
then
- Code: Select all
sudo umount /boot
fsck -V /dev/mmcblk0p1
(reply to any messages as above)
mount /boot
No need to build dosfstools yourself as it has already been done for you
It seems the dosfstools package from apt-get (3.0.13-1) seems older than git files (3.0.24).
so the only solution just like @Richard-TX said, have to take the git then recompile.
Voila, the bug gone.
- Posts: 4
- Joined: Fri Jul 05, 2013 9:10 pm
git cloned and built as per @Richard-TX, that fixed the problem.
- Posts: 1
- Joined: Sun Jan 05, 2014 9:00 am
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=61879
Used this resulting in no change to the /boot corrupt message:
- Code: Select all
sudo fsck.vfat -w -r -l -a -v -t /dev/mmcblk0p5
So instead followed Richard’s guidance to git clone and build the source and use fsck.fat. Walla! No more corrupt message during boot.
- Posts: 1
- Joined: Mon Dec 16, 2013 6:21 pm
The dosfstools from the official raspbian repo did not clear the dirty bit. I had to compile the git sources as per the above post and use:
- Code: Select all
./fsck.fat -trawl /dev/mmcblk0p1
- Posts: 112
- Joined: Tue Jul 31, 2012 11:51 am
- Location: Belgium
The first time ./fsck.fat is ran, it should report «dirty bit» is set. Choose number 1. When the command is ran the second time, it will show the bit as clean.
Also, I was not running as a root user so I used «sudo» for each command.
Hopefully it will help. I know Richard’s work has helped me.
Thanks and best regards!
Fred
- Code: Select all
sudo umount /boot
sudo git clone http://daniel-baumann.ch/git/software/dosfstools.git
sudo cd dosfstools
sudo make
sudo ./fsck.fat -V /dev/mmcblk0p1sudo ./fsck.fat -a /dev/mmcblk0p1
sudo mount /boot
- Posts: 6
- Joined: Thu Apr 18, 2013 5:48 pm
After make you need to use sudo make install to replace any existing version of the tools.
Unemployed mainframe database troubleshooter
RPi owner since 2012.
Twitter: @DougieLawson
Please post technical questions on the forum, not by personal message. Thanks!
- Code: Select all
sudo ./fsck.fat -V /dev/mmcblk0p1
fsck.fat 3.0.25 (2014-01-17)
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.
FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT
?
Which one should I choose?
- Posts: 177
- Joined: Thu Feb 16, 2012 11:29 am
- Location: Slovenia
Or use this command:
- Code: Select all
./fsck.fat -trawl /dev/mmcblk0p1
- Posts: 112
- Joined: Tue Jul 31, 2012 11:51 am
- Location: Belgium
ripat wrote:Same here.The dosfstools from the official raspbian repo did not clear the dirty bit. I had to compile the git sources as per the above post and use:
- Code: Select all
./fsck.fat -trawl /dev/mmcblk0p1
Thank you, this worked for me …
isn’t it possible to update that version in the repository? it is not understandable why every body who tries to fix the dirty bit, first has to run in to a not working solution, struggle around what’s wrong, and has to search in the internet, to find the right working solution…
for what is the repository there, when it is not keeped up to date?!?!
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, 64GB microSDHC class 10 card, HDMI 1920×1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)
- Posts: 226
- Joined: Fri Jan 04, 2013 1:57 pm
- Location: de_DE
In /etc/apt/sources.list add:
- Code: Select all
# Jessie
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
Create your preference file: /etc/apt/preferences and add these lines:
- Code: Select all
Package: *
Pin: release n=wheezy
Pin-Priority: 800Package: *
Pin: release n=jessie
Pin-Priority: 600
Update the packages list (it will take a while the first time!):
- Code: Select all
$ sudo apt-get update
Install dosfstools from Jessie
- Code: Select all
$ sudo apt-get -t jessie install dosfstools
Finaly umount /boot and run fsck:
- Code: Select all
$ sudo umount /boot
$ sudo fsck.vfat -trawl /dev/mmcblk0p1
- Posts: 112
- Joined: Tue Jul 31, 2012 11:51 am
- Location: Belgium
- Code: Select all
[ 18.356472] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
All the above looks a bit scary. And when I run fsck as asked .. it warns of the perils of an unmounted file system!! Is this a real filesystem problem? Do I need to fix it? Is it as easy as and unmount of /boot, fsck, and remount (presumably all managed by the debian kernel)?
1. Follow the instructions here to fix the dosfstools package.
2. Stick your card in a windows machine and use checkdisk (which can be driven from the GUI by right click and properties from file manager).
Unemployed mainframe database troubleshooter
RPi owner since 2012.
Twitter: @DougieLawson
Please post technical questions on the forum, not by personal message. Thanks!
But checkdisk finds no errors. Though (bizarrely) I get a pop up offering to fix same errors when I plug it in So I’m presently reinstalling my February image. Don’t think I’ll lose much beyond updates as I’ve been attending to «other hobby» since then.
- Code: Select all
[...]
failed (code 6).
[FAIL] File system check failed. A log is being saved in /var/log/fsck/checkfs/ if that location is writable. Please repair the file system manually. ... failed!
[...]
Then on the log file I can read:
- Code: Select all
[...]
fsck.fat 3.0.26 (2014-03-07)
/dev/mmcblk0p1: 15 files, 2383/7161 clusters
open: No such file or directory
[...]
From the log I can see it’s now running the build version 3.0.26. I can run it when I log in and seems to correct the error bit, when i run it with -frawl options. However the message is still there on every reboot, and waiting for user input.
I read on other forums I can disable the fsck editing the /etc/fstab, however will like to keep it.
Is really broken? I’m missing something?
Thanks
- Posts: 1
- Joined: Sun Mar 30, 2014 12:30 am
- Code: Select all
sudo umount /boot
sudo git clone http://daniel-baumann.ch/git/software/dosfstools.git
sudo cd dosfstools
sudo make
sudo make install
sudo ./fsck.fat -V /dev/mmcblk0p1
sudo ./fsck.fat -a /dev/mmcblk0p1
sudo mount /boot
In the line: ./fsck.fat -V /dev/mmcblk0p1
I typed the number 1 and I pressed enter
Good luck!
- Posts: 13
- Joined: Wed Mar 12, 2014 9:21 pm
sudo blkid -c /dev/null
/dev/mmcblk0p1: LABEL=»RECOVERY» UUID=»DB73-1078″ TYPE=»vfat»
/dev/mmcblk0p3: LABEL=»SETTINGS» UUID=»d1005177-0e28-44df-8dac-48faf7dc7c32″ TYPE=»ext4″
/dev/mmcblk0p5: LABEL=»BOOT» UUID=»039D-059C» TYPE=»vfat»
/dev/mmcblk0p6: LABEL=»root» UUID=»2841057b-39e5-4612-87d5-c64ddea7edfb» TYPE=»ext4″
sudo ./fsck.fat -V /dev/mmcblk0p5 detects the dirty bit so you say yes (1)
sudo ./fsck.fat -a /dev/mmcblk0p5 fixes the dirty bit
Otherwise, brilliant and fixed my error too. Thanks
- Posts: 3
- Joined: Wed Apr 16, 2014 3:20 pm
So, installing with «sudo apt-get install dosfstools» didn’t work.
And like NT4boy (First one above this post) said, try to identify the disc which gives the error. Most probably it is not p1. Mine was not P1 either, it was P5 instead. Try what he says and hopefully you’ll solve this annoying error message.
- Posts: 3
- Joined: Sun Apr 20, 2014 2:53 am
croston wrote:I’ve built Raspbian Jessie (clean image install, not an upgrade) and confirm that it has been fixed in the next version of Raspbian.
And for those who don’t want to go the full dist upgrade way to Jessie I have posted here how to install only one package from Jessie using the Debian pinning system. Easy and gentle to your dependencies. Another advantage of using that method is that dosfstools will be automatically updated just like any other package from wheezy.
- Posts: 112
- Joined: Tue Jul 31, 2012 11:51 am
- Location: Belgium
- Posts: 4
- Joined: Wed Oct 02, 2013 12:05 am
ripat wrote:The dosfstools v. 3.0.16-2 from the Jessie repo is working fine and successfully removes the dirty bit. If you don’t want to make a full dist-upgrade, you can use the handy Debian preference pinning system and pick any package from Jessie without breaking your system. Here is how to do:
Just wanted to add my thanks for this post. This fixed my problem and was much easier to complete than other solutions offered. Thanks so much
-Liam
- Posts: 8
- Joined: Thu Dec 19, 2013 10:12 am
Who is online
Users browsing this forum: No registered users and 22 guests