Xen entries not working under grub2

Bug #216176 reported by Jisakiel
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
grub2 (Debian)
Fix Released
Unknown
grub2 (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: grub2

I recently apt-getted grub2 to test it, as I was having problems with grub related to hibernating + savedefault + reiserfs .

When making update-grub, no entries specific for the xen-hypervisor get generated. Thus, the -xen kernel gets added as one regular kernel (which cannot boot). In fact no specific entry for xen kernels is found under /etc/grub.d/ . Therefore, no xen enabled kernels work, at least "out of the box" without editing grub.cfg.

update-grub for regular grub worked perfectly.

Running under hardy, BTW.

Revision history for this message
Jisakiel (jisakiel) wrote :

update-grub2 from the debian/ folder (belonging to upstream) does not seem to provide any functionality for xen enabled kernels, unlike update-grub from debian/legacy. Therefore the system-installed update-grub is not able to create properly the grub.cfg file.

I think it is related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=419157 upstream.

Changed in grub2:
status: Unknown → New
Daniel T Chen (crimsun)
Changed in grub2:
importance: Undecided → Wishlist
Revision history for this message
Felix Zielcke (fzielcke) wrote :

I don't understand what this Debian bug report should have to do with this.
The reporter of it talked about preseeding options for the Xen kernel in update-grub of grub-legacy which has Xen support.
Anyway the Xen Hypervisor could just provide an /etc/grub.d/10_hypervisor_xen file and then update-grub would generate menuentrys for them.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Xen 3.4.1 Xen Dom0 ( with 2.6.31-rc5 pvops) was setup top of Ubuntu 9.10 Server (alpha 4),been installed on bare metal. It appears to be known issue with Grub2 when loading Xen host and came up already on Debian Lenny.
In case of Ubuntu 9.10 Server Xen host loading started and dropped to grub prompt after gave up waiting for root device.
menuentry "Xen 3.4.1 Ubuntu 9.10" {
set root (hd0,1)
multiboot (hd0,1)/xen-3.4.gz
module (hd0,1)/vmlinuz-2.6.31-rc5 root=/dev/sda2 ro console=tty0
module (hd0,1)/initrd-2..6.31-rc5.img
}
generated via /etc/grub.d/40_custom editing and running update-grub
Directive "root=UUID=...." switched off via editing /etc/default/grub and update-grub run.
Seems to be Grub2's multiboot implementation issue.
Mikmak's packages 3.4.1 work fine on 9.04, but won't help much on 9.10 with Grub2 issue in place.

Revision history for this message
Andres Mujica (andres.mujica) wrote :

the correct upstream bug is 469578

Changed in grub2 (Debian):
status: New → Unknown
Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

This issue with vmlinuz module's line :-
module (hd0,1)/vmlinuz-2.6.31-rc5 root=/dev/sda2 ro console=tty0
is addressed here
http://www.linuxtoday.com/news_story.php3?ltsn=2009-09-01-019-35-OS-HE-SV
However, the most recent pvops kernel 2.6.31-rc8 requires in meantime :-
multiboot (hd0,1)/xen-3.4.1.gz dom0_mem=1024M (2048M)
It doesn't work on Ubuntu 9.10 Server (alpha 4)
Same directive appears to be critical for loading 2.6.31-rc8 under Xen on F11,F12(rawhide) via legacy grub.
Looks like grub2 regression.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

In meantime when loading the most recent 2.6.31 pvops kernel under Xen Unstable on top of Ubuntu
9.10 Server (alpha 4, apt-get update, apt-get upgrade -> grub 1.97~beta2) i get a message:

 /proc/xen is already mounted on xenfs ( xenfs is busy)

what causes daemon xend failure to start. Xen-bus appears not to be activated during Dom0 loading.
As usual i added to /etc/fstab before loading Xen Host :-
none /proc/xen xenfs defaults 0 0
as did it on 9.04. Might it be a mistake on 9.10 ?

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Removing "xenfs" entry from /etc/fstab per http://xenbits.xen.org/xen-unstable.hg?rev/67201ec9ed79
allows to load Dom0 without message :-
/proc/xen is already mounted on xenfs ( xenfs is busy)
But , xend fails to startup again, regardless afterwards /etc/mtab does contain "xenfs" entry.

Revision history for this message
Kevin (kevin-010) wrote :

(some of) the problems here are related to a bug in grub2, fortunately, there's a workaround for now, the resulting entry looks about like this:

menuentry "Xen, Ubuntu, 2.6.29-xen-r4-xendom0" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set bf32104d-28bd-45fa-9a40-844bd5878a3c
 multiboot /xen-3.4.2.gz /xen-3.4.2.gz dom0_mem=512M dom0_max_vcpus=1 com1=115200 console=com1,vga
        module /vmlinuz-2.6.29-xen-r4-xendom0 ro root=/dev/mapper/bart-root ro console=hvc0 console=tty0 xencons=hvc
        module /initrd.img-2.6.29-xen-r4-xendom0
}

notice the extra word added to the beginning each parameter list that doesn't do anything? grub will strip that off. that's why root= or other important options tend to fail.

Revision history for this message
Colin Watson (cjwatson) wrote :

I believe this is fixed in the version of GRUB in Ubuntu 10.10. Here's the main relevant upstream ChangeLog entry:

2010-06-28 Vladimir Serbinenko <email address hidden>

        XEN with Linux grub-mkconfig support.

        * conf/common.rmk (grub-mkconfig_SCRIPTS) [linux]: Add 20_linux_xen.
        * util/grub-mkconfig.in: Export GRUB_CMDLINE_XEN and
        GRUB_CMDLINE_XEN_DEFAULT.
        * util/grub.d/20_linux_xen.in: New file.

If there are problems with this, it's probably best to open fresh bug reports with the details.

Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
Changed in grub2 (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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