bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Design Idea: Fixing BIOS device numbering!


From: erich
Subject: Design Idea: Fixing BIOS device numbering!
Date: Thu, 31 May 2001 10:39:40 -0700

All this talk about BIOS device numbering has me fired up...

Further discussion: (i.e., ignore if you want ;)

The authors of GRUB and LILO chose different tradeoffs.

LILO uses Linux-style device naming (though there is an override, just an
obscure one), but is still subject, at boot time, to the BIOS device
numbers.  It just guesses when you run "lilo" in Linux what they might be,
then hopes that when it runs it works.  If it breaks, it tends to just
"not work".

In writing the original GRUB and creating it's device naming scheme, I
went a different way because I used (and still use) many OSes equally
with Linux only being one of them.  Various OSes use random device naming
schemes, and I'm not sure which ones are better...  plus the BIOS device
numbers don't map to devices in a totally predictable way across all
BIOSes (grumble).

I think all will agree that mine is more clumsy to use in practice, or
even a barrier, for end-users and those not familiar with the BIOS boot
sequence (even though LILO really is a Linux-specific program, it's
install method can be really nifty on Linux).


FWIW, I came up with a technique some time ago to map from BIOS numbers to
device hardware using a set of evil/clever (depending on your point of
view ;) x86 hacks at boot time in GRUB and reporting this to the OS (those
who have read my old GRUB 0.5 technical docs might be familiar with the
discription.  I've been thinking about this some more, and now have what
I think is a Good Idea on how to do this.

Design Idea:

Chose a naming scheme for hardware devices similar to what Linux (something
like a shorter version of devfs-style, which is better than standard Linux
naming, IMO), and then create, at boot-time, a mapping between those names
and BIOS numbers that is internal to GRUB.

I.e. have GRUB *figure out* where in the BIOS chain a disk resides, and
perform the mapping internally, using the technique I have of figuring
out which disk maps to which hardware device.

Then, you just put what device you want in the GRUB config file (with
BIOS device overrides if you really want to use them), and don't worry
about where it is put in the BIOS device ordering.

Then we change the Multiboot format to have this information encoded in
an appropriate way (I have a few ideas), and when the OS boots up, it
can then figure out, with a minor tweak to the disk driver interface,
where most of these disks come from.

The one hitch to this is with devices like USB or the upcoming Infiniband,
but I'm hoping there would be some standard way for the drivers to chat
with the device to find out where it was at boot-time.


Comments?

--
    Erich Stefan Boleyn     <address@hidden>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]