Your message dated Mon, 08 Feb 2010 09:36:56 +0100
with message-id <[email protected]>
and subject line Re: Bug#568835: grub-install: incorrect handling of return 
value from grub-probe -t
has caused the Debian Bug report #568835,
regarding grub-install: incorrect handling of return value from grub-probe -t
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
568835: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568835
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: grub-common
Version: 1.96+20080724-16
Severity: important
Tags: patch

*** Please type your report below this line ***

During an installation, I had a problem with the grub step.
The system is going to be set up with the '/' partition on a
software raid device, /dev/md0. /boot will be within this partition.
But that's not really relevant to the bug in question.


I tried running grub-install manually from an installer shell:

  # chroot /target /usr/sbin/grub-install /dev/md0

and the program died with:
  Searching for GRUB installation directory ... found: /boot/grub
  grub-probe: error: no mapping exists for `md0'
  /usr/sbin/grub-install: line 374: [: =: unary operator expected


This appears to be occurring because of a comparison to a backticked
expression that can return a null or empty string:

  # On XFS, sync() is not enough.
  if [ `grub-probe -t fs ${grubdir}` = "xfs" ] ; then
    xfs_freeze -f ${grubdir} && xfs_freeze -u ${grubdir}
    # We don't have set -e.  If xfs_freeze failed, it's worth trying anyway,
    # maybe we're lucky.
  fi

The fix for this would appear to be this patch:

--- /usr/sbin/grub-install      2009-01-17 08:26:27.000000000 +1100
+++ /tmp/grub-install   2010-02-08 14:28:09.000000000 +1100
@@ -371,7 +371,7 @@
 sync

 # On XFS, sync() is not enough.
-if [ `grub-probe -t fs ${grubdir}` = "xfs" ] ; then
+if [ "`grub-probe -t fs ${grubdir}`" = "xfs" ] ; then
   xfs_freeze -f ${grubdir} && xfs_freeze -u ${grubdir}
   # We don't have set -e.  If xfs_freeze failed, it's worth trying
anyway,
   # maybe we're lucky.


This affects debian stable, and installation of debian stable.
It may affect later versions of grub-common, I have not checked.
It may not affect all installation instances, but it seems to affect
things in the case of root-on-raid.

Kind regards
Vince

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.iso88591 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-common depends on:
ii  base-files                  5lenny4      Debian base system
miscellaneous f
ii  libc6                       2.7-18lenny2 GNU C Library: Shared
libraries

grub-common recommends no packages.

Versions of packages grub-common suggests:
pn  multiboot-doc                 <none>     (no description available)

-- no debconf information






--- End Message ---
--- Begin Message ---
# The bug is actually in grub-legacy's grub-install.
reassign 568835 grub 0.97-47lenny2
fixed 568835 0.97-55
thanks
Am Montag, den 08.02.2010, 14:56 +1100 schrieb Vincent McIntyre:

> and the program died with:
>   Searching for GRUB installation directory ... found: /boot/grub
>   grub-probe: error: no mapping exists for `md0'
>   /usr/sbin/grub-install: line 374: [: =: unary operator expected
[...]
> 
> The fix for this would appear to be this patch:
> 
> --- /usr/sbin/grub-install      2009-01-17 08:26:27.000000000 +1100
> +++ /tmp/grub-install   2010-02-08 14:28:09.000000000 +1100
> @@ -371,7 +371,7 @@
>  sync
> 
>  # On XFS, sync() is not enough.
> -if [ `grub-probe -t fs ${grubdir}` = "xfs" ] ; then
> +if [ "`grub-probe -t fs ${grubdir}`" = "xfs" ] ; then
>    xfs_freeze -f ${grubdir} && xfs_freeze -u ${grubdir}
>    # We don't have set -e.  If xfs_freeze failed, it's worth trying
> anyway,
>    # maybe we're lucky.
> 
> 
> This affects debian stable, and installation of debian stable.
> It may affect later versions of grub-common, I have not checked.
> It may not affect all installation instances, but it seems to affect
> things in the case of root-on-raid.

Thanks, it's already fixed for squeeze. But maybe I should ask the RMs
if they accept a stable update for this since you're not the first one
who reported this for lenny after we fixed it already.

> Kind regards
> Vince


-- 
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer



--- End Message ---

Reply via email to