recovering partition table after dd'ing over it Topic is solved

How to use TestDisk to recover lost partition
Locked
Message
Author
carandraug
Posts: 5
Joined: 05 Aug 2012, 05:23

recovering partition table after dd'ing over it

#1 Post by carandraug » 05 Aug 2012, 16:16

Hi

by accident I used dd to write over the first 208MB of my external disk. The whole disk is 320GB and should be a single ext4 partition. However, it's all gone now, there's a 208MB parttion at the start and the rest shows up as free space. The data is still there, I could keep playing the songs for example (and it was not just the buffer, I could change songs), it's only the partition table that is gone (and the first 206MB of data that I overwrote).

So I'm trying to use TestDisk to recover it. I get a few warnings about the geometry but I'm not sure if I'm doing it right. I was reading the wiki about the geometry but there was one part that I didn't understand. How does lowering the number of heads increases the limit. Shouldn't it decrease? 1023*16*63 would be less than 1023*255*63.

The warning says "Warning: the current number of heads per cylinder is 64 but the correct value may be 255." and after a Deep search, I get another "The harddisk (319 GB / 297 GiB) seems too small! (< 1726 GB / 1608 GiB)". Where the pair of numbers comes from? I understand that 319 and 1726 may be the expected size for the CHS values, but where do the 297 and 1608 come from?

I have pasted the whole log at http://pastebin.com/Km96uhvs since it's quite long. I have then tried to changed the geometry for 255 and then for 16 as well but the results are very similar:

Code: Select all

Results
   L Linux                    0   1 32 76440 254 32  623758497 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

   L Linux                    0   1 32 76440 254 32  623758497 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Can't open filesystem. Filesystem seems damaged.

interface_write()
 1 E extended LBA             0   1  1 76440 254 32  623758528
 5 L Linux                    0   1 32 76440 254 32  623758497 [My passport]

Code: Select all

Results
   L Linux                    0   1 32 304568  63 32  623757249 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

   L Linux                    0   1 32 304568  63 32  623757249 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Can't open filesystem. Filesystem seems damaged.

interface_write()
 1 E extended LBA             0   1  1 304568  63 32  623757280
 5 L Linux                    0   1 32 304568  63 32  623757249 [My passport]
It sees an extended LBA partition at the start and then a logic EXT4 partition. I could sware it was just a primary EXT4 partition from one side to the other. When I try to list files, it says that the filesystem is damaged. I don't know how to proceed anymore. Anyone could give me some advice?

I apologize if I sound too cautious, but it's my last 3 years of data, for my PhD, that are in there.

Sponsored links

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: recovering partition table after dd'ing over it

#2 Post by Fiona » 06 Aug 2012, 08:15

The data is still there, I could keep playing the songs for example (and it was not just the buffer, I could change songs), it's only the partition table that is gone (and the first 206MB of data that I overwrote).
Are you able to list your files?
Your geometry doesn't fit at the moment.
The value 32 is wrong.
Because your partition is not intel standard, testdisk recognizes it as logical partition.
If you check that partition, you can use your left or right arrow key to set it to P for primary.
But first of all, I'd like to know, how did you get access to your data?

If you copy content, please copy the whole display so that I get info from your disk also.

Fiona

carandraug
Posts: 5
Joined: 05 Aug 2012, 05:23

Re: recovering partition table after dd'ing over it  Topic is solved

#3 Post by carandraug » 08 Aug 2012, 01:56

