Bug#511587: grub: update-grub fails on Xen DomU with no whole block device

Mark Round mark.round at gmail.com
Mon Jan 12 14:14:06 UTC 2009


Package: grub
Version: 0.97-47lenny1
Severity: important

I have a number of Xen DomUs running Debian Etch. These have been created
using xen-tools, and do not have a whole block device assigned to them.

As an example, I have /dev/sda1 as root and /dev/sda2 as swap, but no
/dev/sda :

lenny-domu:~# ls /dev/sda*
/dev/sda1  /dev/sda2

And the relevant lines from the Xen cfg in the Dom0:

disk        = [
                  'phy:/dev/xenimages/lenny-root,sda1,w',
                  'phy:/dev/xenimages/lenny-swap,sda2,w',
              ]

I have the DomUs booting using pygrub, so I install grub and the relevant
linux-image packages. This means I can manage the kernel packages on the
DomU itself, which is particularly useful when the Dom0 is not a Debian
system.

Under Debian Etch, this arrangement works perfectly. However, when I
did an dist-upgrade to Lenny, the kernel-image upgrade breaks :

Unpacking linux-image-2.6.26-1-xen-686 (from
.../linux-image-2.6.26-1-xen-686_2.6.26-12_i386.deb) ...
Setting up linux-image-2.6.26-1-xen-686 (2.6.26-12) ...
update-initramfs: Generating /boot/initrd.img-2.6.26-1-xen-686
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/sda1.
grub-probe: error: Cannot find a GRUB drive for /dev/sda1.  Check your
device.map.

And the updated grub file never gets written, leaving the system in an
inconsistent
state. /boot/grub/device.map does exist, but is empty (0 bytes).

In addition, I also have to edit the postrm file to comment out the
update-grub command in order to cleanly remove the package.

I appreciate the disk layout is a little "odd", but this is the
default setup from
xen-tools, and worked fine under Etch. As a test, I copied the
/usr/sbin/update-grub
script from an Etch system (version 0.97-27etch1), and it worked OK.

Please let me know if you need any further information.

-Mark



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

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





More information about the Pkg-grub-devel mailing list