How do you guess disk geometry

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
Posts: 2
Joined: 31 Oct 2016, 16:29

How do you guess disk geometry

#1 Post by PPCP »

I am trying to recover data from a disk that had been improperly plugged into an external enclosing. When using testdisk (on entire disk), I've tried supplying several disk geometries.

If I change anything from the default geometry, testdisk detects it goes against what's written in my partitions, so I guess the default is OK. That is true except for number of cylinders.

How can I guess the correct number of disk cylinders? I've tried default value, some basic arithmetics to match disk size, and found no datasheet online (my disk is WD30EZRX, if you're luckier than me), with no results yet..

Sponsored links

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

Re: How do you guess disk geometry

#2 Post by cgrenier »

When using a raw disk image, no geometry information is available, so testdisk try to guess it using the partition table values.
Search autoset_geometry in ... hdaccess.c for details
Modern partionning tools creates partitions on 1-MB boundary and not anymore on cylinder boundary, so guessing right or wrong the original heads per cylinder and sectors per head has no impact.