Error: size boot_sector bigger than the partition size

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
avert
Posts: 2
Joined: 06 Sep 2018, 21:20

Error: size boot_sector bigger than the partition size

#1 Post by avert »

Hello,

I have accidentally deleted the only partition in my Western Digital external hard disk drive, which was password protected at the time. Its capacity is 4 TB. I had never changed its partition table before. When I noticed that this terrible mistake, I have disabled password protection and run Testdisk on this disk.

This was the first analyse result:

Code: Select all

Partition table type (auto): Intel
Disk /dev/sdb - 4000 GB / 3725 GiB - WD My Passport 25E2
Partition table type: Intel

Analyse Disk /dev/sdb - 4000 GB / 3725 GiB - CHS 486397 255 63
Geometry from i386 MBR: head=255 sector=63
check_part_i386 1 type EE: no test
Current partition structure:
 1 P EFI GPT                  0   0  2 267349  89  4 4294967295

Bad sector count.
No partition is bootable

search_part()
Disk /dev/sdb - 4000 GB / 3725 GiB - CHS 486397 255 63
NTFS at 0/32/33
filesystem size           7813965824
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS              0  32 33 486397   1  4 7813965824
     NTFS, blocksize=4096, 4000 GB / 3725 GiB

Results
   * HPFS - NTFS              0  32 33 486397   1  4 7813965824
     NTFS, blocksize=4096, 4000 GB / 3725 GiB
Testdisk found the partition after a quick search, I've checked file list, it seemed okay, so I made it write the partition to the disk.

However, after a reboot, I noticed that not Windows nor Linux (debian) can mount this drive. Windows says it is not formatted, and Linux gives this detailed error message:

Code: Select all

Unable to access "My Passport"

Error mounting /dev/sdb1 at /media/username/My Passport: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sdb1" "media/username/My Passport" exited with non-zero exit status 1: Failed to read last sector (7813965822): Invalid argument"
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
or it was not setup correctly (e.g. by not using mdadm --build ...),
or a wrong device is tried to be mounted,
or the partition table is corrupt (NTFS size is not valid).
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
Then I run the Testdisk again. This time it showed the following when I analysed the disk:

Code: Select all

Partition table type (auto): Intel
Disk /dev/sdb - 4000 GB / 3725 GiB - WD My Passport 25E2
Partition table type: Intel

Analyse Disk /dev/sdb - 4000 GB / 3725 GiB - CHS 486397 255 63
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/32/33
Error: size boot_sector 7813965824 > partition 4294967295
check_part_i386 failed for partition type 07
Current partition structure:
[b]Error: size boot_sector 7813965824 > partition 4294967295[/b]
Invalid NTFS or EXFAT boot
 1 * HPFS - NTFS              0  32 33 267349 121 35 4294967295
 1 * HPFS - NTFS              0  32 33 267349 121 35 4294967295

search_part()
Disk /dev/sdb - 4000 GB / 3725 GiB - CHS 486397 255 63
NTFS at 0/32/33
filesystem size           7813965824
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS              0  32 33 486397   1  4 7813965824
     NTFS, blocksize=4096, 4000 GB / 3725 GiB

Results
   * HPFS - NTFS              0  32 33 486397   1  4 7813965824
     NTFS, blocksize=4096, 4000 GB / 3725 GiB
Also here is the file list from testdisk.log.

I am not sure what to do next. How can I fix this problem without losing my data, please?

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

Re: Error: size boot_sector bigger than the partition size

#2 Post by cgrenier »

As your disk is bigger than 2 TB, use EFI GPT instead of PC Intel when searching for your partition.

avert
Posts: 2
Joined: 06 Sep 2018, 21:20

Re: Error: size boot_sector bigger than the partition size

#3 Post by avert »

It worked! cgrenier, you are a hero. This is the second time you & your software saved my data. I will make another donation for this. Thank you!

Locked