Bug#450951: grub can't get installed past 1TB
Samuel Thibault
samuel.thibault at ens-lyon.org
Mon Nov 12 17:03:38 UTC 2007
Samuel Thibault, le Mon 12 Nov 2007 16:24:34 +0000, a écrit :
> This is because the HDIO_GETGEO ioctl is limited to 65535 cylinders
> (i.e. ~1TB), and for bigger values Linux just returns 65535.
Or not. Documentation/ioctl/hdio.txt says:
Not particularly useful with modern disk drives, whose geometry
is a polite fiction anyway. Modern drives are addressed
purely by sector number nowadays (lba addressing), and the
drive geometry is an abstraction which is actually subject
to change. Currently (as of Nov 2004), the geometry values
are the "bios" values -- presumably the values the drive had
when Linux first booted.
In addition, the cylinders field of the hd_geometry is an
unsigned short, meaning that on most architectures, this
ioctl will not return a meaningful value on drives with more
than 65535 tracks.
The start field is unsigned long, meaning that it will not
contain a meaningful value for disks over 219 Gb in size.
I'd say that when lba is enabled (most probable with such disk anyway),
not check should be done at all on the geometry, notably
if (cylinder_offset >= geometry->cylinders)
return BIOSDISK_ERROR_GEOMETRY;
in stage2/bios.c
Samuel
More information about the Pkg-grub-devel
mailing list