adam2392
Posts: 1
Joined: Sun Sep 07, 2014 9:46 pm

Re: Volume was not properly unmounted ...

Sun Sep 07, 2014 9:48 pm

I tried cloning the git.

So first, I did screen /dev/cu.PL2303-000013FA 115200 to get to the rPI development in terminal.

Then, I tried the solution Richard posted, but I got this error:
[email protected]:~$ sudo git clone http://daniel-baumann.ch/git/software/dosfstools.git
Cloning into 'dosfstools'...
error: Couldn't resolve host 'daniel-baumann.ch' while accessing http://daniel-baumann.ch/git/software/d ... /info/refs
fatal: HTTP request failed

Can someone explain to me how to fix this? I keep getting that startup error everyone is talking about.

cruster
Posts: 117
Joined: Mon Sep 01, 2014 7:56 pm

Re: Volume was not properly unmounted ...

Mon Sep 08, 2014 10:32 pm

rtek1000 wrote:It work for me:

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! 8-)
Worked for me and many thanks to OP. In my case I had the message for both mmcblk0p5 and as well a flash card sda1.
Doing the above on both and then rebooting, 'dmesg | grep corrupt' now yields nothing. Thank you. I'm quite amazed how resilient Linux seems to be to my cack handiness learning (so far) :D

subnet
Posts: 39
Joined: Wed Dec 26, 2012 10:30 pm

Re: Volume was not properly unmounted ...

Thu Sep 11, 2014 8:21 pm

Just to thanks for this tip, worked for me too.
Thanks again,
Piero

mathse13
Posts: 1
Joined: Sat Sep 20, 2014 4:29 pm

Re: Volume was not properly unmounted ...

Sat Sep 20, 2014 4:35 pm

I had the same problem. I was able to solve it using the way of Richard-TX first comment on top of this page.

Thank you very much

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Volume was not properly unmounted ...

Sun Sep 21, 2014 4:03 am

Yes. I also followed the original recipe and it seems to have worked.

But I have little question. ISTM that it should give the warning every time you mount /boot, but it seems it only gives it during the boot phase.

I.e., if I have the dirty bit set (i.e., I got the message during the boot and not fixed it yet), and I do:

Code: Select all

umount /boot
mount /boot
I should get a warning when doing the mount. But I do not get such a warning. Why not?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
jojopi
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: Volume was not properly unmounted ...

Sun Sep 21, 2014 11:18 am

There is a simpler way to deal with this kernel message: ignore it. If you lose power during or immediately after a firmware update, the card likely will not boot. Otherwise nothing is writing to /boot in normal use, so the fact that it has not been cleanly unmounted is basically harmless.
Joe Schmoe wrote:I should get a warning when doing the mount. But I do not get such a warning. Why not?
Are you looking in dmesg or on the console? I do get the message every time, but it is only printed to console at boot because it is a warning <4>, and the conosle log level defaults to error <3> after booting Raspbian.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Volume was not properly unmounted ...

Sun Sep 21, 2014 11:28 am

jojopi wrote:There is a simpler way to deal with this kernel message: ignore it. If you lose power during or immediately after a firmware update, the card likely will not boot. Otherwise nothing is writing to /boot in normal use, so the fact that it has not been cleanly unmounted is basically harmless.
True, but the fact is that it is something that is a bother and people will notice it.
Two comments come to mind:
  • 1) Unix's general "Tell them everything; let them figure out what matters and what doesn't" approach to messaging is certainly, well, jarring. I *think* we could all agree that, in a perfect world, all messages would be significant (i.e., there would be no "Just ignore it" type messages).
    2) The fact that the default "fsck" doesn't clear the bit is, well, jarring.
Joe Schmoe wrote:I should get a warning when doing the mount. But I do not get such a warning. Why not?
Are you looking in dmesg or on the console? I do get the message every time, but it is only printed to console at boot because it is a warning <4>, and the conosle log level defaults to error <3> after booting Raspbian.
I did not think to look in dmesg. I expected (apparently wrongly) for it to be displayed on the console as part of the output of the "mount" command itself.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Jonno.Johnson.UK
Posts: 19
Joined: Sun Oct 19, 2014 5:23 pm
Location: Northamptonshire

Re: Volume was not properly unmounted ...

Thu Oct 30, 2014 11:43 pm

