I have a Seagate SSHD. After removing it from my Lenovo Z710 notebook and plugging it back in, the notebook stopped recognizing it as a boot device. I plugged it into another machine with this SATA to USB adapter, and GParted showed that the drive was unallocated. There should be three partitions on the drive; the only one I care about recovering is a large dm-crypt LUKS partition at the end of the drive.
I ran a TestDisk "Analyse" operation on the disk with the default options (including a default sector size of 4096), but it discovered an incorrect partition table. This is the testdisk.log; the disk in question is /dev/sdc.
Code: Select all
Thu Feb 22 13:15:00 2018
Command line: TestDisk
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.9.0-5-amd64 (#1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)) x86_64
Compiler: GCC 6.2
ext2fs lib: 1.43.4, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 1953525168 sectors
/dev/sda: user_max 1953525168 sectors
/dev/sda: native_max 1953525168 sectors
/dev/sda: dco 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST1000LM048-2E7172, S/N:WDELC9CL, FW:SDM1
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 15200 255 63, sector size=4096 - ST1000LM 014-SSHD-8GB
Partition table type (auto): Intel
Disk /dev/sdc - 1000 GB / 931 GiB - ST1000LM 014-SSHD-8GB
Partition table type: Intel
Analyse Disk /dev/sdc - 1000 GB / 931 GiB - CHS 15200 255 63
Geometry from i386 MBR: head=173 sector=55
test_FAT()
1 * FAT32 0 32 33 62 53 55 997376
sector_size 0
cluster_size 0
reserved 47360
fats 0
dir_entries 0
sectors 47616
media 41
fat_length 0
secs_track 48640
heads 102
hidden 62849024
total_sect 3892314112
check_part_i386 failed for partition type 0B
check_part_i386 failed for partition type 83
check_part_i386 failed for partition type 83
Current partition structure:
Invalid FAT boot sector
1 * FAT32 0 32 33 62 53 55 997376
1 * FAT32 0 32 33 62 53 55 997376
No ext2, JFS, Reiser, cramfs or XFS marker
2 P Linux 62 53 56 124 107 47 999424
2 P Linux 62 53 56 124 107 47 999424
No ext2, JFS, Reiser, cramfs or XFS marker
3 P Linux 124 107 48 124 172 48 4096
3 P Linux 124 107 48 124 172 48 4096
search_part()
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 15200 255 63
check_FAT: number of bytes per sector mismatches 512 (FAT) != 4096 (HD)
Search for partition aborted
Results
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.
Code: Select all
Thu Feb 22 13:43:05 2018
Command line: TestDisk
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.9.0-5-amd64 (#1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)) x86_64
Compiler: GCC 6.2
ext2fs lib: 1.43.4, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 1953525168 sectors
/dev/sda: user_max 1953525168 sectors
/dev/sda: native_max 1953525168 sectors
/dev/sda: dco 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST1000LM048-2E7172, S/N:WDELC9CL, FW:SDM1
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 15200 255 63, sector size=4096 - ST1000LM 014-SSHD-8GB
Partition table type (auto): Intel
Disk /dev/sdc - 1000 GB / 931 GiB - ST1000LM 014-SSHD-8GB
Partition table type: Intel
New geometry
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121602 255 63 sector_size=512
Analyse Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121602 255 63
Geometry from i386 MBR: head=173 sector=55
FAT32 at 0/32/33
Info: size boot_sector 997376, partition 997376
FAT1 : 32-1004
FAT2 : 1005-1977
start_rootdir : 1978 root cluster : 2
Data : 1978-997369
sectors : 997376
cluster_size : 8
no_of_cluster : 124424 (2 - 124425)
fat_length 973 calculated 973
set_FAT_info: name from BS used
Current partition structure:
1 * FAT32 0 32 33 62 53 55 997376 [NO NAME]
2 P Linux 62 53 56 124 107 47 999424
3 P Linux 124 107 48 124 172 48 4096
search_part()
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121602 255 63
FAT32 at 0/32/33
FAT1 : 32-1004
FAT2 : 1005-1977
start_rootdir : 1978 root cluster : 2
Data : 1978-997369
sectors : 997376
cluster_size : 8
no_of_cluster : 124424 (2 - 124425)
fat_length 973 calculated 973
set_FAT_info: name from BS used
FAT32 at 0/32/33
FAT32 0 32 33 62 53 55 997376 [NO NAME]
FAT32, blocksize=4096, 510 MB / 487 MiB
recover_EXT2: s_block_group_nr=0/61, s_mnt_count=2/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2048
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 499712
recover_EXT2: part_size 999424
Linux 62 53 56 124 107 47 999424
ext2 blocksize=1024 Sparse_SB, 511 MB / 488 MiB
Linux 124 107 48 124 172 48 4096
LUKS 1 (Data size unknown), 2097 KB / 2048 KiB
Search for partition aborted
Results
* FAT32 0 32 33 62 53 55 997376 [NO NAME]
FAT32, blocksize=4096, 510 MB / 487 MiB
P Linux 62 53 56 124 107 47 999424
ext2 blocksize=1024 Sparse_SB, 511 MB / 488 MiB
P Linux 124 107 48 124 172 48 4096
LUKS 1 (Data size unknown), 2097 KB / 2048 KiB
Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 997376 linear /dev/sdc 2048" | dmsetup create test0
echo "0 999424 linear /dev/sdc 999424" | dmsetup create test1
echo "0 4096 linear /dev/sdc 1998848" | dmsetup create test2
interface_write()
1 * FAT32 0 32 33 62 53 55 997376 [NO NAME]
2 P Linux 62 53 56 124 107 47 999424
3 P Linux 124 107 48 124 172 48 4096
write!
write_mbr_i386: starting...
write_all_log_i386: starting...
No extended partition
You will have to reboot for the change to take effect.
Interface Advanced
Geometry from i386 MBR: head=173 sector=55
FAT32 at 0/32/33
Info: size boot_sector 997376, partition 997376
FAT1 : 32-1004
FAT2 : 1005-1977
start_rootdir : 1978 root cluster : 2
Data : 1978-997369
sectors : 997376
cluster_size : 8
no_of_cluster : 124424 (2 - 124425)
fat_length 973 calculated 973
set_FAT_info: name from BS used
1 * FAT32 0 32 33 62 53 55 997376 [NO NAME]
FAT32, blocksize=4096, 510 MB / 487 MiB
2 P Linux 62 53 56 124 107 47 999424
ext2 blocksize=1024 Sparse_SB, 511 MB / 488 MiB
3 P Linux 124 107 48 124 172 48 4096
LUKS 1, 2097 KB / 2048 KiB
FAT: cluster=2(0x2), pos=4026
Directory /
3 drwxr-xr-x 0 0 0 27-Jun-2015 18:16 EFI
Directory /
2 drwxr-xr-x 0 0 1024 11-Jan-2018 14:04 .
2 drwxr-xr-x 0 0 1024 11-Jan-2018 14:04 ..
11 drwx------ 0 0 12288 27-Jun-2015 02:45 lost+found
30721 drwxr-xr-x 0 0 1024 27-Jun-2015 10:04 efi
13 -rw-r--r-- 0 0 157756 14-Dec-2017 13:27 config-3.16.0-4-amd64
14 -rw-r--r-- 0 0 3137712 14-Dec-2017 13:25 vmlinuz-3.16.0-4-amd64
38913 drwxr-xr-x 0 0 1024 11-Jan-2018 14:04 grub
16 -rw-r--r-- 0 0 157786 9-Jan-2018 03:42 config-3.16.0-5-amd64
12 -rw-r--r-- 0 0 2684316 14-Dec-2017 13:27 System.map-3.16.0-4-amd64
18 -rw-r--r-- 0 0 17280594 11-Jan-2018 14:04 initrd.img-3.16.0-4-amd64
17 -rw-r--r-- 0 0 3139776 9-Jan-2018 03:40 vmlinuz-3.16.0-5-amd64
X 19 -rw-r--r-- 0 0 17280295 11-Jan-2018 14:04 initrd.img-3.16.0-5-amd64.new
15 -rw-r--r-- 0 0 2683305 9-Jan-2018 03:42 System.map-3.16.0-5-amd64
19 -rw-r--r-- 0 0 17280295 11-Jan-2018 14:04 initrd.img-3.16.0-5-amd64
X 22 -rw-r--r-- 0 0 0 11-Jan-2018 14:02 vmlinuz-3.16.0-4-amd64.dpkg-tmp
X 21 -rw-r--r-- 0 0 0 11-Jan-2018 14:02 config-3.16.0-4-amd64.dpkg-new
X 14 -rw-r--r-- 0 0 3137712 14-Dec-2017 13:25 config-3.16.0-4-amd64.dpkg-tmp
X 22 -rw-r--r-- 0 0 0 11-Jan-2018 14:02 vmlinuz-3.16.0-4-amd64.dpkg-new
X 15 -rw-r--r-- 0 0 2683305 9-Jan-2018 03:42 vmlinuz-3.16.0-4-amd64.dpkg-tmp
3 P Linux 124 107 48 124 172 48 4096
LUKS 1, 2097 KB / 2048 KiB
Support for this filesystem hasn't been enable during compilation.
TestDisk exited normally.
Code: Select all
Thu Feb 22 13:56:33 2018
Command line: TestDisk
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.9.0-5-amd64 (#1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)) x86_64
Compiler: GCC 6.2
ext2fs lib: 1.43.4, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 1953525168 sectors
/dev/sda: user_max 1953525168 sectors
/dev/sda: native_max 1953525168 sectors
/dev/sda: dco 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST1000LM048-2E7172, S/N:WDELC9CL, FW:SDM1
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 15200 255 63, sector size=4096 - ST1000LM 014-SSHD-8GB
Partition table type (auto): Intel
Disk /dev/sdc - 1000 GB / 931 GiB - ST1000LM 014-SSHD-8GB
Partition table type: Intel
New geometry
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121602 255 63 sector_size=512
Analyse Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121602 255 63
Geometry from i386 MBR: head=173 sector=55
FAT32 at 0/32/33
Info: size boot_sector 997376, partition 997376
FAT1 : 32-1004
FAT2 : 1005-1977
start_rootdir : 1978 root cluster : 2
Data : 1978-997369
sectors : 997376
cluster_size : 8
no_of_cluster : 124424 (2 - 124425)
fat_length 973 calculated 973
set_FAT_info: name from BS used
Current partition structure:
1 * FAT32 0 32 33 62 53 55 997376 [NO NAME]
2 P Linux 62 53 56 124 107 47 999424
3 P Linux 124 107 48 124 172 48 4096
search_part()
Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121602 255 63
FAT32 at 0/32/33
FAT1 : 32-1004
FAT2 : 1005-1977
start_rootdir : 1978 root cluster : 2
Data : 1978-997369
sectors : 997376
cluster_size : 8
no_of_cluster : 124424 (2 - 124425)
fat_length 973 calculated 973
set_FAT_info: name from BS used
FAT32 at 0/32/33
FAT32 0 32 33 62 53 55 997376 [NO NAME]
FAT32, blocksize=4096, 510 MB / 487 MiB
recover_EXT2: s_block_group_nr=0/61, s_mnt_count=2/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2048
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 499712
recover_EXT2: part_size 999424
Linux 62 53 56 124 107 47 999424
ext2 blocksize=1024 Sparse_SB, 511 MB / 488 MiB
Linux 124 107 48 124 172 48 4096
LUKS 1 (Data size unknown), 2097 KB / 2048 KiB
Search for partition aborted
Results
* FAT32 0 32 33 62 53 55 997376 [NO NAME]
FAT32, blocksize=4096, 510 MB / 487 MiB
P Linux 62 53 56 124 107 47 999424
ext2 blocksize=1024 Sparse_SB, 511 MB / 488 MiB
P Linux 124 107 48 124 172 48 4096
LUKS 1 (Data size unknown), 2097 KB / 2048 KiB
Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 997376 linear /dev/sdc 2048" | dmsetup create test0
echo "0 999424 linear /dev/sdc 999424" | dmsetup create test1
echo "0 4096 linear /dev/sdc 1998848" | dmsetup create test2
Change partition type:
Linux 124 107 48 121601 254 63 1951537282
interface_write()
1 * FAT32 0 32 33 62 53 55 997376 [NO NAME]
2 P Linux 62 53 56 124 107 47 999424
3 P Linux 124 107 48 121601 254 63 1951537282
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.
Code: Select all
# fdisk -l /dev/sdc
Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 244190646 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x5c8295f6
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 999423 997376 3.8G b W95 FAT32
/dev/sdc2 999424 1998847 999424 3.8G 83 Linux
/dev/sdc3 1998848 1953536129 1951537282 7.3T 83 Linux
Code: Select all
# fdisk -b 512 -l /dev/sdc
Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5c8295f6
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 999423 997376 487M b W95 FAT32
/dev/sdc2 999424 1998847 999424 488M 83 Linux
/dev/sdc3 1998848 1953536129 1951537282 930.6G 83 Linux