cgsecurity / testdisk

TestDisk & PhotoRec
https://www.cgsecurity.org/
GNU General Public License v2.0
1.55k stars 190 forks source link

Do not use CHS geometry on UEFI GPT disks #68

Closed Googulator closed 4 years ago

Googulator commented 4 years ago

GPT has no concepts corresponding to CHS disk geometry; it's exclusively LBA. I'm not aware of any GPT partitioning utility using cylinder alignment (maybe some early Itanium tools did, but encountering that is extremely unlikely; the GPT specification in fact was released long after IDE hard drives with virtual geometry became common), and have never in my practice seen anything other than power-of-2 alignment (usually 1MB) on GPT disks.

TestDisk should default to searching on megabyte boundaries on GPT disks (perhaps with an option for CHS, in case someone does come across an old Itanium HDD), and not display CHS-based messages, like "Analyse cylinder X/Y".

cgsecurity commented 4 years ago

TestDisk already searches on megabyte boundaries on GPT disks. Cylinder number are shorter than LBA address in messages, it's why they are sometimes used for display.

Googulator commented 4 years ago

My suggestion would be to display progress in megabytes on GPT disks.