Bug#282127: grub-install fails with "mismatched or corrupt version of stage1/stage2"

Craig Sanders Craig Sanders <cas@taz.net.au>, 282127@bugs.debian.org
Sat, 20 Nov 2004 06:26:13 +1100


Package: grub
Version: 0.95+cvs20040624-10

SYSTEM DETAILS:

laxmi:/boot# fdisk -l 

Disk /dev/hda: 4310 MB, 4310433792 bytes
255 heads, 63 sectors/track, 524 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           6       48163+  83  Linux
/dev/hda2               7          37      249007+  82  Linux swap / Solaris
/dev/hda3   *          38         524     3911827+  83  Linux

laxmi:/boot# cat /etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/dev/hda3       /               xfs     defaults                0       1
/dev/hda2       none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
/dev/fd0        /floppy         auto    user,noauto             0       0
/dev/cdrom      /cdrom          iso9660 ro,user,noauto          0       0
/dev/hda1       /boot           ext3    defaults                0       2

laxmi:/boot# uname -a
Linux laxmi 2.6.6 #1 Mon Jun 28 18:01:43 EST 2004 i686 GNU/Linux


PROBLEM DESCRIPTION:
--------------------

grub-install fails while trying to convert this system over from lilo.

the exact same problem has occured on 2 other systems that i have tried to
install grub on in the last few days.


laxmi:/boot# grub-install --no-floppy --recheck --grub-shell='/sbin/grub --read-only' /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
xfs_freeze: specified file ["/boot/grub"] is not on an XFS filesystem


    GNU GRUB  version 0.95  (640K lower / 3072K 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. ]
grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup  --stage2=/boot/grub/stage2 --prefix=/grub (hd0)
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install --stage2=/boot/grub/stage2 /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/menu.lst"... failed

Error 6: Mismatched or corrupt version of stage1/stage2
grub> quit




BTW, specificying "--root-directory=/boot" doesn't help....gets it even more
wrong, in fact (notice what it does with "stage2=/boot/boot/...").

laxmi:/boot# grub-install --no-floppy --recheck --root-directory=/boot --grub-shell='/sbin/grub --read-only' /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /boot/boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
xfs_freeze: specified file ["/boot/boot/grub"] is not on an XFS filesystem


    GNU GRUB  version 0.95  (640K lower / 3072K 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. ]
grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup  --stage2=/boot/boot/grub/stage2 --prefix=/boot/grub (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install --stage2=/boot/boot/grub/stage2 /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... failed

Error 6: Mismatched or corrupt version of stage1/stage2
grub> quit


 


-- 
craig sanders <cas@taz.net.au>           (part time cyborg)