I have been trying to recover my usb flash drive and have been looking into this question
I can not write data or anything into my drive it just gives me the error Input/output error So I tried
sudo dosfsck -t -a -w /dev/sdb1
and result was like this
fsck.fat 4.1 (2017-01-24) 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. There are differences between boot sector and its backup. This is mostly harmless. Differences: (offset:original/backup) 67:a5/6a, 68:ea/9d, 69:23/81, 70:54/7c Not automatically fixing this. /.Trash-1000 Contains a free cluster (1002). Assuming EOF.
After this it gives error of each file in the drive like this
Cluster 3 (50031) is unreadable. Skipping it. /FRIENDS/Copy of DSC00146.JPG
and then at the end it gives me this
Cluster 0 (52685) is unreadable. Skipping it. Write 4 bytes at 8024884:Input/output error
I couldn't recover my drive. I am asking here after trying my best. Please help me. Thanks
Note : I am using ubuntu 17.10