Windows 7 ate my usb flash drive

Hi,

I had a USB flash drive that was working perfectly well with my openSUSE 11.3 laptop and my openSUSE 11.1 work desktop. That was until I was copying some files onto a friends Windows 7 laptop when it detected some errors and “fixed” them. Now when I plug the flash drive into my laptop I can read files but I can’t write or erase. The mount output looks sane

/dev/sdb on /media/REMOVABLE type vfat (rw,nosuid,nodev,uid=1000,utf8,shortname=mixed,flush)

But it looks like the file system is mounted read only

rm: cannot remove `FILE': Read-only file system

I can probably copy the files and re-format the drive but I was wondering there was a less drastic alternative and any thoughts on what happened in the first place.

Did you unmount the drive after using it with Win7?

I believe I unmounted correctly but sometimes with Windows it’s hard to tell. According to fsck there are errors but I can’t seem to correct them.

:~> sudo /sbin/fsck /dev/sdb
fsck from util-linux-ng 2.17.2
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
? 1
FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT
? 1
/FOUND.000
  Contains a free cluster (649). Assuming EOF.
Reclaimed 6171 unused clusters (25276416 bytes).
Free cluster summary wrong (937168 vs. really 943339)
1) Correct
2) Don't correct
? 1
Leaving file system unchanged.
/dev/sdb: 40 files, 41238/984577 clusters

Answering my own question you need to tell fsck to actually try and repair the problems otherwise it just reports them.

sudo /sbin/fsck -r /dev/sdb