Windows partition damaged on M.2 SATA SSD after laptop failure

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
TestingAnon
Posts: 2
Joined: 16 Sep 2022, 04:48

Windows partition damaged on M.2 SATA SSD after laptop failure

#1 Post by TestingAnon »

So, the story is, a M.2 SATA SSD main windows partition got damaged after a sudden shutdown when a dell laptop experienced a hardware failure (MOSFET failed).
It seems to be a standard OEM windows install, a secondary drive (1TB HGST HDD) also experienced problems after plugging it in another computer with windows but recovering data from it was simple, just opening it using a Linux USB instead Windows and files were copy/pasted without the need of recovery software.

Ran Testdisk on the M.2 SSD (Which was connected directly to a M.2 port at first, got messed results and after using a M.2 to 2.5" SATA adapter results were also the same), partitions were a mess on both quick search and deep search, posting logs.

Code: Select all

TestDisk 7.2-WIP, Data Recovery Utility, July 2022
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 5.4.0-91-generic (#102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021) x86_64
Compiler: GCC 4.8
ext2fs lib: 1.42.8, ntfs lib: libntfs-3g, reiserfs lib: 0.3.1-rc8, ewf lib: 20120504, curses lib: ncurses 5.9
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       250069680 sectors
/dev/sda: user_max   250069680 sectors
/dev/sda: native_max 250069680 sectors
/dev/sda: dco        250069680 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop1 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop2 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop3 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop4 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop5 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop6 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop7 - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 128 GB / 119 GiB - CHS 15566 255 63, sector size=512 - TOSHIBA THNSNK128GVN8 M.2 2280 128GB, S/N:67BB5054KLMU, FW:K8DC4101
Disk /dev/sdb - 32 GB / 29 GiB - CHS 30594 64 32, sector size=512 - Samsung Flash Drive, FW:1100
Disk /dev/loop0 - 2003 MB / 1910 MiB - 3912480 sectors (RO), sector size=512

Partition table type (auto): EFI GPT
Disk /dev/sda - 128 GB / 119 GiB - TOSHIBA THNSNK128GVN8 M.2 2280 128GB
Partition table type: EFI GPT

Analyse Disk /dev/sda - 128 GB / 119 GiB - CHS 15566 255 63
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=250069675 (expected 250069679)
hdr_lba_start=34
hdr_lba_end=250069642
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 3 P MS Reserved              1128448    1161215      32768 [Microsoft reserved partition]
check_part_gpt failed for partition
 4 P MS Data                  1161216  250068991  248907776 [Basic data partition]
Current partition structure:
 1 P Windows Recovery Env        2048     923647     921600 [Basic data partition]
 2 P EFI System                923648    1128447     204800 [EFI system partition]
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 3 P MS Reserved              1128448    1161215      32768 [Microsoft reserved partition]
 3 P MS Reserved              1128448    1161215      32768 [Microsoft reserved partition]
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 4 P MS Data                  1161216  250068991  248907776 [Basic data partition]
 4 P MS Data                  1161216  250068991  248907776 [Basic data partition]

search_part()
Disk /dev/sda - 128 GB / 119 GiB - CHS 15566 255 63
NTFS at 0/32/33
filesystem size           921600
sectors_per_cluster       8
mft_lcn                   38400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=471859200, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size           921600
sectors_per_cluster       8
mft_lcn                   38400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048     923647     921600 [Recuperación]
     NTFS, blocksize=4096, 471 MB / 450 MiB
FAT32 at 57/126/6
FAT1 : 6654-7422
FAT2 : 7423-8191
start_rootdir : 8192 root cluster : 2
Data : 8192-204799
sectors : 204800
cluster_size : 2
no_of_cluster : 98304 (2 - 98305)
fat_length 769 calculated 769
set_FAT_info: name from BS used

FAT32 at 57/126/6
FAT: cluster=2(0x2), pos=931840
     EFI System                923648    1128447     204800 [EFI System Partition] [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
FAT12 at 333/192/44
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 333/192/44
     EFI System               5361784    5364663       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
FAT12 at 333/245/17
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 333/245/17
     EFI System               5365096    5367975       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
NTFS at 334/43/6
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5362251    5368424       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/43/6
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5368424    5374597       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/141/24
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5368443    5374616       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/141/24
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5374616    5380789       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/239/42
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5374635    5380808       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/239/42
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5380808    5386981       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
NTFS at 335/82/60
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5380827    5387000       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 335/82/60
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5387000    5393173       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB

LVM magic value at 658/174/37
check_FAT: Unusual, only one FAT
FAT32 at 833/149/38
check_FAT: Bad number of entries in root dir
FAT12 at 833/149/41
check_FAT: Unusual media descriptor (0xf8!=0xf0)
FAT1 : 1-8
FAT2 : 9-16
start_rootdir : 17
Data : 49-20736
sectors : 20739
cluster_size : 8
no_of_cluster : 2586 (2 - 2587)
fat_length 8 calculated 8
FAT differs, FAT sectors=0-8/8
heads/cylinder 4 (FAT) != 255 (HD)
sect/track 17 (FAT) != 63 (HD)

FAT12 at 833/149/41
     MS Data                 13391572   13412310      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
NTFS at 1670/192/19
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                 26834491   26840664       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 1670/192/19
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                 26840664   26846837       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB

LVM magic value at 2759/227/8

cramfs Marker at 2873/80/41

recover_cramfs
     Linux filesys. data     46159825   47531808    1371983 [GW¹¤Ø«ÝŠ½Í(bždSÜ]
     cramfs, 702 MB / 669 MiB

LVM magic value at 3565/97/31
NTFS at 4150/150/33
filesystem size           248907776
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=34139766784, part_size=127440781312, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 4150/150/33
filesystem size           248907776
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                 66679232  315587007  248907776
     NTFS, blocksize=4096, 127 GB / 118 GiB
This partition ends after the disk limits. (start=66679232, size=248907776, end=315587007, disk end=250069680)

LVM magic value at 4473/230/17

LVM magic value at 6898/182/56

LVM magic value at 12817/195/22

LVM magic value at 13353/108/30
Disk /dev/sda - 128 GB / 119 GiB - CHS 15566 255 63
Check the hard disk size: HD jumper settings, BIOS detection...
The hard disk (128 GB / 119 GiB) seems too small! (< 161 GB / 150 GiB)
The following partition can't be recovered:
     MS Data                 66679232  315587007  248907776
     NTFS, blocksize=4096, 127 GB / 118 GiB

Results
   P MS Data                     2048     923647     921600 [Recuperación]
     NTFS, blocksize=4096, 471 MB / 450 MiB
   P EFI System                923648    1128447     204800 [EFI System Partition] [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
     EFI System               5361784    5364663       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
     MS Data                  5362251    5368424       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     EFI System               5365096    5367975       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
     MS Data                  5368424    5374597       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5368443    5374616       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5374616    5380789       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5374635    5380808       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5380808    5386981       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5380827    5387000       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5387000    5393173       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P MS Data                 13391572   13412310      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
     MS Data                 26834491   26840664       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                 26840664   26846837       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P Linux filesys. data     46159825   47531808    1371984 [GW¹¤Ø«ÝŠ½Í(bždSÜ]
     cramfs, 702 MB / 669 MiB

Hint for advanced users: dmsetup may be used if you prefer to avoid rewriting the partition table for the moment:
echo "0 921600 linear /dev/sda 2048" | dmsetup create test0
echo "0 204800 linear /dev/sda 923648" | dmsetup create test1
echo "0 2880 linear /dev/sda 5361784" | dmsetup create test2
echo "0 6174 linear /dev/sda 5362251" | dmsetup create test3
echo "0 2880 linear /dev/sda 5365096" | dmsetup create test4
echo "0 6174 linear /dev/sda 5368424" | dmsetup create test5
echo "0 6174 linear /dev/sda 5368443" | dmsetup create test6
echo "0 6174 linear /dev/sda 5374616" | dmsetup create test7
echo "0 6174 linear /dev/sda 5374635" | dmsetup create test8
echo "0 6174 linear /dev/sda 5380808" | dmsetup create test9
echo "0 6174 linear /dev/sda 5380827" | dmsetup create test10
echo "0 6174 linear /dev/sda 5387000" | dmsetup create test11
echo "0 20739 linear /dev/sda 13391572" | dmsetup create test12
echo "0 6174 linear /dev/sda 26834491" | dmsetup create test13
echo "0 6174 linear /dev/sda 26840664" | dmsetup create test14
echo "0 1371984 linear /dev/sda 46159825" | dmsetup create test15

interface_write()
 1 P MS Data                     2048     923647     921600 [Recuperación]
 2 P EFI System                923648    1128447     204800 [EFI System Partition] [NO NAME]
 3 P MS Data                 13391572   13412310      20739 [NO NAME]
 4 P Linux filesys. data     46159825   47531808    1371984 [GW¹¤Ø«ÝŠ½Í(bždSÜ]

search_part()
Disk /dev/sda - 128 GB / 119 GiB - CHS 15566 255 63
NTFS at 0/32/33
filesystem size           921600
sectors_per_cluster       8
mft_lcn                   38400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=471859200, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size           921600
sectors_per_cluster       8
mft_lcn                   38400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048     923647     921600 [Recuperación]
     NTFS, blocksize=4096, 471 MB / 450 MiB
NTFS at 57/126/5
filesystem size           921600
sectors_per_cluster       8
mft_lcn                   38400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048     923647     921600 [Recuperación]
     NTFS found using backup sector, blocksize=4096, 471 MB / 450 MiB
NTFS at 57/126/5
filesystem size           921600
sectors_per_cluster       8
mft_lcn                   38400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                   923647    1845246     921600
     NTFS, blocksize=4096, 471 MB / 450 MiB
FAT32 at 57/126/6
FAT1 : 6654-7422
FAT2 : 7423-8191
start_rootdir : 8192 root cluster : 2
Data : 8192-204799
sectors : 204800
cluster_size : 2
no_of_cluster : 98304 (2 - 98305)
fat_length 769 calculated 769
set_FAT_info: name from BS used

FAT32 at 57/126/6
FAT: cluster=2(0x2), pos=931840
     EFI System                923648    1128447     204800 [EFI System Partition] [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
FAT32 at 57/126/12
FAT1 : 6654-7422
FAT2 : 7423-8191
start_rootdir : 8192 root cluster : 2
Data : 8192-204799
sectors : 204800
cluster_size : 2
no_of_cluster : 98304 (2 - 98305)
fat_length 769 calculated 769
FAT differs, FAT sectors=752-768/769
set_FAT_info: name from BS used

FAT32 at 57/126/12
FAT: cluster=2(0x2), pos=931840
     EFI System                923648    1128447     204800 [EFI System Partition] [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
FAT32 at 57/126/12
FAT1 : 6654-7422
FAT2 : 7423-8191
start_rootdir : 8192 root cluster : 2
Data : 8192-204799
sectors : 204800
cluster_size : 2
no_of_cluster : 98304 (2 - 98305)
fat_length 769 calculated 769
FAT differs, FAT sectors=752-768/769
set_FAT_info: name from BS used

FAT32 at 57/126/12
FAT: cluster=2(0x2), pos=931846
FAT: cluster=771(0x303), pos=933384
FAT: cluster=1540(0x604), pos=934922
FAT: cluster=2309(0x905), pos=936460
FAT: cluster=3078(0xc06), pos=937998
FAT: cluster=3847(0xf07), pos=939536
FAT: cluster=4616(0x1208), pos=941074
FAT: cluster=5385(0x1509), pos=942612
FAT: cluster=6154(0x180a), pos=944150
FAT: cluster=6923(0x1b0b), pos=945688
FAT: cluster=7692(0x1e0c), pos=947226
FAT: cluster=8461(0x210d), pos=948764
FAT: cluster=9230(0x240e), pos=950302
FAT: cluster=9999(0x270f), pos=951840
FAT: cluster=10768(0x2a10), pos=953378
FAT: cluster=11537(0x2d11), pos=954916
FAT: cluster=12306(0x3012), pos=956454
FAT: cluster=13075(0x3313), pos=957992
FAT: cluster=13844(0x3614), pos=959530
FAT: cluster=14613(0x3915), pos=961068
FAT: cluster=15382(0x3c16), pos=962606
FAT: cluster=16151(0x3f17), pos=964144
FAT: cluster=16920(0x4218), pos=965682
FAT: cluster=17689(0x4519), pos=967220
FAT: cluster=18458(0x481a), pos=968758
FAT: cluster=19227(0x4b1b), pos=970296
FAT: cluster=19996(0x4e1c), pos=971834
FAT: cluster=20765(0x511d), pos=973372
FAT: cluster=21534(0x541e), pos=974910
FAT: cluster=22303(0x571f), pos=976448
FAT: cluster=23072(0x5a20), pos=977986
FAT: cluster=23841(0x5d21), pos=979524
FAT: cluster=24610(0x6022), pos=981062
FAT: cluster=25379(0x6323), pos=982600
     MS Data                   923654    1128453     204800 [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
FAT12 at 333/192/44
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 333/192/44
     EFI System               5361784    5364663       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
FAT12 at 333/245/17
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 333/245/17
     EFI System               5365096    5367975       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
NTFS at 334/43/6
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5362251    5368424       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/43/6
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5368424    5374597       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/141/24
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5368443    5374616       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/141/24
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5374616    5380789       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/239/42
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5374635    5380808       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 334/239/42
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5380808    5386981       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
NTFS at 335/82/60
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5380827    5387000       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 335/82/60
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                  5387000    5393173       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB

LVM magic value at 658/174/37
check_FAT: Unusual, only one FAT
FAT32 at 833/149/38
check_FAT: Bad number of entries in root dir
FAT12 at 833/149/41
check_FAT: Unusual media descriptor (0xf8!=0xf0)
FAT1 : 1-8
FAT2 : 9-16
start_rootdir : 17
Data : 49-20736
sectors : 20739
cluster_size : 8
no_of_cluster : 2586 (2 - 2587)
fat_length 8 calculated 8
FAT differs, FAT sectors=0-8/8
heads/cylinder 4 (FAT) != 255 (HD)
sect/track 17 (FAT) != 63 (HD)

FAT12 at 833/149/41
     MS Data                 13391572   13412310      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
NTFS at 1670/192/19
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                 26834491   26840664       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
NTFS at 1670/192/19
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
     MS Data                 26840664   26846837       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB

LVM magic value at 2759/227/8

cramfs Marker at 2873/80/41

recover_cramfs
     Linux filesys. data     46159825   47531808    1371983 [GW¹¤Ø«ÝŠ½Í(bždSÜ]
     cramfs, 702 MB / 669 MiB

cramfs Marker at 2873/80/42

recover_cramfs
     Linux filesys. data     46159826   47531809    1371983 [GW¹¤Ø«ÝŠ½Í(bždSÜ]
     cramfs, 702 MB / 669 MiB

LVM magic value at 3565/97/31
NTFS at 4150/150/33
filesystem size           248907776
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=34139766784, part_size=127440781312, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 4150/150/33
filesystem size           248907776
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                 66679232  315587007  248907776
     NTFS, blocksize=4096, 127 GB / 118 GiB
This partition ends after the disk limits. (start=66679232, size=248907776, end=315587007, disk end=250069680)

LVM magic value at 4473/230/17

LVM magic value at 6898/182/56

LVM magic value at 12817/195/22

LVM magic value at 13353/108/30
NTFS at 334/43/6
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
NTFS at 334/141/24
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
NTFS at 334/239/42
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
filesystem size           6174
sectors_per_cluster       1
mft_lcn                   2058
mftmirr_lcn               5162
clusters_per_mft_record   2
clusters_per_index_record 8
Disk /dev/sda - 128 GB / 119 GiB - CHS 15566 255 63
Check the hard disk size: HD jumper settings, BIOS detection...
The hard disk (128 GB / 119 GiB) seems too small! (< 161 GB / 150 GiB)
The following partition can't be recovered:
     MS Data                 66679232  315587007  248907776
     NTFS, blocksize=4096, 127 GB / 118 GiB

Results
     MS Data                     2048     923647     921600 [Recuperación]
     NTFS, blocksize=4096, 471 MB / 450 MiB
     MS Data                   923647    1845246     921600
     NTFS, blocksize=4096, 471 MB / 450 MiB
     EFI System                923648    1128447     204800 [EFI System Partition] [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
     MS Data                   923654    1128453     204800 [NO NAME]
     FAT32, blocksize=1024, 104 MB / 100 MiB
     EFI System               5361784    5364663       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
     MS Data                  5362251    5368424       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     EFI System               5365096    5367975       2880 [EFI System Partition] [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
     MS Data                  5368424    5374597       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5368443    5374616       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5374616    5380789       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5374635    5380808       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5380808    5386981       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5380827    5387000       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                  5387000    5393173       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P MS Data                 13391572   13412310      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
     MS Data                 26834491   26840664       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                 26840664   26846837       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
     Linux filesys. data     46159825   47531808    1371984 [GW¹¤Ø«ÝŠ½Í(bždSÜ]
     cramfs, 702 MB / 669 MiB
     Linux filesys. data     46159826   47531809    1371984 [GW¹¤Ø«ÝŠ½Í(bždSÜ]
     cramfs, 702 MB / 669 MiB

Hint for advanced users: dmsetup may be used if you prefer to avoid rewriting the partition table for the moment:
echo "0 921600 linear /dev/sda 2048" | dmsetup create test0
echo "0 921600 linear /dev/sda 923647" | dmsetup create test1
echo "0 204800 linear /dev/sda 923648" | dmsetup create test2
echo "0 204800 linear /dev/sda 923654" | dmsetup create test3
echo "0 2880 linear /dev/sda 5361784" | dmsetup create test4
echo "0 6174 linear /dev/sda 5362251" | dmsetup create test5
echo "0 2880 linear /dev/sda 5365096" | dmsetup create test6
echo "0 6174 linear /dev/sda 5368424" | dmsetup create test7
echo "0 6174 linear /dev/sda 5368443" | dmsetup create test8
echo "0 6174 linear /dev/sda 5374616" | dmsetup create test9
echo "0 6174 linear /dev/sda 5374635" | dmsetup create test10
echo "0 6174 linear /dev/sda 5380808" | dmsetup create test11
echo "0 6174 linear /dev/sda 5380827" | dmsetup create test12
echo "0 6174 linear /dev/sda 5387000" | dmsetup create test13
echo "0 20739 linear /dev/sda 13391572" | dmsetup create test14
echo "0 6174 linear /dev/sda 26834491" | dmsetup create test15
echo "0 6174 linear /dev/sda 26840664" | dmsetup create test16
echo "0 1371984 linear /dev/sda 46159825" | dmsetup create test17
echo "0 1371984 linear /dev/sda 46159826" | dmsetup create test18

interface_write()
 1 P MS Data                 13391572   13412310      20739 [NO NAME]
simulate write!

TestDisk exited normally.
What could be the problem? i assume i should clone it to another drive first using dd?

recuperation
Posts: 2719
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Windows partition damaged on M.2 SATA SSD after laptop failure

#2 Post by recuperation »

TestingAnon wrote: 16 Sep 2022, 05:14 What could be the problem? i assume i should clone it to another drive first using dd?
As for the problem, read
viewtopic.php?p=34916#p34916

When suspecting dammage on the drive, post your smartmontools log file:

viewtopic.php?f=5&t=10910

Looking at the SMART parameters is a quick way of getting an impression about a drive.
When suspecting dammage on a drive and willing to bear the risk of drive degradation, duplicate the drive using ddrescue (not dd!) as described in the manual. Using the log function of ddrescue is recommended, taking a screenshot of the ddrescue main panel provides additional information to make a judgment about the drive in question.

TestingAnon
Posts: 2
Joined: 16 Sep 2022, 04:48

Re: Windows partition damaged on M.2 SATA SSD after laptop failure

#3 Post by TestingAnon »

Understood, i will start ddrescue soon, meanwhile here is the smartctl report:

Code: Select all

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-91-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     TOSHIBA THNSNK128GVN8 M.2 2280 128GB
Serial Number:    67BB5054KLMU
LU WWN Device Id: 5 00080d c00856963
Firmware Version: K8DC4101
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      M.2
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-3 (minor revision not indicated)
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Oct 20 00:25:05 2022 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (  16)	The self-test routine was aborted by
					the host.
Total time to complete Offline 
data collection: 		(  120) seconds.
Offline data collection
capabilities: 			 (0x5b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (   6) minutes.
SCT capabilities: 	       (0x003d)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       100
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       5216
 12 Power_Cycle_Count       0x0033   100   100   000    Pre-fail  Always       -       4396
166 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
167 Unknown_Attribute       0x0022   100   100   000    Old_age   Always       -       0
168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       4
173 Unknown_Attribute       0x0012   164   164   000    Old_age   Always       -       0
175 Program_Fail_Count_Chip 0x0033   100   100   010    Pre-fail  Always       -       0
176 Erase_Fail_Count_Chip   0x0033   100   100   010    Pre-fail  Always       -       0
177 Wear_Leveling_Count     0x0033   064   064   010    Pre-fail  Always       -       0
178 Used_Rsvd_Blk_Cnt_Chip  0x0033   100   100   010    Pre-fail  Always       -       0
179 Used_Rsvd_Blk_Cnt_Tot   0x0033   100   100   010    Pre-fail  Always       -       100
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033   100   100   010    Pre-fail  Always       -       100
181 Program_Fail_Cnt_Total  0x0033   100   100   010    Pre-fail  Always       -       100
182 Erase_Fail_Count_Total  0x0033   100   100   010    Pre-fail  Always       -       100
187 Reported_Uncorrect      0x0033   100   100   000    Pre-fail  Always       -       0
192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       311
194 Temperature_Celsius     0x0022   051   035   000    Old_age   Always       -       49 (Min/Max 17/65)
195 Hardware_ECC_Recovered  0x002b   100   099   000    Pre-fail  Always       -       0
199 UDMA_CRC_Error_Count    0x0012   100   100   000    Old_age   Always       -       4
238 Unknown_Attribute       0x0032   064   064   010    Old_age   Always       -       0
241 Total_LBAs_Written      0x0013   100   100   000    Pre-fail  Always       -       730907
242 Total_LBAs_Read         0x0013   100   100   000    Pre-fail  Always       -       686044

SMART Error Log Version: 1
ATA Error Count: 4
	CR = Command Register [HEX]
	FR = Features Register [HEX]
	SC = Sector Count Register [HEX]
	SN = Sector Number Register [HEX]
	CL = Cylinder Low Register [HEX]
	CH = Cylinder High Register [HEX]
	DH = Device/Head Register [HEX]
	DC = Device Command Register [HEX]
	ER = Error register [HEX]
	ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 4 occurred at disk power-on lifetime: 5215 hours (217 days + 7 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 08 f0 11 45 40  Error: ICRC, ABRT 8 sectors at LBA = 0x004511f0 = 4526576

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 08 f0 11 45 40 00      00:21:36.099  READ DMA EXT
  ef 03 45 68 11 45 00 00      00:21:36.098  SET FEATURES [Set transfer mode]
  ef 03 0c 68 11 45 00 00      00:21:36.098  SET FEATURES [Set transfer mode]
  ec 03 08 68 11 45 00 00      00:21:36.098  IDENTIFY DEVICE
  00 00 00 00 00 00 00 04      00:21:36.084  NOP [Abort queued commands]

Error 3 occurred at disk power-on lifetime: 5215 hours (217 days + 7 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 00 f0 11 45 40  Error: ICRC, ABRT at LBA = 0x004511f0 = 4526576

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 00 f0 11 45 40 00      00:21:36.082  READ FPDMA QUEUED
  60 08 00 e8 11 45 40 00      00:21:36.081  READ FPDMA QUEUED
  60 08 00 e0 11 45 40 00      00:21:36.081  READ FPDMA QUEUED
  60 08 00 d8 11 45 40 00      00:21:36.080  READ FPDMA QUEUED
  60 08 00 d0 11 45 40 00      00:21:36.080  READ FPDMA QUEUED

Error 2 occurred at disk power-on lifetime: 5215 hours (217 days + 7 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 00 e8 12 45 40  Error: ICRC, ABRT at LBA = 0x004512e8 = 4526824

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 00 e8 12 45 40 00      00:21:36.056  READ FPDMA QUEUED
  60 08 00 60 11 45 40 00      00:21:36.056  READ FPDMA QUEUED
  60 08 00 58 11 45 40 00      00:21:36.055  READ FPDMA QUEUED
  60 08 00 50 11 45 40 00      00:21:36.055  READ FPDMA QUEUED
  60 08 00 48 11 45 40 00      00:21:36.054  READ FPDMA QUEUED

Error 1 occurred at disk power-on lifetime: 5215 hours (217 days + 7 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  84 51 00 68 0f 45 40  Error: ICRC, ABRT at LBA = 0x00450f68 = 4525928

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 00 68 0f 45 40 00      00:21:36.006  READ FPDMA QUEUED
  60 52 08 16 0f 45 40 00      00:21:35.985  READ FPDMA QUEUED
  60 32 00 b6 0d 45 40 00      00:21:35.984  READ FPDMA QUEUED
  60 80 08 e8 0d 45 40 00      00:21:35.979  READ FPDMA QUEUED
  60 00 00 e8 0b 45 40 00      00:21:35.973  READ FPDMA QUEUED

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Aborted by host               00%      5181         -
# 2  Short offline       Aborted by host               00%      5037         -
# 3  Short offline       Aborted by host               00%      4982         -
# 4  Short offline       Completed without error       00%      4955         -
# 5  Short offline       Completed without error       00%      4954         -
# 6  Short offline       Completed without error       00%      4953         -
# 7  Short offline       Completed without error       00%      4953         -
# 8  Short offline       Completed without error       00%      4952         -
# 9  Short offline       Aborted by host               00%      4952         -
#10  Short offline       Aborted by host               00%      4952         -
#11  Short offline       Completed without error       00%      4952         -
#12  Short offline       Aborted by host               00%      4951         -
#13  Short offline       Aborted by host               00%      4951         -
#14  Short offline       Aborted by host               00%      4951         -
#15  Short offline       Completed without error       00%      4951         -
#16  Short offline       Completed without error       00%      4951         -
#17  Short offline       Completed without error       00%      4950         -
#18  Short offline       Completed without error       00%      4950         -
#19  Short offline       Completed without error       00%      4950         -
#20  Short offline       Aborted by host               00%      4950         -
#21  Short offline       Completed without error       00%      4950         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

recuperation
Posts: 2719
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Windows partition damaged on M.2 SATA SSD after laptop failure

#4 Post by recuperation »

Code: Select all

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       100
179 Used_Rsvd_Blk_Cnt_Tot   0x0033   100   100   010    Pre-fail  Always       -       100
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033   100   100   010    Pre-fail  Always       -       100
181 Program_Fail_Cnt_Total  0x0033   100   100   010    Pre-fail  Always       -       100
182 Erase_Fail_Count_Total  0x0033   100   100   010    Pre-fail  Always       -       100
It appears unusual to me that those attributes all show a value of 100.

Locked