Re: Support HDIO_GETGEO on device-mapper volumes



Phillip Susi wrote:
Yes, I think this could also be fixed on grub's end. It seems that
fdisk assumes usable default values for the geometry but grub has
different defaults that cause it problems. I think that the defaults
could be modified in grub so that it will work when HDIO_GETGEO fails.

It would be better to make the decision once and for all, in one place.

It would be even better for the HDIO_GETGEO call to return the same
geometry that the BIOS uses, so that Grub is handed numbers that
actually mean *something*.

When 'dmraid' has assembled an array, it should find the matching BIOS
drive in /proc/bios/int13_dev* and then it should tell device-mapper
to present that geometry to whomever asks via HDIO_GETGEO.

And while we're at it, <some component> should do the same for eg.
/dev/hd?. It's very annoying trying to fix up a harddrive's partition
table when the numbers you see in Linux is different to the numbers
you'll see when rebooting into DOS, or Windows XP, or whatever it is
that's on the disk you're trying to fix.
-
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/



Relevant Pages

  • Re: GRUB Geom error
    ... I just executed /sbin/lilo (whether you use grub or lilo) and it should give ... you an error specifying a mismatch in geometry between the BIOS and Kernel. ... Then I setup Grub and used a switch to specify the geometry of the drive ...
    (alt.os.linux.suse)
  • Re: Support HDIO_GETGEO on device-mapper volumes
    ... fdisk assumes usable default values for the geometry but grub has ... could be modified in grub so that it will work when HDIO_GETGEO fails. ... I don't know that there would be any easy way for the kernel to know which BIOS drive corresponds to the device, and the device may be one that's not recognized by the BIOS at all and therefore has no BIOS device ... There were problems with this that surfaced sometime after the release of the 2.6 kernel, where installing Fedora Core 2 on a dual-boot system with Windows would render Windows unbootable. ...
    (Linux-Kernel)
  • Re: [PATCH] Support HDIO_GETGEO on device-mapper volumes
    ... when I setup my system on a dmraid controlled hardware fakeraid raid-0, I just gave grub a suitable geometry command since it couldn't auto detect it. ... grub shouldn't care about the geometry since that information has been obsolete for years. ... The attached patch implements a simple ioctl handler that supplies a compatible geometry when HDIO_GETGEO is called against a device-mapper device. ...
    (Linux-Kernel)
  • Re: GRUB Geom error
    ... > should give you an error specifying a mismatch in geometry between the ... Then I setup Grub and used a switch to specify the ... > geometry of the drive given by the lilo command (cannot remember which ...
    (alt.os.linux.suse)
  • Re: Grub problem on adding a new drive
    ... I was able to fix this by straighforward grub FAQ ... Windows expects to be in the first drive so the ... BTW my disk arrangements are ...
    (comp.os.linux.setup)