Bug#467127: post-install fails with grub-probe: error: Cannot get the real path of `/dev/sda'

Stefan Weil weil at mail.berlios.de
Fri Apr 18 19:45:52 UTC 2008


Robert Millan schrieb:
> Please copy-paste the exact command and error you get.

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






More information about the Pkg-grub-devel mailing list