Fiona wrote:
The data is still there, I could keep playing the songs for example (and it was not just the buffer, I could change songs), it's only the partition table that is gone (and the first 206MB of data that I overwrote).
Are you able to list your files?
What I meant was that when I dd'ed over the disk, Rhytmbox keept on playing the songs. This lasted for a while until I noticed my mistake. Then I changed to some other song on the library (not just the next, another song on the library that hadn't played before so it couldn't be on the buffer) and it still played. So the data for the songs is still there so I'm hoping that my data is too (I don't care much for the music compared to my work).
Fiona wrote: Your geometry doesn't fit at the moment.
The value 32 is wrong.
Because your partition is not intel standard, testdisk recognizes it as logical partition.
Which one should I have selected then?
Fiona wrote: If you check that partition, you can use your left or right arrow key to set it to P for primary.
Ok. I'll try this. I got another Hard Drive that is exactly the same as mine. I dd'ed my "damaged" to it so I could try this while leaving the originally damaged intact. I left it at the lab since it was taking a long time but will try this tomorrow
Fiona wrote: If you copy content, please copy the whole display so that I get info from your disk also.
I did. I just used pastebin because I thought that would make things simpler. But here it is:

Code: Select all


Sun Aug  5 05:27:09 2012
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-3-amd64 (#1 SMP Thu Jun 28 09:07:26 UTC 2012) x86_64
Compiler: GCC 4.6
Compilation date: 2012-01-17T14:04:23
ext2fs lib: 1.42.4, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       312500000 sectors
/dev/sda: user_max   312500000 sectors
/dev/sda: native_max 312500000 sectors
/dev/sda: dco        312500000 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 160 GB / 149 GiB - CHS 19452 255 63, sector size=512 - WDC WD1600JS-75NCB1, S/N:WD-WCANM1942739, FW:10.02E01
Disk /dev/sdb - 319 GB / 297 GiB - CHS 304575 64 32, sector size=512 - WD My Passport 070A, FW:1032
Disk /dev/sr1 - 700 MB / 668 MiB - CHS 342016 1 1 (RO), sector size=2048 - WD Virtual CD 070A, FW:1032

Partition table type (auto): Intel
Disk /dev/sdb - 319 GB / 297 GiB - WD My Passport 070A
Partition table type: Intel

Analyse Disk /dev/sdb - 319 GB / 297 GiB - CHS 304575 64 32
Geometry from i386 MBR: head=64 sector=32
check_part_i386 failed for partition type 17
Current partition structure:
Invalid NTFS or EXFAT boot
 1 * hid. HPFS/NTFS           0   2  1   197  63 32     405440
 1 * hid. HPFS/NTFS           0   2  1   197  63 32     405440
Ask the user for vista mode
Allow partial last cylinder : No
search_vista_part: 0

search_part()
Disk /dev/sdb - 319 GB / 297 GiB - CHS 304575 64 32

recover_EXT2: s_block_group_nr=0/2379, s_mnt_count=275/32, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 77969461
recover_EXT2: part_size 623755688
     Linux                    0   1 32 304568  15  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Warning: the current number of heads per cylinder is 64 but the correct value may be 255.

Results
   L Linux                    0   1 32 304568  63 32  623757249 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

   L Linux                    0   1 32 304568  63 32  623757249 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Can't open filesystem. Filesystem seems damaged.

interface_write()
 1 E extended LBA             0   1  1 304568  63 32  623757280
 5 L Linux                    0   1 32 304568  63 32  623757249 [My passport]

search_part()
Disk /dev/sdb - 319 GB / 297 GiB - CHS 304575 64 32

recover_EXT2: s_block_group_nr=0/2379, s_mnt_count=275/32, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 77969461
recover_EXT2: part_size 623755688
     Linux                    0   1 32 304568  15  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
BAD_RS LBA=602403508 489476
check_part_i386 failed for partition type 04
     FAT16 <32M           294142  21 21 1646788  30  9 2770219285
This partition ends after the disk limits. (start=602403508, size=2770219285, end=3372622792, disk end=623769600)

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=3/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                215630   2  1 223421   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=3/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216323   1  1 224114   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=3/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216370   2  1 224161   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=3/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216379   2  1 224170   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216535   0  1 224325  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216628   0  1 224418  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216743   0  1 224533  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216744   0  1 224534  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216773   2  1 224564   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216780   2  1 224571   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216781   2  1 224572   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216838   0  1 224628  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216842   1  1 224633   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216843   1  1 224634   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216844   1  1 224635   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                216863   2  1 224654   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                217086   2  1 224877   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                217306   0  1 225096  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                217318   2  1 225109   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                217319   0  1 225109  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                217400   2  1 225191   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                218931   0  1 226721  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219096   0  1 226886  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219129   2  1 226920   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219132   2  1 226923   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219577   0  1 227367  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=2/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219598   0  1 227388  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=10/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219693   1  1 227484   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=10/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219701   0  1 227491  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219704   2  1 227495   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219776   1  1 227567   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219823   1  1 227614   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219824   0  1 227614  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219824   1  1 227615   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219824   2  1 227615   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219826   1  1 227617   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219892   0  1 227682  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                219895   2  1 227686   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=9/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                220248   1  1 228039   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                220440   1  1 228231   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                220643   0  1 228433  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                220664   2  1 228455   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                220764   2  1 228555   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                220836   1  1 228627   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221020   2  1 228811   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221021   0  1 228811  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221022   0  1 228812  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221026   0  1 228816  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221150   0  1 228940  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221355   2  1 229146   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221407   1  1 229198   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                221451   0  1 229241  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=7/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222406   0  1 230196  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=7/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222428   1  1 230219   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=7/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222447   2  1 230238   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=7/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222569   1  1 230360   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=7/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222598   0  1 230388  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=7/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222602   2  1 230393   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222649   0  1 230439  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222795   1  1 230586   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222801   1  1 230592   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=6/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222888   0  1 230678  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=6/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222901   2  1 230692   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=6/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                222970   0  1 230760  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                223171   2  1 230962   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                223176   1  1 230967   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                223179   0  1 230969  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                223193   2  1 230984   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=5/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                223205   0  1 230995  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                286716   2  1 294507   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

recover_EXT2: s_block_group_nr=0/60, s_mnt_count=4/28, s_blocks_per_group=32768, s_inodes_per_group=8176
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1994496
recover_EXT2: part_size 15955968
     Linux                287304   0  1 295094  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
Disk /dev/sdb - 319 GB / 297 GiB - CHS 304575 64 32
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (319 GB / 297 GiB) seems too small! (< 1726 GB / 1608 GiB)
The following partition can't be recovered:
     FAT16 <32M           294142  21 21 1646788  30  9 2770219285
get_geometry_from_list_part_aux head=64 nbr=74
get_geometry_from_list_part_aux head=8 nbr=74
get_geometry_from_list_part_aux head=16 nbr=74
get_geometry_from_list_part_aux head=32 nbr=74
get_geometry_from_list_part_aux head=64 nbr=74
get_geometry_from_list_part_aux head=128 nbr=26
get_geometry_from_list_part_aux head=240 nbr=2

Results
     Linux                    0   1 32 304568  15  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
     Linux                215630   2  1 223421   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216323   1  1 224114   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216370   2  1 224161   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216379   2  1 224170   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216535   0  1 224325  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216628   0  1 224418  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216743   0  1 224533  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216744   0  1 224534  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216773   2  1 224564   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216780   2  1 224571   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216781   2  1 224572   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216838   0  1 224628  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216842   1  1 224633   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216843   1  1 224634   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216844   1  1 224635   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                216863   2  1 224654   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                217086   2  1 224877   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                217306   0  1 225096  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                217318   2  1 225109   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                217319   0  1 225109  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                217400   2  1 225191   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                218931   0  1 226721  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219096   0  1 226886  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219129   2  1 226920   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219132   2  1 226923   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219577   0  1 227367  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219598   0  1 227388  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219693   1  1 227484   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219701   0  1 227491  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219704   2  1 227495   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219776   1  1 227567   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219823   1  1 227614   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219824   0  1 227614  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219824   1  1 227615   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219824   2  1 227615   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219826   1  1 227617   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219892   0  1 227682  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                219895   2  1 227686   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                220248   1  1 228039   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                220440   1  1 228231   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                220643   0  1 228433  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                220664   2  1 228455   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                220764   2  1 228555   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                220836   1  1 228627   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221020   2  1 228811   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221021   0  1 228811  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221022   0  1 228812  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221026   0  1 228816  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221150   0  1 228940  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221355   2  1 229146   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221407   1  1 229198   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                221451   0  1 229241  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222406   0  1 230196  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222428   1  1 230219   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222447   2  1 230238   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222569   1  1 230360   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222598   0  1 230388  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222602   2  1 230393   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222649   0  1 230439  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222795   1  1 230586   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222801   1  1 230592   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222888   0  1 230678  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222901   2  1 230692   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                222970   0  1 230760  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                223171   2  1 230962   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                223176   1  1 230967   0 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                223179   0  1 230969  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                223193   2  1 230984   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                223205   0  1 230995  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                286716   2  1 294507   1 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
     Linux                287304   0  1 295094  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB

     Linux                    0   1 32 304568  15  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Can't open filesystem. Filesystem seems damaged.

     Linux                216838   0  1 224628  63 32   15955968
     EXT4 Large file Sparse superblock Recover, 8169 MB / 7791 MiB
Can't open filesystem. Filesystem seems damaged.

     Linux                    0   1 32 304568  15  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Can't open filesystem. Filesystem seems damaged.

interface_write()
 
No partition found or selected for recovery
simulate write!

write_mbr_i386: starting...
write_all_log_i386: starting...
No extended partition

TestDisk exited normally.

carandraug
Posts: 5
Joined: 05 Aug 2012, 05:23

Re: recovering partition table after dd'ing over it

#4 Post by carandraug » 08 Aug 2012, 12:28

carandraug wrote:
Fiona wrote: If you check that partition, you can use your left or right arrow key to set it to P for primary.
Ok. I'll try this. I got another Hard Drive that is exactly the same as mine. I dd'ed my "damaged" to it so I could try this while leaving the originally damaged intact. I left it at the lab since it was taking a long time but will try this tomorrow
So I have done this but didn't work. I changed the geometry to have 255 heads so it didn't complain about wrong size. I then changed the type of the partition to primary and wrote the partition table. Here's the complete log of testdisk

Code: Select all



Wed Aug  8 11:47:05 2012
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-3-amd64 (#1 SMP Thu Jun 28 09:07:26 UTC 2012) x86_64
Compiler: GCC 4.6
Compilation date: 2012-01-17T14:04:23
ext2fs lib: 1.42.4, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       312500000 sectors
/dev/sda: user_max   312500000 sectors
/dev/sda: native_max 312500000 sectors
/dev/sda: dco        312500000 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 160 GB / 149 GiB - CHS 19452 255 63, sector size=512 - WDC WD1600JS-75NCB1, S/N:WD-WCANM1942739, FW:10.02E01
Disk /dev/sdb - 319 GB / 297 GiB - CHS 304575 64 32, sector size=512 - WD My Passport 070A, FW:1032
Disk /dev/sr1 - 700 MB / 668 MiB - CHS 342016 1 1 (RO), sector size=2048 - WD Virtual CD 070A, FW:1032

Partition table type (auto): Intel
Disk /dev/sdb - 319 GB / 297 GiB - WD My Passport 070A
Partition table type: Intel
New geometry
Disk /dev/sdb - 319 GB / 297 GiB - CHS 76443 255 32 sector_size=512

Analyse Disk /dev/sdb - 319 GB / 297 GiB - CHS 76443 255 32
Geometry from i386 MBR: head=64 sector=32
check_part_i386 failed for partition type 17
Current partition structure:
Invalid NTFS or EXFAT boot
 1 * hid. HPFS/NTFS           0   2  1    49 176 32     405440
 1 * hid. HPFS/NTFS           0   2  1    49 176 32     405440

Bad sector count.
Ask the user for vista mode
Allow partial last cylinder : No
search_vista_part: 0

search_part()
Disk /dev/sdb - 319 GB / 297 GiB - CHS 76443 255 32

recover_EXT2: s_block_group_nr=0/2379, s_mnt_count=275/32, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 77969461
recover_EXT2: part_size 623755688
     Linux                    0   1 32 76440 167  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

Results
   L Linux                    0   1 32 76440 254 32  623758497 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

   L Linux                    0   1 32 76440 254 32  623758497 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB
Can't open filesystem. Filesystem seems damaged.
Change partition type:
   L Linux                    0   1 32 76440 254 32  623758497 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

interface_write()
 1 E extended LBA             0   1  1 76440 254 32  623758528
 5 L Linux                    0   1 32 76440 254 32  623758497 [My passport]
simulate write!

write_mbr_i386: starting...
write_all_log_i386: starting...
write_all_log_i386: CHS: 0/1/1,lba=32

Analyse Disk /dev/sdb - 319 GB / 297 GiB - CHS 76443 255 32
Geometry from i386 MBR: head=64 sector=32
check_part_i386 failed for partition type 17
Current partition structure:
Invalid NTFS or EXFAT boot
 1 * hid. HPFS/NTFS           0   2  1    49 176 32     405440
 1 * hid. HPFS/NTFS           0   2  1    49 176 32     405440

Bad sector count.
Ask the user for vista mode
Allow partial last cylinder : No
search_vista_part: 0

search_part()
Disk /dev/sdb - 319 GB / 297 GiB - CHS 76443 255 32

recover_EXT2: s_block_group_nr=0/2379, s_mnt_count=275/32, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 77969461
recover_EXT2: part_size 623755688
     Linux                    0   1 32 76440 167  7  623755688 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

Results
   L Linux                    0   1 32 76440 254 32  623758497 [My passport]
     EXT4 Large file Sparse superblock Recover, 319 GB / 297 GiB

interface_write()
 1 P Linux                    0   1 32 76440 254 32  623758497 [My passport]
write!

write_mbr_i386: starting...
write_all_log_i386: starting...
No extended partition
You will have to reboot for the change to take effect.

TestDisk exited normally.
After this, the partition still failed to mount so I tried to run e2fsck to fix the problems but it wouldn't run on non-interactive mode:

Code: Select all

$ sudo e2fsck -C 0 -p /dev/sdb1
My_passport: Superblock has an invalid journal (inode 8).
CLEARED.
*** ext3 journal has been deleted - filesystem is now ext2 only ***

My_passport: One or more block group descriptor checksums are invalid.  FIXED.
My_passport: Group descriptor 0 checksum is 0x0000, should be 0xaddf.  

My_passport: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
	(i.e., without -a or -p options)
$ sudo e2fsck -C 0 -p /dev/sdb1
My_passport: Superblock has an invalid journal (inode 8).
CLEARED.
*** ext3 journal has been deleted - filesystem is now ext2 only ***

My_passport: One or more block group descriptor checksums are invalid.  FIXED.
My_passport: Group descriptor 0 checksum is 0x0000, should be 0xaddf.  

My_passport: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
	(i.e., without -a or -p options)
so I ran it manually but the list of errors was too long and never ending. Here's just some examples of the type of things reported:

Code: Select all

$ sudo e2fsck -C 0 /dev/sdb1
e2fsck 1.42.4 (12-Jun-2012)
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
e2fsck: Group descriptors look bad... trying backup blocks...
Block bitmap for group 16 is not in group.  (block 809779970)
Relocate<y>? yes
Inode table for group 16 is not in group.  (block 536879104)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate<y>? yes
One or more block group descriptor checksums are invalid.  Fix<y>? yes
Group descriptor 16 checksum is 0x551f, should be 0x9244.  FIXED.
Block bitmap for group 17 is not in group.  (block 536879104)
Relocate<y>? yes
Inode bitmap for group 17 is not in group.  (block 536879104)
Relocate<y>? yes
Inode table for group 17 is not in group.  (block 1694516224)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate<y>? yes
Group descriptor 17 checksum is 0x88c8, should be 0x585f.  FIXED.
Block bitmap for group 18 is not in group.  (block 755005696)
Relocate<y>? yes
Inode bitmap for group 18 is not in group.  (block 1224754176)
Relocate<y>? yes
Group descriptor 18 checksum is 0x13a8, should be 0xf0f5.  FIXED.
Inode table for group 20 is not in group.  (block 740294656)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate<y>? yes



Group 2279's inode bitmap at 6144 conflicts with some other fs block.
Relocate<y>? yes
Group 2280's block bitmap at 19159120 conflicts with some other fs block.
Relocate<y>? yes
Group 2280's inode bitmap at 16749 conflicts with some other fs block.
Relocate<y>? yes
Group 2281's inode bitmap at 18499156 conflicts with some other fs block.
Relocate<y>? yes
Group 2323's block bitmap at 3473504 conflicts with some other fs block.
Relocate<y>? yes
Group 2328's block bitmap at 16777216 conflicts with some other fs block.
Relocate<y>? yes
Group 2329's block bitmap at 787824 conflicts with some other fs block.
Relocate<y>? yes
Group 2331's inode bitmap at 16777217 conflicts with some other fs block.
Relocate<y>? yes
Group 2332's inode table at 16777216 conflicts with some other fs block.
Relocate<y>? yes


Inode 9101553 is in use, but has dtime set.  Fix<y>? yes                        %   
Inode 9101553 has a extra size (24306) which is invalid
Fix<y>? yes
Inode 9101553 has compression flag set on filesystem without compression support.  Clear<y>? yes
Inode 9101553 has INDEX_FL flag set but is not a directory.
Clear HTree index<y>? yes
Inode 9101553, i_size is 1898462117517233180, should be 0.  Fix<y>? yes
Inode 9101553, i_blocks is 154052328993084, should be 0.  Fix<y>? yes
Inode 9101554 is in use, but has dtime set.  Fix<y>? yes
Inode 9101554 has a extra size (24306) which is invalid
Fix<y>? yes
Inode 9101554 has compression flag set on filesystem without compression support.  Clear<y>? yes
Inode 9101554 has INDEX_FL flag set but is not a directory.
Clear HTree index<y>? yes
Inode 9101554, i_size is 1898462117517233180, should be 0.  Fix<y>? yes
Inode 9101554, i_blocks is 154052328993084, should be 0.  Fix<y>? yes
Inode 9101555 is in use, but has dtime set.  Fix<y>? yes
Inode 9101555 has a extra size (24306) which is invalid
Fix<y>? yes

Inode 9146892 has illegal block(s).  Clear<y>? yes
Illegal block #0 (758927150) in inode 9146892.  CLEARED.
Illegal block #1 (607946824) in inode 9146892.  CLEARED.
Illegal block #2 (585049220) in inode 9146892.  CLEARED.
Illegal block #3 (2234342310) in inode 9146892.  CLEARED.
Illegal block #4 (1388558946) in inode 9146892.  CLEARED.
Illegal block #5 (3008341540) in inode 9146892.  CLEARED.
Illegal block #6 (1810467284) in inode 9146892.  CLEARED.
Illegal block #7 (4106600328) in inode 9146892.  CLEARED.
Illegal block #9 (204711839) in inode 9146892.  CLEARED.
Illegal block #10 (2107481393) in inode 9146892.  CLEARED.
Illegal block #11 (2560354697) in inode 9146892.  CLEARED.
Too many illegal blocks in inode 9146892.

Inode 9147055 is in use, but has dtime set.  Fix<y>? yes
Inode 9147055 has imagic flag set.  Clear<y>? yes
Inode 9147055 has a extra size (27330) which is invalid
Fix<y>? yes
After half an hour of typing ''y'', I gave up and it still wouldn't mount. I'll copy the damaged disk again and try recovery again. Any suggestion of what to do now? Any tip is most welcome.

carandraug
Posts: 5
Joined: 05 Aug 2012, 05:23

Re: recovering partition table after dd'ing over it

#5 Post by carandraug » 16 Aug 2012, 03:08

Hi

I still haven't managed to solve my problem could anyone give me any tips? As I mentioned before, I'm making copies of the whole hard drive to another of the same model so I can always go back if the recovey doesn't work. I have tried the following:

1. make testdisk write a partition table of a single primary ext4 partition. The recovered partition is unmountable so I ran fsck and made it fix all errors. After filesystem was clean, it was mountable but it was completely empty with no files.

2. same as before but wrote the partition table guessed by testdisk (a single logical ext4 partition inside an extended partition). I had the same problem as before.

3. created a ext4 primary partition a disk with the same settings mine should have. Then I copied the first 200MB of that HD to the one that I'm trying to recover. It still appears as empty. Ran fsck on it and still nothing.

Anyone knows anything that could help me, please?

Thanks in advance

carandraug
Posts: 5
Joined: 05 Aug 2012, 05:23

Re: recovering partition table after dd'ing over it

#6 Post by carandraug » 01 Oct 2012, 09:00

I finally managed to fix this. Just for the record here's how I did it. Part of the solution I found at http://linuxexpresso.wordpress.com/2010 ... in-ubuntu/ and it involves knowing the settings used to create the filesystem (I was pretty sure I didn't change the defaults).

Basically I first had to fix the partition table to reflect what I actually had there (I used testdisk for this but parted, cfdisk or fdisk should work fine as well). I just removed the wrong partitions and replaced by a single ext4 type partition covering the whole disk with the correct CHS values.

The rest is mostly from the link at start (read it for details) but basically I ran

Code: Select all

mke2fs -n /dev/xxx
to find the positions for the superblocks backup. Then used the last backup closest to the end of the disk (only the ones at the start of the disk had been overwritten with dd) to run fsck. This generated a lof of errors but fsck has a -y option (not the same as -a).

Code: Select all

sudo e2fsck -b backup_block_number /dev/xxx
I thought this had not worked because I couldn't see any files but actually they had all been saved to the lost+found directory.

So in the end I did salvage most of my files while keeping their filenames and directory structure. Hope this may help others in the future.

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: recovering partition table after dd'ing over it

#7 Post by Fiona » 01 Oct 2012, 10:19

Thank you for your feedback.
I'll set your topic as solved.

Fiona

Locked

Who is online

Users browsing this forum: No registered users and 4 guests