Counting disk capacity using cylinder-head-sector model

See this answer where it's all authoritatively explained:

  • https://askubuntu.com/questions/25981/which-numbers-does-fdisk-show

In brief, CHS numbers do not have much value these days and are actually reverse-calculated from the actual capacity in bytes. That is, your disk capacity is actually 786432000 bytes. Let's calculate the number of cylinders for your case:

bytes       b/S   H     S    C
786432000 / 512 / 255 / 63 = 95.61157796451914

Now you must somehow get rid of a poor .6 of a cylinder and so you get:

C / H / S = 95 / 255 / 63

Obviously, the rounding error yields the wrong result going back to byte count. Your missing bytes riddle:

C                  S    H     b/S
0.61157796451914 * 63 * 255 * 512 = 5030399.999999992 ~ 5030400

In short - forget about CHS. Even more if you have a SSD. Unless you have a hydra SSD, you'll have a hard time counting how many heads it has anyway...