Re: RFC: disk geometry via sysfs

From: Phillip Susi
Date: Thu Feb 16 2006 - 12:09:09 EST


linux-os (Dick Johnson) wrote:
I read it, and it's wrong. You don't bother to learn. I will
take one last hack at this and then drop it.

When a disk is first accessed, the BIOS reads the disk capacity.
That's all. This disk capacity is in 512-byte things called "sectors".


You don't bother to mention HOW it is wrong, so it appears it is you who fail to learn. I will attempt once more to explain. When you call int 13 and ask it for C = 3, H = 4, S = 5, exactly which sector you get depends very much on what the bios thinks the geometry of the disk is, because the bios will translate 3/4/5 into a completely different value before sending it to the drive. That translation is dependent entirely on which fake geometry the bios chooses to report the disk has.

I illustrated this translation and you simply say it is wrong. If that is the case then show how.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/