Something strange (don't ask) happened on my external hard-drive, resulting in (important) data being unreachable... I am failing to mount it. That data was sitting on a vfat filesystem.
I can get much of it with one tool, foremost. It sorts it into directories by file type, but I need the data intact in its original directory structure. Also, this tool gives the resulting files some random names, and is limited to a set number of file types.
It appears to me that the partition table is damaged (not sure), and I don't know how to fix it. Here's the output of gpart
for the whole drive:
# gpart -vd /dev/sdb
dev(/dev/sdb) mss(512) chs(121601/255/63)(LBA) #s(1953520065) size(953867mb)
Primary partition(1)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Primary partition(2)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Primary partition(3)
type: 131(0x83)(Linux ext2 filesystem)
size: 947827mb #s(1941150015) s(12370050-1953520064)
chs: (770/0/1)-(1023/254/63)d (770/0/1)-(121600/254/63)r
hex: 00 00 C1 02 83 FE FF FF 82 C0 BC 00 3F 99 B3 73
Primary partition(4)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
The one parition I'm interested in is one that's claimed to be Linux ext2 filesystem. That can't be accurate from my knowledge (it was vfat, but it could also have been NTFS, who knows). It also, that can't be accurate, according to another output of gpart
(should I trust it?), this time specifying just that partition:
# gpart -vd /dev/sdb3
dev(/dev/sdb3) mss(512) chs(120831/255/63)(LBA) #s(1941150015) size(947827mb)
* Warning: strange partition table magic 0x606B.
Primary partition(1)
type: 031(0x1F)(UNKNOWN)
size: 522639mb #s(1070366139) s(4182104394-5252470532)
chs: (961/156/44)-(97/173/28)d (260323/244/28)-(59601/209/5)r
hex: F7 9C EC C1 1F AD 1C 61 4A D9 45 F9 BB 7D CC 3F
Primary partition(2)
type: 249(0xF9)(UNKNOWN)
size: 47812mb #s(97919955) s(4081875516-4179795470)
chs: (993/11/62)-(249/64/22)d (254084/254/55)-(260180/59/54)r
hex: D4 0B FE E1 F9 40 16 F9 3C 7A 4C F3 D3 23 D6 05
Primary partition(3)
type: 211(0xD3)(UNKNOWN)
size: 711401mb #s(1456950127) s(4249722057-5706672183)
chs: (671/191/48)-(644/231/52)d (264532/245/43)-(87874/144/6)r
hex: 63 BF B0 9F D3 E7 B4 84 C9 9C 4D FD 6F 4B D7 56
Primary partition(4)
type: 089(0x59)(UNKNOWN)
size: 715318mb #s(1464971513) s(1293543745-2758515257)
chs: (1003/227/11)-(789/19/55)d (80519/95/26)-(171709/161/30)r
hex: 43 E3 CB EB 59 13 F7 15 41 E9 19 4D F9 B0 51 57