[clug] cfdisk

Algis Kabaila akabaila at pcug.org.au
Wed Jun 27 09:18:13 GMT 2007


is cfdisk buggy?  A newish amd64 PC has a 250 GB sata II hdd. 

cfdisk /dev/sda

returns the following information:

Disk size 250 058 268 160 bytes and cfdisk calls that 250 GB.  (We should 
add,manufacturer's GB)
Heads 255, sectors per track 63, cylinders 30 401.

Counting the number of 512 byte sectors, I get the size of
255 * 63 * 512 * 30401 = 250056737280

Either the size given by cfdisk is wrong, or the given number of sectors is 
wrong  or my arithmetic is wrong.  Which should I trust? 

I have "succeeded" in  causing serious software damage to my 250 GB drive and 
need to restore partitions, if possible. Unfortunately, cfdisk as well as 
parted require partition sizes in MBytes.  So the relation of the no of 
sectors and size in bytes is not just a sporting exercise.

Any suggestions?
Algis Kabaila (Dr)

More information about the linux mailing list