Debian Bug report logs - #498353
update-grub silently fails when device.map is not up to date

version graph

Package: grub; Maintainer for grub is GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>;

Reported by: Michal Čihař <nijel@debian.org>

Date: Tue, 9 Sep 2008 11:39:06 UTC

Severity: critical

Merged with 501306

Found in version grub/0.97-47

Fixed in version grub/0.97-47lenny1

Done: Robert Millan <rmh@aybabtu.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#498353; Package grub. Full text and rfc822 format available.

Acknowledgement sent to Michal Čihař <nijel@debian.org>:
New Bug report received and forwarded. Copy sent to Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Michal Čihař <nijel@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: update-grub silently fails when device.map is not up to date
Date: Tue, 09 Sep 2008 13:37:23 +0200
Package: grub
Version: 0.97-47
Severity: normal
File: /usr/sbin/update-grub

Hi

during some updates, I ended up with device.map not containing correct
mappings. In this situation update-grub silently fails without giving
any notice what is wrong. From tracing this script, I found it ends with
following commands:

+ test -e /boot/grub/device.map
+ GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=/boot/grub/device.map -t drive -d /dev/hda1
+ grub_root_device=

The problem was that I did not have mapping for hda in device.map (it
used to be hde in older kernel versions). I think update-grub should at
least tell that something is wrong and not silently fail.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com


-- Package-specific info:

*********************** BEGIN /boot/grub/device.map
(fd0)	/dev/fd0
(hd0)	/dev/hda
*********************** END /boot/grub/device.map

*********************** BEGIN /proc/mounts
/dev/hda5 / xfs rw,noquota 0 0
/dev/hda1 /boot ext3 rw,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/menu.lst

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub depends on:
ii  grub-common              1.96+20080724-9 GRand Unified Bootloader, version 
ii  libc6                    2.7-13          GNU C Library: Shared libraries
ii  libncurses5              5.6+20080830-1  shared libraries for terminal hand

grub recommends no packages.

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

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#498353; Package grub. Full text and rfc822 format available.

Message #8 received at 498353@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@aybabtu.com>
To: Michal Čihař <nijel@debian.org>, 498353@bugs.debian.org
Subject: Re: Bug#498353: update-grub silently fails when device.map is not up to date
Date: Tue, 9 Sep 2008 18:16:48 +0200
On Tue, Sep 09, 2008 at 01:37:23PM +0200, Michal Čihař wrote:
> Package: grub
> Version: 0.97-47
> Severity: normal
> File: /usr/sbin/update-grub
> 
> Hi
> 
> during some updates, I ended up with device.map not containing correct
> mappings. In this situation update-grub silently fails without giving
> any notice what is wrong. From tracing this script, I found it ends with
> following commands:
> 
> + test -e /boot/grub/device.map
> + GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=/boot/grub/device.map -t drive -d /dev/hda1
> + grub_root_device=
> 
> The problem was that I did not have mapping for hda in device.map (it
> used to be hde in older kernel versions). I think update-grub should at
> least tell that something is wrong and not silently fail.

What does the grub-probe command print when run from outside the script?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




Information forwarded to debian-bugs-dist@lists.debian.org, Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#498353; Package grub. Full text and rfc822 format available.

Acknowledgement sent to Michal Čihař <nijel@debian.org>:
Extra info received and forwarded to list. Copy sent to Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #13 received at 498353@bugs.debian.org (full text, mbox):

From: Michal Čihař <nijel@debian.org>
To: Robert Millan <rmh@aybabtu.com>
Cc: 498353@bugs.debian.org
Subject: Re: Bug#498353: update-grub silently fails when device.map is not up to date
Date: Tue, 9 Sep 2008 18:36:21 +0200
[Message part 1 (text/plain, inline)]
Hi

Dne Tue, 9 Sep 2008 18:16:48 +0200
Robert Millan <rmh@aybabtu.com> napsal(a):


> What does the grub-probe command print when run from outside the script?
> 

It shows an error:

error: cannot open `(null)'
grub-probe: error: Cannot find a GRUB drive for /dev/hda1.  Check your device.map.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#498353; Package grub. Full text and rfc822 format available.

Message #16 received at 498353@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@aybabtu.com>
To: Michal Čihař <nijel@debian.org>
Cc: 498353@bugs.debian.org
Subject: Re: Bug#498353: update-grub silently fails when device.map is not up to date
Date: Tue, 9 Sep 2008 19:05:30 +0200
On Tue, Sep 09, 2008 at 06:36:21PM +0200, Michal Čihař wrote:
> Hi
> 
> Dne Tue, 9 Sep 2008 18:16:48 +0200
> Robert Millan <rmh@aybabtu.com> napsal(a):
> 
> 
> > What does the grub-probe command print when run from outside the script?
> > 
> 
> It shows an error:
> 
> error: cannot open `(null)'
> grub-probe: error: Cannot find a GRUB drive for /dev/hda1.  Check your device.map.

Does the same happen with grub-common 1.96+20080724-10 ?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




Information forwarded to debian-bugs-dist@lists.debian.org, Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#498353; Package grub. Full text and rfc822 format available.

Acknowledgement sent to Michal Čihař <nijel@debian.org>:
Extra info received and forwarded to list. Copy sent to Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #21 received at 498353@bugs.debian.org (full text, mbox):

From: Michal Čihař <nijel@debian.org>
To: Robert Millan <rmh@aybabtu.com>
Cc: 498353@bugs.debian.org
Subject: Re: Bug#498353: update-grub silently fails when device.map is not up to date
Date: Tue, 9 Sep 2008 19:16:45 +0200
[Message part 1 (text/plain, inline)]
Dne Tue, 9 Sep 2008 19:05:30 +0200
Robert Millan <rmh@aybabtu.com> napsal(a):

> Does the same happen with grub-common 1.96+20080724-10 ?

Except for the null line, everything else is same:

# update-grub
Searching for GRUB installation directory ... found: /boot/grub
# grub-probe --device-map=/boot/grub/device.map -t drive -d /dev/hda1 
grub-probe: error: Cannot find a GRUB drive for /dev/hda1.  Check your device.map.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
[signature.asc (application/pgp-signature, attachment)]

Forcibly Merged 498353 501306. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Wed, 29 Oct 2008 16:09:10 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 22 Jan 2009 07:25:48 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 13:16:54 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.