Grub will either report false information or go into an infinite
loop when the disk media on (fd0) is physically changed.

I discovered this error after booting grub, but it can also be
duplicated using the grub shell.

Once grub has reported the root device on an ext2fs or an msdos
fs on (fd0), and then the diskette in (fd0) is switched to an ffs
diskette, the loop will occur doing file name completion.  If file
name completion is not attempted, then issueing the root or
geometry command on the switched diskette will just print improper
information.

If the original diskette contained an ffs, then issueing a root or
geometry command after switching the diskette, works properly, ie,
grub always re-reads the diskette in order to perform the command.

However, once a diskette containing an ext2 or msdos fs is read
using the root or geometry command, then this incorrect behavior
occurs. 

Here is an annotated typescript,

    5 jsroot ~ # grub

Probe devices to guess BIOS drives. This may take a long time.

    GRUB  version 0.5.93.1  (640K lower / 4096K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.  ESC at any time exits. ]

grub> geometry (fd0)
drive 0x0: C/H/S = 80/2/18, The number of sectors = 2880, /dev/fd0
[BSD sub-partitions immediately follow]
     BSD Partition num: 'c',  Filesystem type is ffs, using whole disk
# Original diskette is ffs.

grub> root (fd0)
 Filesystem type is ffs, using whole disk
# Root command performed properly, fd access light comes on.

grub> root (fd0)
 Filesystem type is ffs, using whole disk
# Again, root command performed properly, fd access light comes on.

grub> root (fd0)
 Filesystem type is ext2fs, using whole disk
# Switch diskette to ext2fs, again ok, fd access light comes on.

grub> root (fd0)
 Filesystem type is ext2fs, using whole disk
# Switch diskette to ffs, incorrect info printed, no fd access light.

grub> root (fd0)
 Filesystem type is ext2fs, using whole disk
# Same ffs diskette, again incorrect info printed, no fd access light.

grub> root (fd0)/
# Same ffs diskette, request completion, infinite loop, fd access
# light is on.
# ^C


Thanks,
-- 
Jeff Sheinberg  <[EMAIL PROTECTED]>

Reply via email to