partition ends after the disk limits

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
Post Reply
Message
Author
abiyi
Posts: 8
Joined: 12 Oct 2018, 18:50

partition ends after the disk limits

#1 Post by abiyi » 12 Oct 2018, 20:57

Hi everyone! first post...

I've been trying unsuccessfully to restore a FAT32 partition in a Samsung STORY Station using TestDisk 7.0 on Debian GNU/Linux, but I only get the message "The following partitions can't be recovered", and "This partition ends after the disk limits." in the log file.

In first place I wanted to change the file system from FAT32 to NTFS, so I backed up up some directories with no problem to make room to create a NTFS partition. Everything was fine until I backed up the Pictures folder (93 GB), which required the use of rsync, many times. Because I noticed a 5 GB gap between the size of the source folder (FAT32) and the destiny folder (NTFS) I decided to run TestDisk to undelete the missing files. There the things went down: I restored a very old FAT32 partition with just a few video files and now the partition Audio (773 GB) and Video (853 GB) seems to be wiped out.

To make things worst I decided to follow the instructions of How to clean an MBR and recover drive partitions so I deleted the Boot Sector with GParted to write a new one... and decided to deleted both partitions: FAT32 and NTFS and somehow restore the old FAT32 partition with the Audio and Video folder... but now TestDisk cannot restore anything because a wrong geometry issue.

Code: Select all

Thu Oct 11 09:13:44 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.18.0-0.bpo.1-686-pae (#1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13)) i686
Compiler: GCC 6.3
ext2fs lib: 1.44.2, 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       976773168 sectors
/dev/sda: user_max   976773168 sectors
/dev/sda: native_max 976773168 sectors
/dev/sda: dco        976773168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - WDC WD5000BPVT-55HXZT4, S/N:WD-WXU1EB1MMHDW, FW:01.01A01
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - Samsung STORY Station

Partition table type default to Intel
Disk /dev/sdb - 2000 GB / 1863 GiB - Samsung STORY Station
Partition table type: Intel
New options :
 Dump : Yes
 Align partition: Yes
 Expert mode : Yes

Interface Advanced

Analyse Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
Current partition structure:
No partition is bootable

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
BAD_RS LBA=1311815976 5532187
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA            349006  29 56 522761 215 38 2791385776
This partition ends after the disk limits. (start=5606783272, size=2791385776, end=8398169047, disk end=3907029168)
BAD_RS LBA=3719113507 9528184
check_part_i386 failed for partition type 01
     FAT12                231504  27 47 467773 232 55 3795674409
This partition ends after the disk limits. (start=3719113507, size=3795674409, end=7514787915, disk end=3907029168)
NTFS at 225353/239/39
filesystem size           286717952
sectors_per_cluster       8
mft_lcn                   4
mftmirr_lcn               17919871
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS          225353 239 39 243201  78 13  286717952
     NTFS, blocksize=4096, 146 GB / 136 GiB
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 4299 GB / 4004 GiB)
The following partitions can't be recovered:
     FAT12                231504  27 47 467773 232 55 3795674409
     FAT32 LBA            349006  29 56 522761 215 38 2791385776

Results
   * HPFS - NTFS          225353 239 39 243201  78 13  286717952
     NTFS, blocksize=4096, 146 GB / 136 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 286717952 linear /dev/sdb 3620311040" | dmsetup create test0

interface_write()
 1 * HPFS - NTFS          225353 239 39 243201  78 13  286717952

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
BAD_RS LBA=1311815976 5532187
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 0C
     FAT32 LBA            349006  29 56 522761 215 38 2791385776
This partition ends after the disk limits. (start=5606783272, size=2791385776, end=8398169047, disk end=3907029168)
BAD_RS LBA=3719113507 9528184
check_part_i386 failed for partition type 01
     FAT12                231504  27 47 467773 232 55 3795674409
This partition ends after the disk limits. (start=3719113507, size=3795674409, end=7514787915, disk end=3907029168)
NTFS at 225353/239/39
filesystem size           286717952
sectors_per_cluster       8
mft_lcn                   4
mftmirr_lcn               17919871
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS          225353 239 39 243201  78 13  286717952
     NTFS, blocksize=4096, 146 GB / 136 GiB
NTFS at 243201/78/13
filesystem size           286717952
sectors_per_cluster       8
mft_lcn                   4
mftmirr_lcn               17919871
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS          225353 239 39 243201  78 13  286717952
     NTFS found using backup sector, blocksize=4096, 146 GB / 136 GiB
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 4299 GB / 4004 GiB)
The following partitions can't be recovered:
     FAT12                231504  27 47 467773 232 55 3795674409
     FAT32 LBA            349006  29 56 522761 215 38 2791385776

