Bug#557645: grub-pc: fails to boot Xen system

Thomas Schwinge thomas at schwinge.name
Mon Nov 23 14:12:41 UTC 2009


Package: grub-pc
Version: 1.97~beta3-1
Severity: important

This is a very odd issue.  Originally I began reporting it in this
thread; linking directly to the most useful message:
<http://lists.alioth.debian.org/pipermail/pkg-xen-devel/2009-October/002479.html>

I bisected this erroneous behavior to the grub-pc package!  (Uh?!)

The gist is that with certain versions of GRUB, the Xen system won't
boot, but instead only drop into the (initramfs) rescue shell.

  * 1.96+20080724-16 (stable): system boots;
  * 1.97~beta3-1~bpo50+1 (stable backports): system doesn't boot;
  * 1.97~beta3-1 (testing): system doesn't boot;
  * 1.97+20091115-1 (unstable): system doesn't boot.

This is absolutely reproducible -- I wouldn't believe it myself at first,
why should GRUB be responsible for this problem, as the kernel (plus Xen
hypervisor) had already been loaded -- so I did a few back-and-forth GRUB
installations, but from the set above only 1.96+20080724-16 allows for
booting the Xen system.  All this is not relevant for directly booting a
(non-Xen) Linux kernel: here the version of GRUB doesn't matter.

I snipped out the uninteresting parts of grub.cfg below, but you can see
that the Xen and non-Xen entries are essentially the same.


And now for a strange thing, perhaps the reason for all this misbehavior:

Failed Xen system boot, in (initramfs) rescue shell:

    (initramfs) cat /proc/cmdline
    ro console=tty0

Where did the root=... go?!

On the other hand, successful (non-Xen) Linux kernel boot, same GRUB version:

    $ cat /proc/cmdline 
    BOOT_IMAGE=/boot/vmlinuz-2.6.30-2-amd64 root=/dev/mapper/vg0-boole--root ro


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/vg0-boole--root / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/mapper/vg0-boole--data /media/data ext3 rw,relatime,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

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

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
terminal 
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/09_custom ###

menuentry "Xen 3.4, Debian GNU/Linux, Linux 2.6.31-1-xen-amd64" {
	insmod lvm
	insmod ext2
	set root=(vg0-boole-root)
	multiboot /boot/xen-3.4-amd64.gz noreboot dom0_mem=150000
	module /boot/vmlinuz-2.6.31-1-xen-amd64 root=/dev/mapper/vg0-boole--root ro console=tty0
	module /boot/initrd.img-2.6.31-1-xen-amd64
}

[...]

### END /etc/grub.d/09_custom ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, linux 2.6.31-1-xen-amd64" {
	insmod lvm
	insmod ext2
	set root=(vg0-boole-root)
	search --no-floppy --fs-uuid --set af75f12b-963d-4aff-a0f0-ed3f49c577a2
	linux	/boot/vmlinuz-2.6.31-1-xen-amd64 root=/dev/mapper/vg0-boole--root ro  
	initrd	/boot/initrd.img-2.6.31-1-xen-amd64
}

[...]

}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]       1.5.28       Debian configuration management sy
ii  grub-common                 1.97~beta3-1 GRand Unified Bootloader, version 
ii  libc6                       2.10.1-7     GNU C Library: Shared libraries
ii  ucf                         3.0024       Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
pn  desktop-base                  <none>     (no description available)
pn  genisoimage                   <none>     (no description available)

-- debconf information:
  grub2/kfreebsd_cmdline:
  grub-pc/linux_cmdline: fillme
* grub2/linux_cmdline:
  grub-pc/chainload_from_menu.lst: true
  grub-pc/kopt_extracted: false
* grub-pc/install_devices: /dev/sda
  grub-pc/postrm_purge_boot_grub: false
  grub2/kfreebsd_cmdline_default: quiet
* grub2/linux_cmdline_default:


Regards,
 Thomas





More information about the Pkg-grub-devel mailing list