linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IDE disk information changed from 2.4 to 2.6
@ 2003-11-05 17:23 Flavio Bruno Leitner
  2003-11-05 17:29 ` Bartlomiej Zolnierkiewicz
  2003-11-11 11:46 ` Andries Brouwer
  0 siblings, 2 replies; 9+ messages in thread
From: Flavio Bruno Leitner @ 2003-11-05 17:23 UTC (permalink / raw)
  To: linux-kernel



Upgrading from kernel 2.4 to 2.6 the CHS information for the same hardware 
changed. This behaviour is correct? 

Using 2.4:
hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=784/255/63, UDMA (33)

Using 2.6:
hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=13328/15/63, UDMA (33)

regards,

-- 
Flávio Bruno Leitner <fbl@conectiva.com.br>
[ E74B 0BD0 5E05 C385 239E  531C BC17 D670 7FF0 A9E0 ]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-05 17:23 IDE disk information changed from 2.4 to 2.6 Flavio Bruno Leitner
@ 2003-11-05 17:29 ` Bartlomiej Zolnierkiewicz
  2003-11-05 17:57   ` Flavio Bruno Leitner
  2003-11-11 11:46 ` Andries Brouwer
  1 sibling, 1 reply; 9+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-11-05 17:29 UTC (permalink / raw)
  To: Flavio Bruno Leitner; +Cc: linux-kernel



On Wed, 5 Nov 2003, Flavio Bruno Leitner wrote:

> Upgrading from kernel 2.4 to 2.6 the CHS information for the same hardware

What are the exact kernel versions?

> changed. This behaviour is correct?

I am just investigating it.

> Using 2.4:
> hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=784/255/63, UDMA (33)
>
> Using 2.6:
> hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=13328/15/63, UDMA (33)
>
> regards,
>
> --
> Flávio Bruno Leitner <fbl@conectiva.com.br>
> [ E74B 0BD0 5E05 C385 239E  531C BC17 D670 7FF0 A9E0 ]


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-05 17:29 ` Bartlomiej Zolnierkiewicz
@ 2003-11-05 17:57   ` Flavio Bruno Leitner
  0 siblings, 0 replies; 9+ messages in thread
From: Flavio Bruno Leitner @ 2003-11-05 17:57 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

On Wed, Nov 05, 2003 at 06:29:07PM +0100, Bartlomiej Zolnierkiewicz wrote:
> 
> 
> On Wed, 5 Nov 2003, Flavio Bruno Leitner wrote:
> 
> > Upgrading from kernel 2.4 to 2.6 the CHS information for the same hardware
> 
> What are the exact kernel versions?

All versions up to 2.4.20 report the same information and 2.6 
is one snapshot from Linus bk 2003-10-29. 

I tested on another machine which the same chipset (but more recent
bk snapshot) and the behaviour is ok. I'm updating the kernel on 
the machine that reproduces this bug to see if happens again.


> > changed. This behaviour is correct?
> 
> I am just investigating it.

Thanks!


-- 
Flávio Bruno Leitner <fbl@conectiva.com.br>
[ E74B 0BD0 5E05 C385 239E  531C BC17 D670 7FF0 A9E0 ]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-05 17:23 IDE disk information changed from 2.4 to 2.6 Flavio Bruno Leitner
  2003-11-05 17:29 ` Bartlomiej Zolnierkiewicz
@ 2003-11-11 11:46 ` Andries Brouwer
  2003-11-11 12:13   ` Flavio Bruno Leitner
  2003-11-11 16:21   ` bill davidsen
  1 sibling, 2 replies; 9+ messages in thread
From: Andries Brouwer @ 2003-11-11 11:46 UTC (permalink / raw)
  To: Flavio Bruno Leitner; +Cc: linux-kernel

On Wed, Nov 05, 2003 at 03:23:10PM -0200, Flavio Bruno Leitner wrote:

> Upgrading from kernel 2.4 to 2.6 the CHS information for the same hardware 
> changed. This behaviour is correct? 
> 
> Using 2.4:
> hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=784/255/63, UDMA (33)
> 
> Using 2.6:
> hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=13328/15/63, UDMA (33)

Yes, correct in the sense that it is not wrong.
Probably your disk reports 15 and 2.4 invented 255.

CHS is something that stopped being meaningful a decade ago.
Today it is random garbage, to be ignored whenever possible.
Don't worry about CHS when you don't have problems.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-11 11:46 ` Andries Brouwer
@ 2003-11-11 12:13   ` Flavio Bruno Leitner
  2003-11-11 16:21   ` bill davidsen
  1 sibling, 0 replies; 9+ messages in thread
