Bug#362028: Same problem with JFS

Raphael Champeimont (Almacha) almacha at almacha.org
Sat Aug 9 12:32:35 UTC 2008


found 362028 0.97-27etch1
thanks

I found this bug also happens when using JFS, ie:
grub-install fails on a newly formatted JFS partition

To reproduce:
1. Boot a debian etch system which has grub 0.97-27etch1
2. Format an unused partition using JFS (mkfs.jfs [partition])
3. grub-install [partition], it will fail
3. grub-install [partition] (same command again), it will *work*

The same idea can be tested against different FS.

The bug occurs when using:
- reiserfs
- jfs

The bug does NOT occur when using:
- ext3
- reiser4

Testing xfs makes no sense as it does not allow installing a bootloader
at the beginning of the partition.



Here is the output I get when making the test with JFS:
-------------------------------------------------------
serpent:~# mkfs.jfs /dev/hda2
mkfs.jfs version 1.1.11, 05-Jun-2006
Warning!  All data on device /dev/hda2 will be lost!

Continue? (Y/N) y
Format completed successfully.

8032500 kilobytes total disk space.
serpent:~# grub-install /dev/hda2
Searching for GRUB installation directory ... found: /boot/grub
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.97  (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,5)
 Filesystem type is jfs, partition type 0x83
grub> setup  --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0,1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/jfs_stage1_5" exists... yes
 Running "embed /boot/grub/jfs_stage1_5 (hd0,1)"...  16 sectors are
embedded.
succeeded
 Running "install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0,1)
(hd0,1)1+16 p (hd0,5)/boot/grub/stage2 /boot/grub/menu.lst"... failed

Error 6: Mismatched or corrupt version of stage1/stage2
grub> quit
serpent:~# grub-install /dev/hda2
Searching for GRUB installation directory ... found: /boot/grub
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
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)	/dev/hda
serpent:~#
-------------------------------------------------------

Almacha





More information about the Pkg-grub-devel mailing list