From: Ric Wheeler on
On 03/16/2010 06:21 PM, H. Peter Anvin wrote:
> The only reason I see to care about CHS at all is that there are systems in the field which can only boot from USB in CHS mode, and which often look at the MBR partition table to guess the geometry. Of course, some then *report* the detected geometry but don't *use* the detected geometry...
>
>

These systems, given the changes in modern microsoft releases, must be
doomed even without any effort on our part.

I still think that we should work to make this ancient stuff disappear &
help force the legacy edge cases to modernize. It has been some huge
amount of time since storage vendors pretty much abandoned CHS (15
years? 20?) :-)

ric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Bill Davidsen on
Tejun Heo wrote:
> On 03/17/2010 12:02 AM, James Bottomley wrote:
>> On Tue, 2010-03-16 at 23:50 +0900, Tejun Heo wrote:
>>> e.g. If the first partition begins at CHS 0/32/33 and ends at
>>> 12/233/19 and the corresponding LBA addresses are 2048 and 206848, you
>>> can solve the equation and determine that the parameters gotta be 63
>>> secs/trk and 255 heads/cyl to make those two pairs of addresses match
>>> each other and in fact some BIOSs try to do this depending on
>>> configuration (and sometimes falls into infinite loop or causes other
>>> boot related problems if the parameters are too uncommon).
>> for an msdos label, this is illegal, that was Arnd's point. The
>> partitions have to begin and end on cylinder boundaries*. Knowing that,
>> you can deduce the geometry from the last sector entry.
>>
>> * at least if you want to preserve windows compatibility, which is what
>> most of our partitioning tools seem to do.
>
> Well, the thing is that
>
> * Anything remotely modern (>= XP) doesn't give a hoot about cylinder
> alignment.
>
> * Anything older (<= 2000) is very likely to get confused with custom
> geometry starting from the BIOS itself. For those cases, the only
> thing we can do is aligning partitions to cylinders abiding BIOS
> supplied geometry parameters which will usually be 255/63.
>
> So, using custom geometry doesn't help compatibility at all.
>
I think you hit on the real culprit and ignored it, it seems that even modern
BIOS implementations, at least some of them, do not want to cross a cylinder
boundary doing boot. Or maybe that's dumb MBR code, which at least has the
excuse of being size limited.

I did try using 48 sector geometry on a virtual drive, and it seems as though
both Linux and XP will install. Then I tried on a USB stick and the BIOS in
several old Asus laptops will boot that.

I cautiously suggest that since nothing past boot used chs, and using 48 spt
seems to work and gives correct alignment, perhaps there is value in custom
geometry.

--
Bill Davidsen <davidsen(a)tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on
On 03/17/2010 08:08 AM, Ric Wheeler wrote:
> On 03/16/2010 06:21 PM, H. Peter Anvin wrote:
>> The only reason I see to care about CHS at all is that there are
>> systems in the field which can only boot from USB in CHS mode, and
>> which often look at the MBR partition table to guess the geometry. Of
>> course, some then *report* the detected geometry but don't *use* the
>> detected geometry...
>
> These systems, given the changes in modern microsoft releases, must be
> doomed even without any effort on our part.
>
> I still think that we should work to make this ancient stuff disappear &
> help force the legacy edge cases to modernize. It has been some huge
> amount of time since storage vendors pretty much abandoned CHS (15
> years? 20?) :-)
>

I wish. This is mostly systems from the first half of the 2000's
timeframe. There was a *huge* regression when BIOS vendors started
doing USB boot; almost all of them introduced major bugs at that time;
in many cases they still haven't been fixed.

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