How do you guess disk geometry

How to use TestDisk to recover lost partition
Post Reply
Message
Author
PPCP
Posts: 2
Joined: 31 Oct 2016, 16:29

How do you guess disk geometry

#1 Post by PPCP » 31 Oct 2016, 16:46

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
cgrenier
Site Admin
Posts: 3813
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: How do you guess disk geometry

#2 Post by cgrenier » 01 Nov 2016, 08:37

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 https://git.cgsecurity.org/cgit/testdis ... 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests