All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: grub-devel@gnu.org
Subject: grub-probe fails during grub2 update (Debian)
Date: Sat, 19 Apr 2008 16:34:27 +0200	[thread overview]
Message-ID: <480A02F3.7000504@mail.berlios.de> (raw)
In-Reply-To: <20080418132858.GH29226@thorin>

Robert Millan wrote:
> On Fri, Apr 18, 2008 at 09:45:52PM +0200, Stefan Weil wrote:
>> grub-probe fails like this:
>>
>> # grub-probe --target=drive --device /dev/sdb1
>> grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your
>> device.map.
>>
>> # device.map is unchanged, see previous output
>
> Ah, right.  I'll see what you mean.  Maybe it'd be a good idea to start
> generating device.map dynamically; although this has other 
disadvantages...
>
> Could you bring this up in grub-devel@gnu.org?  I'd like to have it
> discussed in upstream.
>

Hi,

see below a test scenario of a grub2 update failure
which I had sent to Debian's bug tracking system
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467127).

The problem is caused by missing or invalid entries for
removable media (CDROM, DVD, USB flash devices with valid OS)
in device.map.

Missing entries can be caused by insertion of a flash medium.

Invalid entries remain after an OS installation from a boot DVD.

Regards
Stefan Weil





Extract from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467127


I should mention a point missing in my last mails which maybe is important:
the removable medium must contain a partition with an operating system.

Here is my test scenario (see comments) with system output and error
messages.

# PC with SATA harddisk, USB card reader, no CF or SD card inserted.

# grub-mkdevicemap
# cat /boot/grub/device.map
(hd0)   /dev/sda


# USB card reader, CF card now inserted.
# The CF card provides an EXT3 partition /dev/sdb1 with DEBIAN Linux.
# Reinstall latest grub-pc (gives same error like upgrade from older
version).

# LANG=C apt-get --reinstall install grub-pc
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not
upgraded.
Need to get 0B/1101kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
(Reading database ... 253220 files and directories currently installed.)
Preparing to replace grub-pc 1.96+20080413-1 (using
.../grub-pc_1.96+20080413-1_amd64.deb) ...
Unpacking replacement grub-pc ...
Setting up grub-pc (1.96+20080413-1) ...
Updating /boot/grub/grub.cfg ...
Found Debian background: debian-blueish-wallpaper-640x480.png
Found linux image: /boot/vmlinuz-2.6.24-1-amd64
Found initrd image: /boot/initrd.img-2.6.24-1-amd64
Found linux image: /boot/vmlinuz-2.6.22-3-amd64
Found initrd image: /boot/initrd.img-2.6.22-3-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found openSUSE 10.3 (i586) on /dev/sda5
Found Debian GNU/Linux (lenny/sid) on /dev/sda8
Found Debian GNU/Linux (4.0) on /dev/sdb1
dpkg: error processing grub-pc (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)



The failing command hierarchy is given here:

/var/lib/dpkg/info/grub-pc.postinst configure
-- /usr/sbin/update-grub
---- /etc/grub.d/30_os-prober
------ grub-probe --target=drive --device /dev/sdb1

grub-probe fails like this:

# grub-probe --target=drive --device /dev/sdb1
grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your
device.map.

# device.map is unchanged, see previous output






       reply	other threads:[~2008-04-19 14:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4807AA02.1020909@mail.berlios.de>
     [not found] ` <20080418132858.GH29226@thorin>
2008-04-19 14:34   ` Stefan Weil [this message]
2008-04-20 10:07     ` grub-probe fails during grub2 update (Debian) Robert Millan
2008-04-21 10:31       ` Pavel Roskin
2008-05-06 15:18         ` retiring device.map Robert Millan
2008-05-06 15:43           ` Pavel Roskin
2008-05-07 13:03             ` Robert Millan
2008-05-07 17:22               ` Pavel Roskin
2008-05-07 17:39                 ` Bean
2008-05-08 17:08                   ` Colin D Bennett
2008-05-09 12:51                   ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=480A02F3.7000504@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.