Gordon Matzigkeit <[EMAIL PROTECTED]> wrote: > >>>>> erich writes: > > e> FWIW, I came up with a technique some time ago to map from BIOS > e> numbers to device hardware using a set of evil/clever (depending > e> on your point of view ;) x86 hacks at boot time in GRUB and > e> reporting this to the OS (those who have read my old GRUB 0.5 > e> technical docs might be familiar with the discription). > > Is there an URL for your suggested techniques. Also, are you familiar > with Okuji's I/O port probing method (the `ioprobe DRIVE' builtin)? > It steps through the BIOS with a debugger, and discovers which I/O > ports are used during an INT 13 for the specified drive. > > Perhaps you can use some of its ideas. The method I proposed in my old GRUB docs (you can find it under "http://www.uruk.org/orig-grub/bios_mapping.txt") is twofold: #1) create a mapping based on data from the disks (a hash of a few sectors and the size, say). #2) create a VM86 virtual machine to run the BIOS in keeping track of I/O's, perhaps, depending on your point of view, virtualizing them completely and not actually allowing the command to run on the real hardware. Okuji's method is similar in principle to my method #2, and cleverly simpler to implement, but unfortunately AFAIK it won't work in general on some BIOSes, since you can't get total control of the interrupts/modes that way. For example, it crashes/reboots at least one I tried it on. The problem with method #1 is that it obviously will not create a unique mapping in some mirroring cases. The problem with method #2 is that it won't work for some cases running under emulators or on particularly weird BIOSes/hardware. I'm contemplating a 95% solution based on both of them which should account for nearly every case in practice. The goal is to make a way for GRUB to be able to, for all (nearly :(, it would be nice to be complete) cases, map to drives under OSes with real drivers and have your installer be able to completely hide the presence of BIOS device numbering from end-users. For experts, you'd keep the ability to use BIOS device numbering, but even then try to provide enough information in parts of the interface like the command-line to make it clear what disk is what under an OS. -- Erich Stefan Boleyn <[EMAIL PROTECTED]> http://www.uruk.org/ "Reality is truly stranger than fiction; Probably why fiction is so popular" _______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub