Here is what happened:I used the Laptop and accessed some data on my usb stick. Then I closed the Laptop putting the system into sleep mode. The USB-Stick was still plugged in. After the laptop was completely in sleep I removed the Stick (the light was off, so it must have been without power). I woke up the laptop today without the USB-Stick. Now when I re-plug it, the filesystem will not be mounted automatically. I tried to manually mount it:chi mnt # mount -t vfat /dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 usb/mount: wrong fs type, bad option, bad superblock on /dev/sdb1,       missing codepage or helper program, or other error       Manchmal liefert das Syslog wertvolle Informationen  versuchen       Sie  dmesg | tail  oder soDoing a dmesg | tail I found the following:FAT-fs (sdb1): bogus number of FAT structureFAT-fs (sdb1): Can't find a valid FAT filesystemSo I tried to do fsck.vfat on the partition of the stick, to see if it can somehow fix it:chi mnt # fsck.vfat /dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 dosfsck 3.0.9, 31 Jan 2010, FAT32, LFNCluster size is zero.Is there some way to repair the filesystem on the stick using linux tools? I am using gentoo.Also shouldn't this behavior be considered a bug or at least dangerous? Removing the stick while the system is in sleep mode sounds like a common use-case to me. Also if you remove it, it is very easy to forget to put it back in before you turn the system back on, and I don't think this should kill your file-system like this. I am willing to report this bug, but I don't know which mailing list/bugtracker would be the correct one.EDIT:I found some suggestions online. However if I try this using:dd if=/dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 of=sector6.bin bs=512 count=1 skip=6 conv=noerror,syncdd if=sector6.bin of=/dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 bs=512 count=1 conv=noerror,sync,notruncI still get the same error afterwards. I also tried using CHKDSK F: \R \T under windows as suggested by some posts, but this tool only reports the drive as RAW and thus unsuported.
How to restore a Fat32 filesystem under Linux
filesystems;mount;usb drive;data recovery;hibernate
Before you do anything to the USB-stick, you should make an image of it:dd bs=4k of=stick.img if=/dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0Then you put your stick safely away and use the stick.img file to do your fiddling, instead of destroying more data.Are there important files on it? Check http://www.cgsecurity.org/wiki/PhotoRec for recovery tools. It recovers more than just photo's unlike the name suggests.Once you have recovered you data, create a new filesystem on the USB-stick as the old can no longer be trusted with your data. (mkfs.vfat)