Need help with recovering a partition

How to use TestDisk to recover lost partition
Post Reply
Message
Author
Gonzo
Posts: 2
Joined: 08 Jan 2016, 14:43

Need help with recovering a partition

#1 Post by Gonzo » 08 Jan 2016, 18:39

Hello everyone! I'm a beginner with testdisk and need a little help with recovering my lost partition.
I was installing Ubuntu 15.10 and i wanted to use my existing luks-encrypted partition as /home. I activated encrypted volume, set mapped device to 'use as ext4...' and mount under /home, and of course not to format. After approving changes installer crashed and ended installation messing something with partition table. I googled how to use testdisk and thats what I got:

When selecting Intel partition table type (like it was before) analyse doesn't show any partition table and the quicksearch finds a bunch of FAT and NTFS partitions with some 'files' made of random characters. Here's logfile

Code: Select all

Fri Jan  8 10:39:21 2016
Command line: TestDisk

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.19.0-15-generic (#15-Ubuntu SMP Thu Apr 16 23:32:01 UTC 2015) i686
Compiler: GCC 4.9
Compilation date: 2015-04-03T09:01:56
ext2fs lib: 1.42.12, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       234490943 sectors
/dev/sda: user_max   234490943 sectors
/dev/sda: native_max 234493056 sectors
/dev/sda: dco        234493056 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       976771055 sectors
/dev/sdb: user_max   976771055 sectors
/dev/sdb: native_max 976773168 sectors
/dev/sdb: dco        976773168 sectors
/dev/sdc: LBA, HPA, LBA48, DCO support
/dev/sdc: size       3907029168 sectors
/dev/sdc: user_max   3907029168 sectors
/dev/sdc: native_max 3907029168 sectors
/dev/sdc: dco        3907029168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 1 sectors, sector size=512
/dev/sr0 is not an ATA disk
Hard disk list
Disk /dev/sda - 120 GB / 111 GiB - CHS 14596 255 63, sector size=512 - SAMSUNG SP1213C, S/N:S02AJ10Y113436, FW:SV100-34
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - HDS725050KLA360, S/N:KRVN65ZAJMMLRF, FW:K2AOAD1A
Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - ST2000DM001-1CH164, S/N:Z340PWET, FW:CC29
Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors, sector size=512
Disk /dev/sr0 - 729 MB / 696 MiB - 356352 sectors (RO), sector size=2048 - GCR-8523B, FW:1.00
Disk /dev/dm-0 - 500 GB / 465 GiB - 976762880 sectors, sector size=512

Partition table type (auto): None
Disk /dev/mapper/sejf - 500 GB / 465 GiB
Partition table type: Intel

Analyse Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors
Current partition structure:

Partition sector doesn't have the endmark 0xAA55

search_part()
Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors

block_group_nr 1

recover_EXT2: part_offset problem

block_group_nr 1

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=1/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.

block_group_nr 3

recover_EXT2: part_offset problem

block_group_nr 3

recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=3/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.

block_group_nr 5

recover_EXT2: part_offset problem

block_group_nr 5

recover_EXT2: "e2fsck -b 163840 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=5/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.

block_group_nr 7

recover_EXT2: part_offset problem

block_group_nr 7

recover_EXT2: "e2fsck -b 229376 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=7/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.

block_group_nr 9

recover_EXT2: part_offset problem

block_group_nr 9

recover_EXT2: "e2fsck -b 294912 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=9/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.

block_group_nr 25

recover_EXT2: part_offset problem

block_group_nr 25

recover_EXT2: "e2fsck -b 819200 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=25/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.

block_group_nr 27

recover_EXT2: part_offset problem

block_group_nr 27

recover_EXT2: "e2fsck -b 884736 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=27/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.
BAD_RS LBA=105774612 550
check_part_i386 failed for partition type 01
     FAT12                  105774612 3306160149 3200385538
This partition ends after the disk limits. (start=105774612, size=3200385538, end=3306160149, disk end=976762880)
BAD_RS LBA=3541669149 1027
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA             3541669149 7170565750 3628896602
This partition ends after the disk limits. (start=3541669149, size=3628896602, end=2875598454, disk end=976762880)
BAD_RS LBA=2383693206 332
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            2383693206 5105223869 2721530664
This partition ends after the disk limits. (start=2383693206, size=2721530664, end=810256573, disk end=976762880)
BAD_RS LBA=3889834453 1027
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            3889834453 4004128021  114293569
This partition ends after the disk limits. (start=3889834453, size=114293569, end=4004128021, disk end=976762880)
BAD_RS LBA=1251110765 923
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            1251110765 5150083202 3898972438
This partition ends after the disk limits. (start=1251110765, size=3898972438, end=855115906, disk end=976762880)

block_group_nr 49

recover_EXT2: part_offset problem

block_group_nr 49

recover_EXT2: "e2fsck -b 1605632 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=49/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.
BAD_RS LBA=564398619 640
check_part_i386 failed for partition type 01
     FAT12                  564398619 1811201104 1246802486
This partition ends after the disk limits. (start=564398619, size=1246802486, end=1811201104, disk end=976762880)
BAD_RS LBA=1103837831 250
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA             1103837831 4502338453 3398500623
This partition ends after the disk limits. (start=1103837831, size=3398500623, end=207371157, disk end=976762880)
BAD_RS LBA=1725146942 334
check_part_i386 failed for partition type 07
     HPFS - NTFS           1725146942 4794054566 3068907625
This partition ends after the disk limits. (start=1725146942, size=3068907625, end=499087270, disk end=976762880)
BAD_RS LBA=4271271889 1163
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            4271271889 4716971893  445700005
This partition ends after the disk limits. (start=4271271889, size=445700005, end=422004597, disk end=976762880)
BAD_RS LBA=1951290925 396
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 1951290925 3991799773 2040508849
This partition ends after the disk limits. (start=1951290925, size=2040508849, end=3991799773, disk end=976762880)
BAD_RS LBA=3758318374 522
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 3758318374 3983168192  224849819
This partition ends after the disk limits. (start=3758318374, size=224849819, end=3983168192, disk end=976762880)

block_group_nr 81

recover_EXT2: part_offset problem

block_group_nr 81

recover_EXT2: "e2fsck -b 2654208 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=81/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.
BAD_RS LBA=1385760642 1161
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 04
     FAT16 <32M            1385760642 1542554290  156793649
This partition ends after the disk limits. (start=1385760642, size=156793649, end=1542554290, disk end=976762880)
BAD_RS LBA=1146847928 112
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 1146847928 1990696128  843848201
This partition ends after the disk limits. (start=1146847928, size=843848201, end=1990696128, disk end=976762880)
BAD_RS LBA=895642502 338
check_part_i386 failed for partition type 01
     FAT12                  895642502 3181413127 2285770626
This partition ends after the disk limits. (start=895642502, size=2285770626, end=3181413127, disk end=976762880)

block_group_nr 125

recover_EXT2: part_offset problem

block_group_nr 125

recover_EXT2: "e2fsck -b 4096000 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=125/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     Linux                          0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
Partition not added.
BAD_RS LBA=1473623938 484
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 04
     FAT16 <32M            1473623938 5296133852 3822509915
This partition ends after the disk limits. (start=1473623938, size=3822509915, end=1001166556, disk end=976762880)
BAD_RS LBA=1485074010 397
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 1485074010 1706532601  221458592
This partition ends after the disk limits. (start=1485074010, size=221458592, end=1706532601, disk end=976762880)
BAD_RS LBA=48809146 993
check_part_i386 failed for partition type 0E
     FAT16 LBA               48809146  874090643  825281498
BAD_RS LBA=4269127312 445
check_part_i386 failed for partition type 07
     HPFS - NTFS           4269127312 8042097481 3772970170
This partition ends after the disk limits. (start=4269127312, size=3772970170, end=3747130185, disk end=976762880)
BAD_RS LBA=2636759912 1220
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 04
     FAT16 <32M            2636759912 4113908184 1477148273
This partition ends after the disk limits. (start=2636759912, size=1477148273, end=4113908184, disk end=976762880)
BAD_RS LBA=270934130 1039
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             4565901426 5749224824 1183323399
This partition ends after the disk limits. (start=270934130, size=1183323399, end=1454257528, disk end=976762880)
BAD_RS LBA=2495808880 1264
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 2495808880 2745317033  249508154
This partition ends after the disk limits. (start=2495808880, size=249508154, end=2745317033, disk end=976762880)
BAD_RS LBA=3867257236 1038
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            3867257236 4970573082 1103315847
This partition ends after the disk limits. (start=3867257236, size=1103315847, end=675605786, disk end=976762880)
BAD_RS LBA=3784403913 748
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            3784403913 4983620463 1199216551
This partition ends after the disk limits. (start=3784403913, size=1199216551, end=688653167, disk end=976762880)
BAD_RS LBA=2845207624 380
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA             2845207624 5546276340 2701068717
This partition ends after the disk limits. (start=2845207624, size=2701068717, end=1251309044, disk end=976762880)
BAD_RS LBA=1312215140 563
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA             1312215140 4918696566 3606481427
This partition ends after the disk limits. (start=1312215140, size=3606481427, end=623729270, disk end=976762880)
BAD_RS LBA=547096510 188
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             4842063806 7948913021 3106849216
This partition ends after the disk limits. (start=547096510, size=3106849216, end=3653945725, disk end=976762880)
BAD_RS LBA=1267312992 1274
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 1267312992 1821956274  554643283
This partition ends after the disk limits. (start=1267312992, size=554643283, end=1821956274, disk end=976762880)
BAD_RS LBA=3730575081 750
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             3730575081 4608661431  878086351
This partition ends after the disk limits. (start=3730575081, size=878086351, end=313694135, disk end=976762880)
BAD_RS LBA=1365727531 682
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 1365727531 5314558491 3948830961
This partition ends after the disk limits. (start=1365727531, size=3948830961, end=1019591195, disk end=976762880)
BAD_RS LBA=3508478652 834
check_part_i386 failed for partition type 07
     HPFS - NTFS           3508478652 4438778101  930299450
This partition ends after the disk limits. (start=3508478652, size=930299450, end=143810805, disk end=976762880)
BAD_RS LBA=12604022 751
check_part_i386 failed for partition type 07
     HPFS - NTFS           4307571318 8556686492 4249115175
This partition ends after the disk limits. (start=12604022, size=4249115175, end=4261719196, disk end=976762880)
BAD_RS LBA=227886176 562
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            4522853472 8697138924 4174285453
This partition ends after the disk limits. (start=227886176, size=4174285453, end=107204332, disk end=976762880)
BAD_RS LBA=1868276443 1091
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 1868276443 3235062764 1366786322
This partition ends after the disk limits. (start=1868276443, size=1366786322, end=3235062764, disk end=976762880)
BAD_RS LBA=2694107841 425
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            2694107841 6324011430 3629903590
This partition ends after the disk limits. (start=2694107841, size=3629903590, end=2029044134, disk end=976762880)
BAD_RS LBA=2682983724 184
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 2682983724 3211048073  528064350
This partition ends after the disk limits. (start=2682983724, size=528064350, end=3211048073, disk end=976762880)
BAD_RS LBA=1191706235 652
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 04
     FAT16 <32M            1191706235 1234915884   43209650
This partition ends after the disk limits. (start=1191706235, size=43209650, end=1234915884, disk end=976762880)
BAD_RS LBA=727384809 373
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 04
     FAT16 <32M            5022352105 6565861148 1543509044
This partition ends after the disk limits. (start=727384809, size=1543509044, end=2270893852, disk end=976762880)
BAD_RS LBA=1165322179 552
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             1165322179 3439322116 2273999938
This partition ends after the disk limits. (start=1165322179, size=2273999938, end=3439322116, disk end=976762880)
BAD_RS LBA=1715623885 387
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 04
     FAT16 <32M            1715623885 3566696383 1851072499
This partition ends after the disk limits. (start=1715623885, size=1851072499, end=3566696383, disk end=976762880)
BAD_RS LBA=558145631 1173
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 4853112927 5677805083  824692157
This partition ends after the disk limits. (start=558145631, size=824692157, end=1382837787, disk end=976762880)
BAD_RS LBA=3840870877 442
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 3840870877 7025574124 3184703248
This partition ends after the disk limits. (start=3840870877, size=3184703248, end=2730606828, disk end=976762880)
BAD_RS LBA=362388339 967
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             4657355635 5415054097  757698463
This partition ends after the disk limits. (start=362388339, size=757698463, end=1120086801, disk end=976762880)
BAD_RS LBA=577488183 599
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            4872455479 6282233148 1409777670
This partition ends after the disk limits. (start=577488183, size=1409777670, end=1987265852, disk end=976762880)
BAD_RS LBA=2566402940 946
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                 2566402940 2955747027  389344088
This partition ends after the disk limits. (start=2566402940, size=389344088, end=2955747027, disk end=976762880)
BAD_RS LBA=670649569 944
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 4965616865 8329578415 3363961551
This partition ends after the disk limits. (start=670649569, size=3363961551, end=4034611119, disk end=976762880)
BAD_RS LBA=3152127480 399
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA             3152127480 5126327978 1974200499
This partition ends after the disk limits. (start=3152127480, size=1974200499, end=831360682, disk end=976762880)
BAD_RS LBA=1328652894 956
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             1328652894 1896009541  567356648
This partition ends after the disk limits. (start=1328652894, size=567356648, end=1896009541, disk end=976762880)
BAD_RS LBA=484239015 968
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA             4779206311 5534448824  755242514
This partition ends after the disk limits. (start=484239015, size=755242514, end=1239481528, disk end=976762880)
BAD_RS LBA=680569519 1073
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             4975536815 5845696983  870160169
This partition ends after the disk limits. (start=680569519, size=870160169, end=1550729687, disk end=976762880)
BAD_RS LBA=1930292454 1226
check_FAT: can't read FAT boot sector
Buffer can't store more than 200 lines.
check_part_i386 failed for partition type 06
     FAT16 >32M            1930292454 2184540115  254247662
This partition ends after the disk limits. (start=1930292454, size=254247662, end=2184540115, disk end=976762880)
BAD_RS LBA=1438868021 146
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 1438868021 1749395113  310527093
This partition ends after the disk limits. (start=1438868021, size=310527093, end=1749395113, disk end=976762880)
BAD_RS LBA=1048817983 1005
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0E
     FAT16 LBA             1048817983 3040018824 1991200842
This partition ends after the disk limits. (start=1048817983, size=1991200842, end=3040018824, disk end=976762880)
BAD_RS LBA=865347428 667
check_part_i386 failed for partition type 07
     HPFS - NTFS           5160314724 6444575553 1284260830
This partition ends after the disk limits. (start=865347428, size=1284260830, end=2149608257, disk end=976762880)
BAD_RS LBA=3370459067 950
check_part_i386 failed for partition type 07
     HPFS - NTFS           3370459067 3938869081  568410015
This partition ends after the disk limits. (start=3370459067, size=568410015, end=3938869081, disk end=976762880)
BAD_RS LBA=3691159843 691
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 06
     FAT16 >32M            3691159843 7009609611 3318449769
This partition ends after the disk limits. (start=3691159843, size=3318449769, end=2714642315, disk end=976762880)
BAD_RS LBA=2127533795 1127
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0B
     FAT32                 2127533795 3733689684 1606155890
This partition ends after the disk limits. (start=2127533795, size=1606155890, end=3733689684, disk end=976762880)
Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (500 GB / 465 GiB) seems too small! (< 4452 GB / 4147 GiB)
The following partitions can't be recovered:
     FAT12                  105774612 3306160149 3200385538
     FAT12                  564398619 1811201104 1246802486
     FAT12                  895642502 3181413127 2285770626
     FAT16 LBA             1048817983 3040018824 1991200842
     FAT32 LBA             1103837831 4502338453 3398500623
     FAT12                 1146847928 1990696128  843848201
     FAT16 LBA             1165322179 3439322116 2273999938
     FAT16 <32M            1191706235 1234915884   43209650
     FAT16 >32M            1251110765 5150083202 3898972438
     FAT32                 1267312992 1821956274  554643283
     FAT32 LBA             1312215140 4918696566 3606481427
     FAT16 LBA             1328652894 1896009541  567356648
     FAT12                 1365727531 5314558491 3948830961
     FAT16 <32M            1385760642 1542554290  156793649
     FAT32                 1438868021 1749395113  310527093
     FAT16 <32M            1473623938 5296133852 3822509915
     FAT12                 1485074010 1706532601  221458592
     FAT16 <32M            1715623885 3566696383 1851072499
     HPFS - NTFS           1725146942 4794054566 3068907625
     FAT12                 1868276443 3235062764 1366786322
     FAT16 >32M            1930292454 2184540115  254247662
     FAT12                 1951290925 3991799773 2040508849
     FAT32                 2127533795 3733689684 1606155890
     FAT16 >32M            2383693206 5105223869 2721530664
     FAT12                 2495808880 2745317033  249508154
     FAT12                 2566402940 2955747027  389344088
     FAT16 <32M            2636759912 4113908184 1477148273
     FAT32                 2682983724 3211048073  528064350
     FAT16 >32M            2694107841 6324011430 3629903590
     FAT32 LBA             2845207624 5546276340 2701068717
     FAT32 LBA             3152127480 5126327978 1974200499
     HPFS - NTFS           3370459067 3938869081  568410015
     HPFS - NTFS           3508478652 4438778101  930299450
     FAT32 LBA             3541669149 7170565750 3628896602
     FAT16 >32M            3691159843 7009609611 3318449769
     FAT16 LBA             3730575081 4608661431  878086351
     FAT32                 3758318374 3983168192  224849819
     FAT16 >32M            3784403913 4983620463 1199216551
     FAT32                 3840870877 7025574124 3184703248
     FAT16 >32M            3867257236 4970573082 1103315847
     FAT16 >32M            3889834453 4004128021  114293569
     HPFS - NTFS           4269127312 8042097481 3772970170
     FAT16 >32M            4271271889 4716971893  445700005
     HPFS - NTFS           4307571318 8556686492 4249115175
     FAT16 >32M            4522853472 8697138924 4174285453
     FAT16 LBA             4565901426 5749224824 1183323399
     FAT16 LBA             4657355635 5415054097  757698463
     FAT32 LBA             4779206311 5534448824  755242514
     FAT16 LBA             4842063806 7948913021 3106849216
     FAT32                 4853112927 5677805083  824692157
     FAT16 >32M            4872455479 6282233148 1409777670
     FAT32                 4965616865 8329578415 3363961551
     FAT16 LBA             4975536815 5845696983  870160169
     FAT16 <32M            5022352105 6565861148 1543509044
     HPFS - NTFS           5160314724 6444575553 1284260830
get_geometry_from_list_part_aux head=1 nbr=2

Results
   * FAT16 LBA               48809146  874090643  825281498


dir_partition inode=0
   * FAT16 LBA               48809146  874090643  825281498
Directory /
 245135797 dr-xr-xr-x     0      0 3482360268 11-Dec-1919 00:55 5��%"��.�>m
 257032965 drwxr-xr-x     0      0 3946522400 25-Nov-1919 17:39 a�"�hY.
 233854360 drwxr-xr-x     0      0 2955490919 19-Jan-1952 17:32 �KO
 206517475 -r-xr-xr-x     0      0 2376684228 17-Jan-2036 01:38 ��l8�#�.{�`
 242748641 -rwxr-xr-x     0      0 1379039898 13-Jan-1980 13:34 3��1�	z�.�=u
 171116954 dr-xr-xr-x     0      0 3835712460 28-May-2012 20:58 �?%�%��.L�
 78229843 -rwxr-xr-x     0      0  49004801 21-Jun-2008 19:12 �i��T
 158143968 drwxr-xr-x     0      0 2676443504 13-Jul-1948 00:21 6v��D.@�)
 264954369 -rwxr-xr-x     0      0 3719195866 31-May-1956 05:37 y�d�H�.�
 5780556 drwxr-xr-x     0      0 4164412696 26-May-2030 09:56 �F�c��.K@

interface_write()
 1 * FAT16 LBA               48809146  874090643  825281498
simulate write!

write_mbr_i386: starting...
Store new MBR code
write_all_log_i386: starting...
No extended partition

TestDisk exited normally.
Note that search finds the lost partition but says "Partition not added". Secondly I chose None as partition table, then analyse and quick search find partition properly and very quick but when I try to list files I get "No file found, filesystem may be damaged." Log gives "ext2fs_dir_iterate failed with error 2133571387":

Code: Select all

Fri Jan  8 12:03:15 2016
Command line: TestDisk

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.19.0-15-generic (#15-Ubuntu SMP Thu Apr 16 23:32:01 UTC 2015) i686
Compiler: GCC 4.9
Compilation date: 2015-04-03T09:01:56
ext2fs lib: 1.42.12, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       234490943 sectors
/dev/sda: user_max   234490943 sectors
/dev/sda: native_max 234493056 sectors
/dev/sda: dco        234493056 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       976771055 sectors
/dev/sdb: user_max   976771055 sectors
/dev/sdb: native_max 976773168 sectors
/dev/sdb: dco        976773168 sectors
/dev/sdc: LBA, HPA, LBA48, DCO support
/dev/sdc: size       3907029168 sectors
/dev/sdc: user_max   3907029168 sectors
/dev/sdc: native_max 3907029168 sectors
/dev/sdc: dco        3907029168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 1 sectors, sector size=512
/dev/sr0 is not an ATA disk
Hard disk list
Disk /dev/sda - 120 GB / 111 GiB - CHS 14596 255 63, sector size=512 - SAMSUNG SP1213C, S/N:S02AJ10Y113436, FW:SV100-34
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - HDS725050KLA360, S/N:KRVN65ZAJMMLRF, FW:K2AOAD1A
Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - ST2000DM001-1CH164, S/N:Z340PWET, FW:CC29
Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors, sector size=512
Disk /dev/sr0 - 729 MB / 696 MiB - 356352 sectors (RO), sector size=2048 - GCR-8523B, FW:1.00
Disk /dev/dm-0 - 500 GB / 465 GiB - 976762880 sectors, sector size=512

Partition table type (auto): None
Disk /dev/mapper/sejf - 500 GB / 465 GiB
Partition table type: None

Analyse Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors
recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
Current partition structure:
   P ext4                           0  976762879  976762880 [Sejf]

search_part()
Disk /dev/mapper/sejf - 500 GB / 465 GiB - 976762880 sectors

block_group_nr 1

recover_EXT2: part_offset problem

block_group_nr 1

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=1/3726, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 122095360
recover_EXT2: part_size 976762880
     ext4                           0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB

Results
   P ext4                           0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB


dir_partition inode=2
   P ext4                           0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
ext2fs_dir_iterate failed with error 2133571387.
Directory /


dir_partition inode=2
   P ext4                           0  976762879  976762880 [Sejf]
     ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 500 GB / 465 GiB
ext2fs_dir_iterate failed with error 2133571387.
Directory /

interface_write()
   P ext4                           0  976762879  976762880 [Sejf]
 
Write isn't available because the partition table type "None" has been selected.

TestDisk exited normally.
I think I should choose Intel type partition table and enter partition parameters manually, but I don't know how to do it and I don't want to make even bigger mess.
The whole disk is encrypted with LUKS and has only one primary ext4 partition labeled "Sejf". I'm sure the data is still there because ubuntu installer crashed without any disk writing activity.

I'd really appreciate any help.

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 3566
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Need help with recovering a partition

#2 Post by cgrenier » 10 Jan 2016, 08:50

If /dev/mapper/sejf is the unlocked LUKS filesystem, run as root

Code: Select all

e2fsck -b 98304 -B 4096 /dev/mapper/sejf

Gonzo
Posts: 2
Joined: 08 Jan 2016, 14:43

Re: Need help with recovering a partition

#3 Post by Gonzo » 10 Jan 2016, 15:17

I'm afraid that won't do any good. I tried fsck with -n option, it throws output like this for hours:

Code: Select all

# e2fsck -n -b 98304 -B 4096 /dev/mapper/sejf | more
e2fsck 1.42.12 (29-Aug-2014)
Sejf nie był czysto odmontowany, wymuszono sprawdzenie.
Przebieg 1: Sprawdzanie i-węzłów, bloków i rozmiarów
Przebieg 2: Sprawdzanie struktury katalogów
Przebieg 3: Sprawdzanie łączności katalogów
Przebieg 4: Sprawdzanie liczników odwołań
Przebieg 5: Sprawdzanie sumarycznych informacji o grupach
Różnice bitmapy bloków:  -24543232 -(24543234--24543235) -24543237 -24543240 -24543243 -(24543245--24543246) -24543248 -
24543250 -24543254 -(24543264--24543265) -(24543267--24543268) -(24543271--24543273) -(24543277--24543279) -(24543281--2
4543282) -24543287 -24543292 -24543297 -(24543299--24543300) -24543303 -(24543305--24543307) -24543309 -(24543316--24543
317) -(24543324--24543328) -24543333 -(24543342--24543343) -24543346 -24543348 -(24543350--24543351) -(24543353--2454335
9) -(24543366--24543369) -24543372 -(24543374--24543376) -24543378 -24543380 -24543383 -24543385 -24543387 -24543390 -(2
4543393--24543396) -24543399 -24543401 -(24543403--24543404) -24543408 -24543410 -(24543414--24543415) -(24543418--24543
422) -(24543424--24543427) -24543432 -(24543434--24543440) -24543443 -(24543445--24543449) -(24543451--24543457) -(24543
459--24543460) -24543462 -24543464 -24543470 -24543472 -24543475 -24543478 -24543481 -(24543483--24543484) -(24543488--2
4543489) -24543491 -24543493 -(24543496--24543499) -(24543503--24543505) -(24543508--24543509) -24543511 -24543519 -(245
43521--24543522) -(24543526--24543527) -24543530 -(24543533--24543534) -24543537 -(24543539--24543540) -(24543543--24543
545) -24543548 -24543551 -24543555 -24543557 -(24543560--24543561) -24543563 -24543566 -(24543568--24543569) -(24543572-
-24543573) -24543576 -24543578 -24543580 -24543582 -(24543587--24543588) -24543590 -24543597 -24543602 -24543604 -(24543
607--24543610) -24543612 -(24543615--24543616) -(24543618--24543621) -(24543624--24543625) -(24543627--24543629) -(24543
632--24543634) -(24543637--24543641) -24543643 -(24543647--24543649) -(24543651--24543652) -24543656 -(24543658--2454366
0) -24543663 -24543670 -24543672 -(24543674--24543675) -24543677 -24543680 -24543683 -(24543687--24543693) -24543695 -(2
4543697--24543700) -(24543704--24543708) -(24543710--24543714) -24543716 -(24543718--24543720) -24543724 -24543727 -2454
3730 -24543732 -(24543734--24543737) -24543739 -24543743 -24543745 -(24543750--24543751) -(24543753--24543754) -(2454375
9--24543762) -24543767 -24543770 -24543772 -(24543774--24543775) -24543779 -(24543783--24543785) -24543787 -24543791 -(2
4543794--24543795) -24543798 -24543802 -(24543804--24543805) -24543807 -24543809 -(24543812--24543814) -24543817 -245438
23 -24543826 -24543828 -(24543831--24543832) -(24543836--24543837) -24543842 -(24543844--24543845) -24543849 -24543852 -
(24543856--24543857) -24543860 -(24543862--24543865) -24543867 -24543872 -24543874 -(24543878--24543879) -(24543882--245
43884) -24543886 -24543888 -24543890 -24543900 -24543902 -24543913 -24543915 -(24543919--24543921) -(24543924--24543925)
 -(24543927--24543933) -(24543935--24543937) -24543939 -(24543941--24543943) -(24543945--24543946) -(24543948--24543952)
 -24543954 -24543956 -24543960 -24543963 -(24543965--24543966) -(24543968--24543970) -(24543973--24543974) -24543977 -(2
4543981--24543982) -(24543984--24543985) -(24543989--24543990) -24543992 -(24543998--24543999) -24544001 -24544003 -2454
4010 -24544012 -24544014 -24544016 -24544019 -24544021 -24544026 -(24544030--24544031) -(24544034--24544037) -(24544041-
-24544043) -(24544049--24544055) -24544057 -(24544059--24544063) -24544069 -24544073 -24544076 -24544079 -(24544082--245
44083) -(24544085--24544086) -24544088 -24544093 -(24544098--24544100) -(24544102--24544104) -(24544106--24544114) -(245
44118--24544119) -24544121 -24544124 -24544126 -24544128 -(24544131--24544133) -24544135 -(24544137--24544138) -(2454414
3--24544144) -(24544146--24544148) -24544151 -24544153 -24544157 -(24544159--24544160) -(24544165--24544166) -24544169 -
24544171 -(24544173--24544174) -24544176 -(24544179--24544184) -24544191 -(24544193--24544194) -24544198 -(24544200--245
44201) -24544205 -(24544208--24544211) -(24544220--24544222) -24544225 -24544227 -24544230 -(24544232--24544236) -245442
38 -24544242 -(24544245--24544246) -24544250 -24544252 -(24544254--24544256) -24544258 -24544261 -(24544266--24544267) -

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest