FSCK instructions for Rasperry Pi

It is trivially easy to shut your Pi down incorrectly and it still seems that this has not been addressed well in the Raspberian repository. Here is a summary of http://www.raspberrypi.org/forums/viewtopic.php?t=64843 which describes how to fix the dreaded:

FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.



problem
Unfortunately the stock dosfstools does not seem to fix the problem so you need to build a replacement:

   git clone http://daniel-baumann.ch/git/software/dosfstools.git
cd dosfstools
make


You can install these tools over the existing tools or use them where they are. Here is an example of the latter

   sudo bash
cd dosfstools
umount /boot
./fsck.fat -V /dev/mmcblk0p1

Select option (1) to “Remove dirty bit”

   ./fsck.fat -a /dev/mmcblk0p1
mount /boot