Tools for hard drive diagnostics, repair, and data recovery
Post a reply

Sector 0

January 20th, 2007, 9:48

I noticed something odd. When I open my drive with for example Hex Workshop, it shows the first sector (on which the MBR is) as sector 0. I also read somwhere on the internet that the first sector on a HDD is sector 0.

However, when I send an ATA command to read sector 0, it returns with an error. If I send an ATA command to read sector 1, it returns with that MBR ! So I'm a bit confused here, should the first sector be numbered 0 or 1 ?

January 20th, 2007, 12:02

T13/1153D revision 18
Page 20
3) Logical sectors on the device shall be linearly mapped with the first LBA addressed sector (sector 0)
being the same sector as the first logical CHS addressed sector (cylinder 0, head 0, sector 1).
Irrespective of the logical CHS translation currently in effect, the LBA address of a given logical
sector does not change. The following is always true for LBA numbers less than or equal to
16,514,064 for devices supporting the current CHS translation:
LBA = ((cylinder *heads_ per_ cylinder +heads) *sectors_ per_ track) + sector -1

maybe you mixed the lba address with number of sectors or you are using chs mode

January 20th, 2007, 23:44

...most likely you forgot to switch to LBA mode in the sixth's register (the same register where you set master/slave) :D

January 21st, 2007, 10:16

I did, thanks for the replies, makes sense :D
Post a reply