both File Allocation Tables corrupted in FAT32 partition
I am trying to fix the harddisk of a friend and I am at a loss. The disk is:
root@liv-laptop:/home/liv/Build/ppa/midori# fdisk -l
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5b6ac646
Device Boot Start End Blocks Id System
/dev/sdb1 1 38913 312568641 c W95 FAT32 (LBA)
The issue seems to have arrived when my friend plugged out the disk without 'Removing it safely' first. Now plugging it into Windows doesn't work: trying to access H:/ asks to reformat the drive. Scandisk seems not installed on this system. I have tried:
chkdsk h: /f
but it fails with (rough translation from French):
The type of the file system is FAT32.
Error while reading the file allocation table (FAT 1).
Error while reading the file allocation table (FAT 2).
There is no readable file allocation table (FAT).
So, as far as I understand FAT32 has two copies of the FAT, and both are corrupted. When trying 'fsck' on Linux it fails:
root@liv-laptop:/home/liv/Build/ppa/midori# fsck.vfat /dev/sdb
dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN
Logical sector size (64543 bytes) is not a multiple of the physical sector size.
HOWEVER, the strange part is that plugging the disk on Ubuntu Linux initially takes a lot of time, but subsequently allows to browse the directories on the partition. It also allows to copy _some_ files, but for others Thunar fails to copy with either 'bad sector' or 'invalid address' or 'file input/output' errors. So at this point I'm stuck.
Next I'd like to use 'testdisk' to repair the damned table but I'm not sure how to proceed. I found  but I'm not sure I understand it properly. Specifically, what does this mean: "This function must only be used on FAT filesystems with correct values in the boot sector."? How can I check that the FAT FS has correct values in the boot sector?
Moreover, "the menu Repair FAT will have TestDisk compare the two FAT copies. If the FATs mismatch (sector by sector check) or contains errors, TestDisk uses the FAT copy with less errors and removes the obvious errors. " Does this procedure put the data to risk? (Not that they're particularly available right now..) In other words, is it safe, or should I try something more conservative first?
If these last two questions are put to rest, what is the exact procedure that I should use in the 'testdisk' interface? Is it documented somewhere?