rtek1000 wrote:

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! 8-)
I did the umount and the clone
the sodo cd said sudo: cd: command not found, so used just plain cd instead. pwd shows correct path
ran the sudo make and amongst all the output I spotted this :-
src/check.c: In function ‘check_file’:
src/check.c:589:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘long long
unsigned int’ [-Wformat]

I can see it is only a warning, but should I worry?
1st RPi = B+, Oct 2014. Running Raspbian or OpenElec at the moment.
I'm a 58 year old kid with a new toy! I know enough to be dangerous, but not enough to be useful! :-D

Jonno.Johnson.UK
Posts: 19
Joined: Sun Oct 19, 2014 5:23 pm
Location: Northamptonshire

Re: Volume was not properly unmounted ...

Fri Oct 31, 2014 12:00 am

Well, I assumed I didn't need to worry as it was a warning...

My error said p5 not p1, so...

$ sudo ./fsck.fat -V /dev/mmcblk0p5
fsck.fat 3.0.26 (2014-03-07)
0x41: 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/mmcblk0p5: 15 files, 19616/120958 clusters
$ sudo ./fsck.fat -a /dev/mmcblk0p5
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.
Performing changes.
/dev/mmcblk0p5: 15 files, 19616/120958 clusters
$ sudo mount /boot
$ sudo reboot

and lo and behold, no more error message :D
1st RPi = B+, Oct 2014. Running Raspbian or OpenElec at the moment.
I'm a 58 year old kid with a new toy! I know enough to be dangerous, but not enough to be useful! :-D

User avatar
wallarug
Posts: 460
Joined: Mon May 14, 2012 8:21 am
Location: Sydney, Australia

Re: Volume was not properly unmounted ...

Fri Nov 28, 2014 2:11 am

Well done, thank you very much!!

PorterDon
Posts: 69
Joined: Wed Aug 21, 2013 2:09 pm
Location: Thailand

Re: Volume was not properly unmounted ...

Mon Dec 15, 2014 11:26 am

Had problems cloning Baumann's git per above for some reason, but this worked for me, thanks Dougie, et al

[email protected] ~ $ sudo umount /boot
[email protected] ~ $ sudo git clone http://daniel-baumann.ch/git/sofls.git
[email protected] ~ $ cd dosfstools
[email protected] ~/dosfstools $ sudo make
[email protected] ~/dosfstools $ sudo make install
[email protected] ~/dosfstools $ sudo ./fsck.fat -V /dev/mmcblk0p5
fsck.fat 3.0.26 (2014-03-07)
0x41: 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/mmcblk0p5: 15 files, 19648/120958 clusters
[email protected] ~/dosfstools $ sudo ./fsck.fat -a /dev/mmcblk0p5
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.
Performing changes.
/dev/mmcblk0p5: 15 files, 19648/120958 clusters
[email protected] ~/dosfstools $

sudo reboot

Success !

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Volume was not properly unmounted ...

Mon Dec 15, 2014 12:15 pm

There is a very simple fix to this problem, you just ignore the error message......
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

euchrideucrow
Posts: 1
Joined: Wed Dec 24, 2014 3:15 pm

Re: Volume was not properly unmounted ...

Wed Dec 24, 2014 3:22 pm

Hi all. I'm new to the pi and to Linux in general.

