How to repair a corrupted FAT32 file system

Posted on Monday, 16 of January of 2017
1245by Octávio Gonçalveslinuxwindowscommand line

The following steps, in this article, can work in most cases, but it depends how the Filesystem is damaged.
The results are not guarantee.
So, if you want to follow this steps, you are the only responsable for the result, data loss, or an unrecovable Filesystem, media, disk, usb flash drive, etc. 
In the bottom of line, you are by your own.
I allways advise that: Recovering data loss ... consult a specialist.

Recover Fat32 FileSystem with Dosfsck:
We'll use Dosfsck, which is a component of dosfstools.

For this, type in terminal:

sudo apt-get install dosfstools

To use Dosfsck, you have to indicate the device address you want (Ex. /dev/sdb1, /dev/sdb2, or other device.).

To know your device address, open the terminal (CTRL+ALT+T), then run this command:


If your partition is /dev/sdb1, for example, then unmount it first by running this command:

sudo umount /dev/sdb1

Now you can verify and repair your partition by running this command:

sudo dosfsck -t -a -w /dev/sdb1


if you receive the following error, when your USB flash drive is not recognized:

Error: Buffer I/O error on device sdb1

Run this command:


If the output is:

end_request: I/O error, dev sdb1, sector 0Buffer I/O error on device sdb1, logical block 0

Run this command:

sudo dosfsck -t -a /dev/sdb1

Of course, you must change the device address to your needs, like i wrote above.

Share or save this article