Messages in this thread | | | Date | Wed, 20 Aug 2003 16:00:56 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: 48-bit Drives Incorrectly reporting 255 Heads? |
| |
On Wed, 20 Aug 2003, John Riggs wrote:
> With the 2.4.20 kernel, I have a 40GB disk with 240 heads, with 48-bit > mode enabled. The Linux ide driver automatically declares that anything [SNIPPED...]
> Two more specific questions are: > 1) Will this break drives > 137 GB? > 2) Why would the head count be set to 255 in the first place?
In the BIOS, in 'real-mode' the head to read/write is put into the DH register. This is an 8-bit register. Drives that can boot (they boot using interrupt 0x13 to read the drive), can't have more that 256 heads (0->255).
Heads = 8 bits = 256 Cylinders = 10 bits = 1024 Sectors = 6 bits = 64
You get large media by translating to a large bytes/sector number. If the "real" bytes/sector number is 256 this means that the largest size media one could use (to boot) is 256 * 1024 * 64 * 256 = 4,294,967,296 bytes. A 137 GB needs 137/4 ~= 35 times more than 256 = 8960 bytes per sector or more.
If you tell GRUB or LILO that the media has more than 256 heads, it won't (can't) write the boot tracks.
Cheers, Dick Johnson Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Note 96.31% of all statistics are fiction.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |