A while ago, I wrote an image on a USB drive using something along these lines:
dd bs=4M if=/path/to/image.iso of=/dev/sdb && sync
Something must have gone terribly wrong there because after using the drive once or twice, Ubuntu didn't automount it anymore. So, I decided to overwrite the partition table first, since the image partition table is not a standard table. So I did:
dd count=1 bs=512 if=/dev/zero of=/dev/sdb && sync
After that, Ubuntu suddenly mounted the drive again and I could actually access the image. This is funny, since I basicaly erased the partition table. So, I tried:
cfdisk /dev/sdb
However, cfdisk
shouted FATAL ERROR: cannot open disk drive
. So, I tried gparted and created a new partition table. Now, the drive is automounted but I was suspicious of the whole thing, so I tried fsck.msdos
and this is the very unsettling message I got:
prompt@prompt:~$fsck.msdos /dev/sdb
dosfck 3.0.12, 29 Oct 2011, FAT32, LFN,
Currently, only 1 or 2 FATs are supported, not 251.
However, if I check the partition table with fdisk
I get no error messages, nothing, just a clean table with one partition:
Disk /dev/sdb: 4004 MB, 4004511744 bytes
218 heads, 51 sectors/track, 703 cylinders, total 7821312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00095e47
Device Boot Start End Blocks Id System
/dev/sdb1 2048 7821311 3909632 b W95 FAT32
So, the only option I see now is zeroing out the first sector which is how all this started in the first place. I'm going to try zeroing the complete device and report back with results. Don't hesitate to give me other suggestions though.
fsck.msdos
instead offsck.vfat
? msdos is FAT12 and you want FAT32. If the drive is currently working, I don't see what the problem is.