Re: RFC: disk geometry via sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 15 Feb 2006, Phillip Susi wrote:

> linux-os (Dick Johnson) wrote:
>> Heads start at 0. Sectors start at 1. Cylinders start at 0.
>> A "lower head" than allowed would be 0xff so the BIOS wouldn't
>> know it was "lower". The BIOS doesn't look at the MBR for
>> normal read/write access! Only while booting does it
>> read the first sector of the master boot record (MBR) into
>> the appropriate physical place (0x7c00). Then it checks to see
>> if there is an 0xaa55 as the last word in the sector. If so,
>> it executes code starting at offset zero. Modern BIOS don't
>> even check the "boot flag" because it may be wrong, preventing
>> a boot.
>>
>
> I'm talking about the geometry of the disk.  If the disk has 16 sectors
> and 8 heads, then the maximum value allowed for any valid address is 16
> in the sector field and 7 in the heads field.  This influences the
> translation to/from LBA.  A sector with LBA of 1234 would have a CHS
> address using this geometry of 9/5/3.  If the disk reports a geometry of
> x/8/16 but the bios is using a geometry of x/255/63, then when you pass
> 9/5/3 to int 13 it will fetch LBA 144902 which is clearly not going to
> give you what you wanted.
>

Wrong! The disk gets an OFFSET!  It doesn't care how that OFFSET
is obtained. That OFFSET is the sum of some variables. Some start
at 0 and some start at 1. The BIOS takes these PHONY things, without
checking to see if they "fit" in some pre-conceived notion of
"geometery" and sums them all up to make an OFFSET. The C/H/S
stuff started and ENDED with the ST-506 interface.  PERIOD.

[Snipped rest]


Cheers,
Dick Johnson
Penguin : Linux version 2.6.13.4 on an i686 machine (5589.66 BogoMips).
Warning : 98.36% of all statistics are fiction.
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux