From: Jeff Sheinberg <[EMAIL PROTECTED]>
Subject: grub 0.5.93.1 failure to initialize root/geometry on (fd0)
Date: Wed, 2 Feb 2000 16:50:18 -0500 (EST)
> Grub will either report false information or go into an infinite
> loop when the disk media on (fd0) is physically changed.
Thanks for your detailed report. I think this problem is related to
the policy, when we should allow the user to exchange the media. If
the user takes off the media when GRUB is accessing to it, the user is
wrong, of course. But should we allow to take it off whenever the
prompt appears?
UNIX systems have the mount/umount system calls, so they don't have
to worry about the problem. In other systems which don't have the
"mount" facility, the solutions may be various. In MS-DOS, the disk
cache is flushed just before the command prompt is displayed. The UNIX
way can improve the performance dramatically, but the user needs to
think if the media is mounted. So probably the MS-DOS way is more
appropriate for GRUB, because the performance is not so important for
a boot loader. It could be much more important if it is easy to use.
As Erich said, the original code flushes the cache whenever getkey
is called. This is almost equivalent to flushing the cache when the
prompt is displayed, because GRUB does nothing anyway until the user
pushes the enter key. I don't know why Gordon discarded the code
exactly, but perhaps he misunderstood it since it is not
straightforward. It would be more appropriate to flush the cache after
(or before) any command is executed, I think. I don't intend to offend
either Gordon or Erich, but I hope that they could realize something
important through this issue. (You should write code that is easy to
understand, you should write comments as many as possible, you
shouldn't remove anything unless you are sure what you are doing,
etc.)
Cheers,
Okuji
----------------------------------------------------------------------
OKUJI Yoshinori <[EMAIL PROTECTED]> ^o-o^
http://duff.kuicr.kyoto-u.ac.jp/~okuji (in English) m /