Results
   * HPFS - NTFS          225353 239 39 243201  78 13  286717952
     NTFS, blocksize=4096, 146 GB / 136 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 286717952 linear /dev/sdb 3620311040" | dmsetup create test0

interface_write()
 1 * HPFS - NTFS          225353 239 39 243201  78 13  286717952
simulate write!

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

TestDisk exited normally.
Now I'd would think that all those gigabytes of audio and video are lost forever... except that I haven't modify any data on that disk (besides the partition table in the boot sector, which I hope it haven't affect my data). I don't want to messing around with PhotoRec yet (every scanning of the 2TB hard disk takes around 8 hours, and I've run TestDisk on the Story Station too many times this week).

So, there's a solution to this monumental mess I've made?
changing the disk geometry could restore the FAT32 partition with the Video and Audio folders...? (I don't care about the NTFS with the Pictures folder).
snapshot_20181012_095731.png
snapshot_20181012_095731.png (44.11 KiB) Viewed 139 times
Last edited by abiyi on 16 Oct 2018, 02:45, edited 1 time in total.

Sponsored links

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

Re: partition ends after the disk limits

#2 Post by cgrenier » 13 Oct 2018, 08:36

Run TestDisk, in Geometry, set the number of heads to 16, Analyse, Quick Search, Stop, Deeper Search. Does it find your lost partitions ?

abiyi
Posts: 8
Joined: 12 Oct 2018, 18:50

Re: partition ends after the disk limits

#3 Post by abiyi » 15 Oct 2018, 13:25

Thanks for the replay!

Seems like the lost partitions are always visible, but can not be recovered... I changed the number of heads to 16, as you advised and after more than a day the result is basically the same:

Code: Select all

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 3876021 16 63

The harddisk (2000 GB / 1863 GiB) seems too small! (< 4299 GB / 4004 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partitions can't be recovered:
     Partition               Start        End    Size in sectors
>  FAT32 LBA            2035958  13 63 6044969   0  2 4041082209
   FAT12                3689596  11 47 7455146  11 55 3795674409
   FAT32                3758431  13 11 5180470  11 62 1433415238
   HPFS - NTFS          4330947  12 58 7849819   8 52 3547022719
   FAT32 LBA            5562284  15 56 8331516  14 38 2791385776






[ Continue ]
2069 GB / 1926 GiB
The duplicated partitions seems to be the result of the manual creation of another boot sector. Before that I did run another search changing partition table type from Intel to EFI GPT, but I stopped hours later of reading your replay. No writing was made under that setting.

Here is the whole testdisk.log:

Code: Select all

Sat Oct 13 14:24:58 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.18.0-0.bpo.1-686-pae (#1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13)) i686
Compiler: GCC 6.3
ext2fs lib: 1.44.2, 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       976773168 sectors
/dev/sda: user_max   976773168 sectors
/dev/sda: native_max 976773168 sectors
/dev/sda: dco        976773168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - WDC WD5000BPVT-55HXZT4, S/N:WD-WXU1EB1MMHDW, FW:01.01A01
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - Samsung STORY Station

Partition table type default to Intel
Disk /dev/sdb - 2000 GB / 1863 GiB - Samsung STORY Station
Partition table type: Intel
New geometry
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 3876021 16 63 sector_size=512

Analyse Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 3876021 16 63
Current partition structure:
No partition is bootable

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 3876021 16 63
BAD_RS LBA=2052246545 200462
check_part_i386 failed for partition type 0C
     FAT32 LBA            2035958  13 63 6044969   0  2 4041082209
This partition ends after the disk limits. (start=2052246545, size=4041082209, end=6093328753, disk end=3907029168)
Search for partition aborted
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 3876021 16 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 3119 GB / 2905 GiB)
The following partition can't be recovered:
     FAT32 LBA            2035958  13 63 6044969   0  2 4041082209

Results

interface_write()
 
No partition found or selected for recovery
I haven't close that TestDisk session, after day and half of hard disk scanning I want to wait for more instructions, what else can I do at this point?
The geometry error message keeps displaying over and over again, how can it be fixed the partition size in order to recover it?

abiyi
Posts: 8
Joined: 12 Oct 2018, 18:50

Re: partition ends after the disk limits

#4 Post by abiyi » 16 Oct 2018, 02:48

What would happens to the data in that hard disk if I create a FAT32 partition and then try to recover it...? Seems like I'm stuck in the middle of nowhere.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests