TestDisk reads past end of disk, drive fails Topic is solved

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
spenceee
Posts: 3
Joined: 01 Oct 2021, 07:42

TestDisk reads past end of disk, drive fails

#1 Post by spenceee »

If I use the analyse function, it tries to read past the end of the disk, this causes my USB HDD controller to fail and disconnect the disk. I can't reattach it.

Is there any way to load teh analysis in and simply use it? I have attached a log showing that I have a valid, readable partition, but I can't repair it because the disk fails. I have tried to restart the disk caddy and then proceed, but it won't allow me to continue. Is there anything I can do to recover partition 3?



Mon Oct 11 13:33:52 2021
Command line: TestDisk

TestDisk 7.2-WIP, Data Recovery Utility, September 2021
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Windows 8 (9200)
Compiler: GCC 11.2, Cygwin 3001.4
ext2fs lib: 1.45.3, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: 20140608, curses lib: ncurses 6.1
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive0)=256060514304
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive1)=1000204886016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\C:)=254666604544
Hard disk list
Disk \\.\PhysicalDrive0 - 256 GB / 238 GiB - CHS 31130 255 63, sector size=512 - Skhynix BC501 NVMe 256GB, S/N:842E_E4AC_B322_1F11., FW:80000C00
Disk \\.\PhysicalDrive1 - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ASMT ASMT105x, S/N:220987654321

Partition table type (auto): Intel
Disk \\.\PhysicalDrive1 - 1000 GB / 931 GiB - ASMT ASMT105x
Partition table type: Intel

Interface Advanced
Geometry from i386 MBR: head=191 sector=18
BAD_RS LBA=18 63
check_part_i386 1 type 42: no test
BAD_RS LBA=2048 7133
check_part_i386 2 type 42: no test
BAD_RS LBA=718848 3358656
check_part_i386 3 type 42: no test
check_part_i386 4 type 42: no test
1 P W2K Dynamic/SFS 0 0 19 0 32 32 2030
2 * W2K Dynamic/SFS 0 32 33 44 190 18 716800
3 P W2K Dynamic/SFS 44 190 19 121600 215 23 1952798720
4 P W2K Dynamic/SFS 121600 215 24 121601 48 31 5552
Change partition type:
3 P W2K Dynamic/SFS 44 190 19 121600 215 23 1952798720
Change partition type:
3 P NTFS 44 190 19 121600 215 23 1952798720


dir_partition inode=5
3 P W2K Dynamic/SFS 44 190 19 121600 215 23 1952798720
Directory /
5 dr-xr-xr-x 0 0 0 20-Sep-2019 07:30 .
5 dr-xr-xr-x 0 0 0 20-Sep-2019 07:30 ..
57 dr-xr-xr-x 0 0 0 6-Sep-2018 04:27 $Recycle.Bin
699 dr-xr-xr-x 0 0 0 14-Sep-2015 08:45 xxxx
91105 dr-xr-xr-x 0 0 0 5-May-2016 14:49 AppData
377555 dr-xr-xr-x 0 0 0 17-Sep-2019 08:53 Config.Msi
658978 dr-xr-xr-x 0 0 0 10-Jul-2015 22:21 Documents and Settings
123330 dr-xr-xr-x 0 0 0 13-Jan-2017 17:31 xxxx
219901 dr-xr-xr-x 0 0 0 9-Jun-2015 06:47 Intel
247434 dr-xr-xr-x 0 0 0 2-Aug-2016 23:38 LENOVO
169986 dr-xr-xr-x 0 0 0 11-Nov-2014 14:02 NVIDIA
5653 dr-xr-xr-x 0 0 0 17-Sep-2019 06:08 OneDrive
173936 dr-xr-xr-x 0 0 0 12-Apr-2018 09:38 PerfLogs
173937 dr-xr-xr-x 0 0 0 10-Jun-2018 18:44 Program Files
202143 dr-xr-xr-x 0 0 0 28-Aug-2019 05:33 Program Files (x86)
206410 dr-xr-xr-x 0 0 0 27-Jun-2018 10:30 ProgramData
272573 dr-xr-xr-x 0 0 0 9-Jun-2015 06:50 RaidTool
202211 dr-xr-xr-x 0 0 0 10-Jun-2018 08:47 Recovery
82075 dr-xr-xr-x 0 0 0 20-Sep-2019 05:31 System Volume Information
207485 dr-xr-xr-x 0 0 0 6-Sep-2018 04:26 Users
207627 dr-xr-xr-x 0 0 0 16-Sep-2019 06:09 Windows
1871 dr-xr-xr-x 0 0 0 26-Aug-2016 00:10 disclosure
54231 dr-xr-xr-x 0 0 0 20-Jan-2018 20:44 found.000
54236 dr-xr-xr-x 0 0 0 20-Jan-2018 20:44 found.001
54290 dr-xr-xr-x 0 0 0 20-Jan-2018 20:44 found.002
59417 dr-xr-xr-x 0 0 0 20-Jan-2018 20:44 found.003
59661 dr-xr-xr-x 0 0 0 20-Jan-2018 20:44 found.004
5000 dr-xr-xr-x 0 0 0 22-Jan-2018 19:26 found.005
12569 dr-xr-xr-x 0 0 0 22-Jan-2018 19:26 found.006
23209 dr-xr-xr-x 0 0 0 22-Jan-2018 19:26 found.007
25753 dr-xr-xr-x 0 0 0 22-Jan-2018 19:26 found.008
31298 dr-xr-xr-x 0 0 0 22-Jan-2018 19:26 found.009
84596 dr-xr-xr-x 0 0 0 23-Jan-2018 17:24 found.010
84619 dr-xr-xr-x 0 0 0 23-Jan-2018 17:24 found.011
84643 dr-xr-xr-x 0 0 0 23-Jan-2018 17:24 found.012
84646 dr-xr-xr-x 0 0 0 23-Jan-2018 17:24 found.013
84684 dr-xr-xr-x 0 0 0 23-Jan-2018 17:24 found.014
15088 dr-xr-xr-x 0 0 0 26-Jan-2018 05:12 found.015
38818 dr-xr-xr-x 0 0 0 26-Jan-2018 05:12 found.016
81954 dr-xr-xr-x 0 0 0 26-Jan-2018 05:12 found.017
82281 dr-xr-xr-x 0 0 0 26-Jan-2018 05:12 found.018
82284 dr-xr-xr-x 0 0 0 26-Jan-2018 05:12 found.019
55641 dr-xr-xr-x 0 0 0 28-Jan-2018 17:58 found.020
59791 dr-xr-xr-x 0 0 0 28-Jan-2018 17:58 found.021
59805 dr-xr-xr-x 0 0 0 28-Jan-2018 17:58 found.022
60147 dr-xr-xr-x 0 0 0 28-Jan-2018 17:58 found.023
60275 dr-xr-xr-x 0 0 0 28-Jan-2018 17:58 found.024
49978 dr-xr-xr-x 0 0 0 31-Jan-2018 08:31 found.025
53410 dr-xr-xr-x 0 0 0 31-Jan-2018 08:31 found.026
57324 dr-xr-xr-x 0 0 0 31-Jan-2018 08:31 found.027
65484 dr-xr-xr-x 0 0 0 31-Jan-2018 08:31 found.028
65485 dr-xr-xr-x 0 0 0 31-Jan-2018 08:31 found.029
65518 dr-xr-xr-x 0 0 0 1-Feb-2018 09:42 found.030
65757 dr-xr-xr-x 0 0 0 1-Feb-2018 09:42 found.031
66158 dr-xr-xr-x 0 0 0 1-Feb-2018 09:42 found.032
71071 dr-xr-xr-x 0 0 0 1-Feb-2018 09:42 found.033
74720 dr-xr-xr-x 0 0 0 1-Feb-2018 09:42 found.034
39039 dr-xr-xr-x 0 0 0 4-Feb-2018 16:00 found.035
65364 dr-xr-xr-x 0 0 0 4-Feb-2018 16:00 found.036
66886 dr-xr-xr-x 0 0 0 4-Feb-2018 16:00 found.037
69636 dr-xr-xr-x 0 0 0 4-Feb-2018 16:00 found.038
69753 dr-xr-xr-x 0 0 0 4-Feb-2018 16:00 found.039
17 dr-xr-xr-x 0 0 0 9-Feb-2018 09:06 found.040
1685 dr-xr-xr-x 0 0 0 25-Jan-2016 00:58 git
27765 dr-xr-xr-x 0 0 0 13-Apr-2016 07:46 java
15879 -r--r--r-- 0 0 0 1-Jun-2018 00:59 $WINRE_BACKUP_PARTITION.MARKER
78598 -r--r--r-- 0 0 1 30-Oct-2015 17:18 BOOTNXT
5653 -r--r--r-- 0 0 236 17-Sep-2019 06:08 OneDrive:${xxxxxx-redacted-xxxx}.SyncRootIdentity
1251036 -r--r--r-- 0 0 72 9-Feb-2018 09:06 bootTel.dat
18393 -r--r--r-- 0 0 398356 18-Mar-2014 20:05 bootmgr
111895 -r--r--r-- 0 0 5150294016 23-Dec-2019 22:28 hiberfil.sys
27794 -r--r--r-- 0 0 1946157056 17-Sep-2019 06:04 pagefile.sys
30568 -r--r--r-- 0 0 268435456 17-Sep-2019 06:04 swapfile.sys
252884 -r--r--r-- 0 0 166670 5-Dec-2015 06:30 winstatresults.xml

Analyse Disk \\.\PhysicalDrive1 - 1000 GB / 931 GiB - CHS 121601 255 63
Geometry from i386 MBR: head=191 sector=18
BAD_RS LBA=18 63
check_part_i386 1 type 42: no test
BAD_RS LBA=2048 7133
check_part_i386 2 type 42: no test
BAD_RS LBA=718848 3358656
check_part_i386 3 type 42: no test
check_part_i386 4 type 42: no test
Current partition structure:
1 P W2K Dynamic/SFS 0 0 19 0 32 32 2030

Bad relative sector.
2 * W2K Dynamic/SFS 0 32 33 44 190 18 716800

Bad relative sector.
3 P W2K Dynamic/SFS 44 190 19 121600 215 23 1952798720

Bad relative sector.
4 P W2K Dynamic/SFS 121600 215 24 121601 48 31 5552

search_part()
Disk \\.\PhysicalDrive1 - 1000 GB / 931 GiB - CHS 121601 255 63
FAT32 at 0/1/1
FAT1 : 32-896
FAT2 : 897-1761
start_rootdir : 1762 root cluster : 2
Data : 1762-112391
sectors : 112392
cluster_size : 1
no_of_cluster : 110630 (2 - 110631)
fat_length 865 calculated 865
set_FAT_info: name from BS used

FAT32 at 0/1/1
FAT: cluster=2(0x2), pos=1825
FAT32 0 1 1 6 254 63 112392
FAT32, blocksize=512, 57 MB / 54 MiB
NTFS at 44/190/19
filesystem size 1952798720
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 44 190 19 121600 215 23 1952798720
NTFS, blocksize=4096, 999 GB / 931 GiB
file_win32_pread(536,1,buffer,1953523727(121601/58/9)) read err: read after end of file
file_win32_pread(536,8,buffer,1953523968(121601/61/61)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524096(121601/63/63)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524224(121601/66/2)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524352(121601/68/4)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524480(121601/70/6)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524608(121601/72/8)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524736(121601/74/10)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524864(121601/76/12)) read err: read after end of file
file_win32_pread(536,8,buffer,1953524992(121601/78/14)) read err: read after end of file
file_win32_pread(536,8,buffer,1953525120(121601/80/16)) read err: read after end of file

get_geometry_from_list_part_aux head=255 nbr=2
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=1
get_geometry_from_list_part_aux head=255 nbr=2

At this point the drive has now failed, lights off on Disk Caddy
Results
* FAT32 0 1 1 6 254 63 112392
FAT32, blocksize=512, 57 MB / 54 MiB
P HPFS - NTFS 44 190 19 121600 215 23 1952798720
NTFS, blocksize=4096, 999 GB / 931 GiB
Failed to startup volume: Invalid argument.
Failed to startup volume: Invalid argument.
file_win32_pread(536,1,buffer,718848(44/190/19)) read err: read after end of file
Can't read exFAT boot sector.

P HPFS - NTFS 44 190 19 121600 215 23 1952798720
NTFS, blocksize=4096, 999 GB / 931 GiB
Can't open filesystem. Filesystem seems damaged.

interface_write()
1 * FAT32 0 1 1 6 254 63 112392
2 P HPFS - NTFS 44 190 19 121600 215 23 1952798720
simulate write!

write_mbr_i386: starting...
file_win32_pread(536,1,buffer,0(0/0/1)) read err: read after end of file

Partition: Read error
Store new MBR code
write_all_log_i386: starting...
No extended partition

TestDisk exited normally.

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

Re: TestDisk reads past end of disk, drive fails

#2 Post by cgrenier »

In command line, run "testdisk_win /safe".
If it doesn't work, connect the disk directly via SATA (assuming it's not a laptop...)
Good luck

spenceee
Posts: 3
Joined: 01 Oct 2021, 07:42

Re: TestDisk reads past end of disk, drive fails

#3 Post by spenceee »

Switched to a different Caddy which didn't crash when the disk was overread, was able to write the partition and recover it.

Thanks a million :) Great utility that works as advertised.

Locked