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

how to fsck FAT-fs in raspbian[RESOLVED]

Sun Jan 25, 2015 3:19 am

Because raspberry shutdown suddenly sometime, it reports
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
I have to plug out SD card and put it into sd card reader with a PC for running fsck.

I tried fsck in raspbian with different parameter to fix this disk, but it failed.

Is there a software package can fix corrupt fat fs? thanks in advance.
Last edited by standin000 on Tue Mar 15, 2016 7:04 am, edited 1 time in total.

User avatar
rpdom
Posts: 16969
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: how to fsck FAT-fs in raspbian

Sun Jan 25, 2015 6:44 pm

The latest version (3.0.13-1+rpi1) of dosfstools in Raspbian should be able to fix it with fsck.vfat -r

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

Re: how to fsck FAT-fs in raspbian

Mon Jan 26, 2015 1:18 pm

rpdom wrote:The latest version (3.0.13-1+rpi1) of dosfstools in Raspbian should be able to fix it with fsck.vfat -r
after updating to 3.0.13-1+rpi1, it is OK now , thanks very much!

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: how to fsck FAT-fs in raspbian

Mon Feb 23, 2015 12:31 pm

rpdom wrote:The latest version (3.0.13-1+rpi1) of dosfstools in Raspbian should be able to fix it with fsck.vfat -r
My daughter power-cycled my Pi a couple times fairly rapidly via the outlet strip (wrong one of two!) and now I get the same error as noted in the first post of this thread. My Pi successfully boots and all seems well, but I think it's much better to not have a boot error...

Does dosfstools work on a mounted /boot right from a post-logn prompt?

[I =can= go to the trouble of creating a new SD card from an "old" image backup, use THAT to start up Raspbian, then use fsck with that to fix the boot of the unmounted primary SD card but, if dosfstools works as desired, it would be much faster]

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

Re: how to fsck FAT-fs in raspbian

Mon Feb 23, 2015 1:36 pm

Raspruss wrote:Does dosfstools work on a mounted /boot right from a post-logn prompt?
Do not run fsck on a filesystem while it is mounted read-write. Just unmount it first. Raspbian only actually needs /boot mounted during firmware updates etc.

Code: Select all

sudo apt-get update
sudo apt-get install dosfstools

sudo umount /boot
sudo fsck -a /boot
sudo mount /boot
Even this should not be necessary, though. Once you have dosfstools up to date, the init scripts will run fsck at the next boot.

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: how to fsck FAT-fs in raspbian

Mon Feb 23, 2015 2:23 pm

Cool, I'll be trying that soon - thanks.

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: how to fsck FAT-fs in raspbian

Mon Feb 23, 2015 2:59 pm

Thanks again, jojopi, that did indeed work fine and all is again well filesystem-wise...and I've shown my daughter which power strip is the one to use...

Return to “Beginners”