grub-pc Xen dom0 support

Bug #461678 reported by David Brown
This bug report is a duplicate of:  Bug #216176: Xen entries not working under grub2. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: grub-pc

Okay I know I'm a crazy person for trying this stuff out but I was curious.

I'm attempting to boot Xen 3.5 unstable with a vanilla 2.6.31.4 with the xen-pv ops dom0 support enabled.

I started by following instructions found here:
http://wiki.xensource.com/xenwiki/XenParavirtOps

Everything compiled fine but this isn't what the bug is about. For some reason grub-pc on amd64 seems to strip out the root= commandline argument to the kernel when loading it after xen.

============ GRUB-PC CONFIG ================
root@uber-gamer:~# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Xen 3.5 / Ubuntu, kernel 2.6.31.4-1-xen" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 41102bda-f368-45b9-8066-fa971325b228
 multiboot /xen-3.5-unstable.gz
 module /vmlinuz-2.6.31.4-1-xen root=/dev/mapper/vg0-root ro quiet splash
 module /initrd.img-2.6.31.4-1-xen
}
root@uber-gamer:~#
=======================================================

After booting it eventually drops to the initramfs busybox shell and I attempt to cat /proc/cmdline and it shows only "ro quiet splash" somehow the root= got stripped out. I'm guessing grub-pc did this, since I'm able to use the exact same kernel and initrd to boot without Xen (since that works now too) and it didn't happen.

Some of the google searches on "grub2 xen" mention not having the multiboot option completed yet. However, the dates were all the way back in February.

Here's more stuff just in case you want it:

# lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
# apt-cache policy grub-pc
grub-pc:
  Installed: 1.97~beta4-1ubuntu3
  Candidate: 1.97~beta4-1ubuntu3
  Version table:
 *** 1.97~beta4-1ubuntu3 0
        500 http://mirrors.kernel.org karmic/main Packages
        500 http://us.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status
     1.96+20080724-12ubuntu2 0
        500 http://mirrors.kernel.org jaunty/main Packages
        500 http://us.archive.ubuntu.com jaunty/main Packages
#

This bug isn't a big deal but I thought I'd mention it since you guys are moving to grub-pc on amd64 systems.

Revision history for this message
David Brown (dmlb2000) wrote :

Oopse this maybe a duplicate of what's going on in bug 216176

Revision history for this message
xthatrox (justin-xthat) wrote :

This SOLVED the problem for me:

For explanation: Please see this "bug" which is actual a "bug fix" in grub2 making it require a second argument in the multiboot command where grub-legacy did not. http://<email address hidden>/msg11801.html

This explains the issue with grub2 and multiboot lines seemingly ignoring the kernel root= command line parameter (xen in particular).

A corrected grub.cfg menuentry section from above would read:

menuentry "Xen 3.5 / Ubuntu, kernel 2.6.31.4-1-xen" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 41102bda-f368-45b9-8066-fa971325b228
 multiboot /xen-3.5-unstable.gz /xen-3.5-unstable.gz
 module /vmlinuz-2.6.31.4-1-xen root=/dev/mapper/vg0-root ro quiet splash
 module /initrd.img-2.6.31.4-1-xen
}

As you can see, the multiboot argument /xen-3.5-unstable.gz is duplicated (repeated twice) as it should be to provide a multiboot kernel filename and name. This is a new requirement for grub2 (grub-pc).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.