Re: [PATCH] IDE disks show invalid geometries in /proc/ide/hd*/geometry

From: Mark Bellon
Date: Thu Aug 04 2005 - 12:03:14 EST


Jan Engelhardt wrote:

Simple: do not use BIOS values.
[ Yes, there should be some warning from kernel. ]



On that matter, I get a warning from LILO wrt cyls and stuff:

07:47 spectre:~ # cat /proc/ide/hda/geometry physical 16383/16/63
logical 65535/16/63
07:58 spectre:~ # lilo
Warning: Kernel & BIOS return differing head/sector geometries for device 0x80
Kernel: 65535 cylinders, 16 heads, 63 sectors
BIOS: 1023 cylinders, 255 heads, 63 sectors
Added linux *
07:59 spectre:~ # fdisk -l

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders


All of these numbers are virtual, since CHS is not really used anymore, as we know. But, which of these fake CHS values (16383/16/63 | 65535/16/63 | 1023/255/63) is the right one? 255/63/4982 is another matter, since it [almost] matches the actual size of the disk while the other three are just "for the bios".


This is exactly the case that my patch was attempting to fix (and apparently didn't get quite right).

Certain drive returns cause strange numbers to slip through often when LBA 28 is involved.

mark

-
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/