On Sun, Feb 15, 2004 at 06:44:47PM +0100, Wolf Lammen wrote: > C. Bugs > If all the above went good, I would say 'wow', but, sadly, that is sometimes > not the case. Especially with old hardware, there are some issues that I > think need refining. The weak point is the 3. probing strategy, the floppy > probing. IMHO, the current implementation renders this strategy useless (there > might be > some relation to Bug #482). So either remove it completely, or activate it > in a correct fashion. > What goes wrong here, is a misunderstanding of BIOS call INT 0x13, function > 8. This call is used to retrieve the geometry of a drive. The drive and not > the inserted media. So, if the capabilities of a drive and media differ (a > 1.44 MB floppy in a 2.88 MB drive), GRUB currently uses a wrong geometry to > access the floppy disk. > Further on, GRUB invokes the floppy probing only, if the above BIOS call > returns an error. I admit, I do not understand why it is programmed that way. > The call might fail for two reasons: the drive is not accessible by BIOS, or > the battery of the CMOS RAM is exhausted, so the parameters of the drive could > not be read. But in either case, how could reading from a floppy succeed at > all, and floppy probing could help out? > Fortunately, modern computers are not that susceptible to this bug. First, > the number of computers without floppy drive is growing. Second, modern floppy > drives or modern BIOSes, whatever is responsible for the following effect, > seems to abstract from the real format of a floppy. I was really surprised to > see both my drives accessing a more than 10 years old 720 KB floppy using the > geometry of a 1.44 MB disk and assuming a track size of 18 sectors! And they > succeeded! I knew for sure it was formatted according to the then standard > with 9 sectors/track, and I made sure, this value was written on the disk > label as well. With such a drive the above bug does not show up, of course. > Third, a normal GRUB installation of stage 1 and stage 1.5 fits completely > into 18 sectors, so with nowadays diskettes and drives you do not reach into > the critical area beyond the first track. > However, it's still a bug and should be dealt with. I would like to hear > some opinions on this subject.
I think this bug isn't causing any trouble because most people use 1.44 floppies in a 1.44 floppy drive today. But it is a bug and should be fixed. I think the right fix is to move the jump to floppy_probe to just after chs_mode. What do you think? > D. Software Design > Some of the complexity of stage 1 could be put down to the fact that it is > designed as an allrounder. Whether you use it on a hard disk or on a floppy > disk does not matter at all. This was convenient at times when there were only > two media types bootable. You simply copy the boot track from a floppy > disk to a hard disk, and all works fine. > But this concept is broken for quite some time already. First, you see > plenty of other bootable media such as a CD-ROM. Second, because of BIOS bugs, > GRUB already patches stage 1 when it loads it onto a hard drive, so simple > copying won't work any more already. > In addition, the tight memory restrictions do not allow for more BIOS bug > workarounds or enhancements of drives. > So, why not step back from this concept and create dedicated stage 1s. The > installer uses out of a pool the one suiting the destination media. Since the > code could be stream-lined, more functionality and richer error diagnosis > could be provided. For instance, a floppy stage 1 could deal with various > special formats. A hard disk stage 1 does not die any more, if an ECCcorrected load > occurs. And so on. > Using such a 'plugable' stage 1 concept requires a redesign of the current > stage1/stage1.5 interface. IMHO, the current protocol between both stages > looks a bit strange. Stage 1.5 knows too much about the interior of stage 1, and, > since stage 1 has a loader built in, a loading service should be provided > to other stages. > I'd like to hear some opinions to this too. I see what you mean, but GRUB 0.94 is in maintaince mode now. But with GRUB 2 it's a good time to redesign stage 1. I think splitting it up in stage1s for floppy, hard disk and (eventually) CDs is a good idea. -- Jeroen Dekkers _______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