From: Flavio Bruno Leitner @ 2003-11-11 12:13 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: linux-kernel

On Tue, Nov 11, 2003 at 12:46:49PM +0100, Andries Brouwer wrote:
> On Wed, Nov 05, 2003 at 03:23:10PM -0200, Flavio Bruno Leitner wrote:
> 
> > Upgrading from kernel 2.4 to 2.6 the CHS information for the same hardware 
> > changed. This behaviour is correct? 
> > 
> > Using 2.4:
> > hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=784/255/63, UDMA (33)
> > 
> > Using 2.6:
> > hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=13328/15/63, UDMA (33)
> 
> Yes, correct in the sense that it is not wrong.
> Probably your disk reports 15 and 2.4 invented 255.
> 
> CHS is something that stopped being meaningful a decade ago.
> Today it is random garbage, to be ignored whenever possible.
> Don't worry about CHS when you don't have problems.

Parted was complaining about this change but I still have to check with 
version of parted they used. Anyway, it's booting and working normaly.

Regards,

-- 
Flávio Bruno Leitner <fbl@conectiva.com.br>
[ E74B 0BD0 5E05 C385 239E  531C BC17 D670 7FF0 A9E0 ]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-11 11:46 ` Andries Brouwer
  2003-11-11 12:13   ` Flavio Bruno Leitner
@ 2003-11-11 16:21   ` bill davidsen
  1 sibling, 0 replies; 9+ messages in thread
From: bill davidsen @ 2003-11-11 16:21 UTC (permalink / raw)
  To: linux-kernel

In article <20031111114649.GA16163@win.tue.nl>,
Andries Brouwer  <aebr@win.tue.nl> wrote:
| On Wed, Nov 05, 2003 at 03:23:10PM -0200, Flavio Bruno Leitner wrote:
| 
| > Upgrading from kernel 2.4 to 2.6 the CHS information for the same hardware 
| > changed. This behaviour is correct? 
| > 
| > Using 2.4:
| > hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=784/255/63, UDMA (33)
| > 
| > Using 2.6:
| > hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=13328/15/63, UDMA (33)
| 
| Yes, correct in the sense that it is not wrong.

  I'll remember that phrase, interesting way to put it.

| Probably your disk reports 15 and 2.4 invented 255.

Almost looks as if the BIOS is using the faked values to keep the
cylinders < 1024 to make the old BIOS calls work, and the 2.6 init is
looking at the real geometry of the device (in the sense of "what the
device itself reports, of course).
| 
| CHS is something that stopped being meaningful a decade ago.

Unfortunately while this is true at the kernel level, applications do
use it. The ones of interest to most people are parted (as noted) and
fdisk. Changing the values will make them whine, and may actually cause
malfunction.

| Today it is random garbage, to be ignored whenever possible.
| Don't worry about CHS when you don't have problems.

In general the BIOS should be told to report drive size in
non-translated values, using LBA or LARGE or similar options depending
on the BIOS. I suspect this was not done prior to the initial install.
And if this machine dual boots you really don't want to change it now!

The CHS can be set on the boot line. I haven't used this in years, so I
have no idea if that still works or even exists. 

You can also go into the expert menu of fdisk and change the values
used there. Another thing I haven't done in ages, but the commands to
do so are still present. This mainly allows you to avoid "partition
does not start on a track boundary" warnings.

As you note, most of this is better not used, but it might have been
better to try the boot time setting of CHS before using parted, just to
avoid possible problems, *but I certainly wouldn't do that now*.

It seems parted doesn't handle Win/XP partitions, which is too bad,
since adding Linux to commercial laptops was the most frequent use I
made of it. Perhaps there's a newer version, I haven't looked in some
months.

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-11 11:53   ` Andries Brouwer
@ 2003-11-11 18:29     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 9+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-11-11 18:29 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: Flavio Bruno Leitner, linux-kernel

On Tuesday 11 of November 2003 12:53, Andries Brouwer wrote:
> On Wed, Nov 05, 2003 at 08:41:58PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > In 2.6.x it doesn't even read BIOS info (which is wrong IMO, it should
> > do this but only as last resort - if partition can't be mounted).
>
> How can reading information that is not used by any kernel
> help in mounting a partition?

You are of course right, only ibm.c and nec98.c use HDIO_GETGEO.

> > Difference in CHS translation should matter only if you have some old DOS
> > partitions created using CHS information.  Then you can force geometry
> > using boot parameter "hd?=".  Unfortunately I've seen recently bugreport
> > when 2.4.20 (?) works and 2.6.x fails even with forced geometry.
>
> Fails? What do you mean?

Sorry, it was "hd.c instead of ide.c" problem.

> (Are you referring to the problem of finding the last cylinder?)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
  2003-11-05 19:41 ` Bartlomiej Zolnierkiewicz
@ 2003-11-11 11:53   ` Andries Brouwer
  2003-11-11 18:29     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 9+ messages in thread
From: Andries Brouwer @ 2003-11-11 11:53 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Flavio Bruno Leitner, linux-kernel

On Wed, Nov 05, 2003 at 08:41:58PM +0100, Bartlomiej Zolnierkiewicz wrote:

> In 2.6.x it doesn't even read BIOS info (which is wrong IMO, it should
> do this but only as last resort - if partition can't be mounted).

How can reading information that is not used by any kernel
help in mounting a partition?

> Difference in CHS translation should matter only if you have some old DOS
> partitions created using CHS information.  Then you can force geometry
> using boot parameter "hd?=".  Unfortunately I've seen recently bugreport
> when 2.4.20 (?) works and 2.6.x fails even with forced geometry.

Fails? What do you mean?

(Are you referring to the problem of finding the last cylinder?)

Andries


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IDE disk information changed from 2.4 to 2.6
       [not found] <20031105184203.GG5304@conectiva.com.br>
@ 2003-11-05 19:41 ` Bartlomiej Zolnierkiewicz
  2003-11-11 11:53   ` Andries Brouwer
  0 siblings, 1 reply; 9+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-11-05 19:41 UTC (permalink / raw)
  To: Flavio Bruno Leitner; +Cc: linux-kernel


On Wed, 5 Nov 2003, Flavio Bruno Leitner wrote:

> On Wed, Nov 05, 2003 at 06:29:07PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > On Wed, 5 Nov 2003, Flavio Bruno Leitner wrote:
> > > Using 2.4:
> > > hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=784/255/63, UDMA (33)
> > >
> > > Using 2.6:
> > > hda: 12594960 sectors (6449 MB) w/2048KiB Cache, CHS=13328/15/63, UDMA (33)
>
> The line with CHS=784/255/63 is LBA and CHS=13328/15/63 is NORMAL.
>
> Where kernel check to see if is LBA or NORMAL? BIOS? Which line is correct?

Nowhere, kernel uses LBA whenever possible.

In 2.6.x it doesn't even read BIOS info (which is wrong IMO, it should
do this but only as last resort - if partition can't be mounted).

Difference in CHS translation should matter only if you have some old DOS
partitions created using CHS information.  Then you can force geometry
using boot parameter "hd?=".  Unfortunately I've seen recently bugreport
when 2.4.20 (?) works and 2.6.x fails even with forced geometry.

--bartlomiej


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-11-11 18:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-05 17:23 IDE disk information changed from 2.4 to 2.6 Flavio Bruno Leitner
2003-11-05 17:29 ` Bartlomiej Zolnierkiewicz
2003-11-05 17:57   ` Flavio Bruno Leitner
2003-11-11 11:46 ` Andries Brouwer
2003-11-11 12:13   ` Flavio Bruno Leitner
2003-11-11 16:21   ` bill davidsen
     [not found] <20031105184203.GG5304@conectiva.com.br>
2003-11-05 19:41 ` Bartlomiej Zolnierkiewicz
2003-11-11 11:53   ` Andries Brouwer
2003-11-11 18:29     ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).