grub mysteries

Benjamin Scott bscott at ntisys.com
Sun Jan 9 13:53:01 EST 2005


On Sun, 9 Jan 2005, at 12:02am, macfisherman at gmail.com wrote:
> However, that's under Linux. When booting however, Grub sees something
> else. hd3 becomes hd1! hd1 becomes hd2!

  I realize your question has already been answered, but it might be helpful
(or at least interesting) to know the "why" behind it.

  The why is simple: The Linux kernel has almost no way of matching up the
devices it sees (via native drivers) with what the BIOS sees.  All it can do
is guess.  For simple cases (one or two hard drives, and a single disk/host
adapter), this almost always works out.  Once you start throwing other
things in the mix, though, it gets *really* messy.

  The IBM-PC BIOS has traditionally provided the FDPT (Fixed Disk Parameter
Table).  The FDPT provides a few bits of information, such as size and
geometry, on the first two BIOS fixed disks.  There is no standard way to
match FDPT entries to actual devices/controllers.  The kernel looks at the
FDPT and then tries to guess what the corresponding native devices are.  
Sometimes it will guess wrong, and the guess can change due to external
factors.

  More recently, the EDD (Enhanced Disk Drive) BIOS extension has provided a
way to for the BIOS to report more disks, larger disks, and which devices
correspond to which BIOS disks.  Recent kernels have EDD support, but not
much userland software does, and not all hardware/BIOSes do.

  I expect all these problems to be solved just in time for the BIOS to be
completely replaced by EFI, OpenBoot, or similar.  ;-)

  For more on this sorry state of affairs, check out the links at the end of
my recent post on partition tables.

-- 
Ben Scott <bscott at ntisys.com>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.              |




More information about the gnhlug-discuss mailing list