The instructions provided in this thread worked great, (don't get the error any more.)

But I was wondering now that I've "made" the new version of dosfstools is there a way to see the version number change via the command line? Both "apt-cache policy dosfstools" and aptitude report a version number of 3.0.13; I thought that the version from the git was newer, shouldn't the cache and aptitude reflect that?

andrum99
Posts: 815
Joined: Fri Jul 20, 2012 2:41 pm

Re: Volume was not properly unmounted ...

Sat Dec 27, 2014 10:46 pm

euchrideucrow wrote:Hi all. I'm new to the pi and to Linux in general.

The instructions provided in this thread worked great, (don't get the error any more.)

But I was wondering now that I've "made" the new version of dosfstools is there a way to see the version number change via the command line? Both "apt-cache policy dosfstools" and aptitude report a version number of 3.0.13; I thought that the version from the git was newer, shouldn't the cache and aptitude reflect that?
The packaging system does not know about the version of dosfstools that you have installed, since you did not install it using the packaging system. Normally you can pass a command a specific flag to get it to report its version number, but dosfsck does not seem to support this.

andrum99
Posts: 815
Joined: Fri Jul 20, 2012 2:41 pm

Re: Volume was not properly unmounted ...

Sat Dec 27, 2014 10:48 pm

The version of dosfstools included with raspbian appears to have been updated yesterday so that it includes the ability to clear the dirty flag. This means you only have to do the usual sudo apt-get update then sudo apt-get upgrade to get this fix, rather than the more complicated procedure detailed earlier in this thread.

alexellis
Posts: 53
Joined: Tue Nov 26, 2013 10:00 am
Location: United Kingdom
Contact: Website

Re: Volume was not properly unmounted ...

Sun Jan 11, 2015 8:01 pm

Can this process be automated on boot up? I have some headless Raspberry PIs running at another house and this means driving over there after each power cut.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Volume was not properly unmounted ...

Wed Jan 14, 2015 4:05 pm

This is really just an annoyance issue. It does not affect performance in any way. You can safely ignore the message. It is what I do.
Richard
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

zaadstra
Posts: 4
Joined: Wed Feb 04, 2015 10:30 pm

Re: Volume was not properly unmounted ...

Wed Feb 04, 2015 10:36 pm

The code from rpdom works, although with a few minor changes:

Code: Select all

    sudo apt-get install dosfstools
(which only needs to be done once, dosfstools_3.0.13-1+rpi1_armhf.deb is installed)

Then:

Code: Select all

    sudo umount /boot
    sudo fsck -V /dev/mmcblk0p1
       (reply to any messages - it usually says Leaving file system unchanged.)
    sudo fsck -p -V /dev/mmcblk0p1
       (so now use -p = automatic repair, which actually will fix it)
    sudo mount /boot
Done :D

BartmanEH
Posts: 9
Joined: Sun Jul 12, 2015 4:14 pm

Re: Volume was not properly unmounted ...

Wed Jul 15, 2015 1:57 pm

Just in case someone else has the same problem I had: I tried the full git clone procedure including a 'make install' step but was not able to clear the dirty bit with 'sudo ./fsck.fat -V /dev/mmcblk0p5' - I had to use 'sudo ./fsck.fat -a /dev/mmcblk0p5' on my NOOBs install and then 'sudo ./fsck.fat -V /dev/mmcblk0p5' showed the dirty bit as cleared.

hipstar
Posts: 2
Joined: Sun Jul 21, 2013 8:43 pm

Re: Volume was not properly unmounted ...

Sat Aug 15, 2015 9:54 pm

Thanks a lot!
This worked also for Arch Linux on my Raspberry Pi2 (armv7l):
$sudo pacman -Syu dosfstools
$sudo umount /boot
$sudo fsck -v /dev/mmcblk0p1
with option 1) Remove dirty bit

1080p_at_35b
Posts: 48
Joined: Fri Jun 22, 2012 6:07 pm

Re: Volume was not properly unmounted ...

Sun Oct 04, 2015 8:49 am

For those running OpenELEC 5.0.8 and who want to get rid of this innocuous but annoying error, thankfully we don't have to worry about git clones and compiling. Lucky that, since OpenELEC doesn't have git or APT available! Fsck is available by default:
# fsck
fsck from util-linux 2.25.2
Which appears to be documented here:

https://en.wikipedia.org/wiki/Util-linux

I was seeing messages like the following via dmesg:
[ 6.081014] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 6.307258] FAT-fs (mmcblk0p7): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
and mount said:
/dev/mmcblk0p1 on /var/media/RECOVERY type vfat (rw,nosuid,nodev,noexec,noatime,fmask=0133,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/mmcblk0p7 on /var/media/boot type vfat (rw,nosuid,nodev,noexec,noatime,fmask=0133,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
Using the following command (found within this thread):

Code: Select all

fsck.vfat -w -r -l -a -v -t /dev/mmcblk0p1
and then rebooting, seemed to solve the error :)

Best of luck to you.

standin000
Posts: 19
Joined: Wed Dec 03, 2014 5:34 am

Re: Volume was not properly unmounted ...

Tue Mar 15, 2016 3:36 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:

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: 800

Package: *
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

Got it, thanks!

Return to “Troubleshooting”