#639931 [grub2] "update-grub" adds line to "multiboot" with Xen kernel

Package:
grub-pc
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (PC/BIOS version)
Submitter:
MisterE
Date:
2014-10-18 21:15:15 UTC
Severity:
normal
#639931#5
Date:
2011-08-31 19:29:56 UTC
From:
To:

Hello guys,

Asked this question before on the Xen mailinglist. They recommended
to file a bug to Debian.


I use Debian Squeeze. I want to passthrough PCI devices.
With the old stable Debian (grub legacy) i did not have problems.

I edit /etc/default/grub like:
    quote:
    GRUB_CMDLINE_XEN_DEFAULT="quiet xen-pciback.permissive xen-pciback.hide=(00:14.2)(01:05.1)"


I run "update-grub". Now i look at /boot/grub/grub.cfg:


    ### BEGIN /etc/grub.d/20_linux_xen ###
    menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-xen-amd64 and XEN 4.0-amd64' --class debian --class gnu-linux --class gnu --class os --class xen {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 5a097ed6-415b-45ff-bba7-d628c92b1f7a
    echo 'Loading Linux 2.6.32-5-xen-amd64 ...'
    multiboot /xen-4.0-amd64.gz placeholder quiet xen-pciback.permissive xen-pciback.hide=(00:14.2)(01:05.1)
    module /vmlinuz-2.6.32-5-xen-amd64 placeholder root=/dev/mapper/vg_dom0-lv_root ro quiet
    echo 'Loading initial ramdisk ...'
    module /initrd.img-2.6.32-5-xen-amd64
    }


The "pciback" command is at the "multiboot" line. This does not work? It does not seize the device after a reboot.

If i use:
    quote:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet xen-pciback.permissive xen-pciback.hide=(00:14.2)(01:05.1)"


The result is:
    ### BEGIN /etc/grub.d/20_linux_xen ###
    menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-xen-amd64 and XEN 4.0-amd64' --class debian --class gnu-linux --class gnu --class os --class xen {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 5a097ed6-415b-45ff-bba7-d628c92b1f7a
    echo 'Loading Linux 2.6.32-5-xen-amd64 ...'
    multiboot /xen-4.0-amd64.gz placeholder
    module /vmlinuz-2.6.32-5-xen-amd64 placeholder root=/dev/mapper/vg_dom0-lv_root ro quiet xen-pciback.permissive xen-pciback.hide=(00:14.2)(01:05.1)
    echo 'Loading initial ramdisk ...'
    module /initrd.img-2.6.32-5-xen-amd64
    }


    root@dom0:/etc# uname -a
    Linux dom0 2.6.32-5-xen-amd64 #1 SMP Tue Jun 14 12:46:30 UTC 2011 x86_64 GNU/Linu


Now the "pciback" command is at the "module" line and the device is actually seized. The problem is that is added to all linux kernels and not only the Xen kernel.

#639931#10
Date:
2011-08-31 20:29:15 UTC
From:
To:
xen-pciback.hide=(00:14.2)(01:05.1)"
This one is for Xen hypervisor. For kernel cmdline use
GRUB_CMDLINE_LINUX_XEN_REPLACE

#639931#15
Date:
2011-09-04 19:07:24 UTC
From:
To:
Thanks Vladimir,

This is included in version 1.99?
I have an older version:
root@dom0:/etc/default# dpkg -l | grep grub
ii  grub-common                         1.98+20100804-14             GRand Unified Bootloader, version 2 (common files)
ii  grub-pc                             1.98+20100804-14             GRand Unified Bootloader, version 2 (PC/BIOS version)

So, need to do it by hand for the time being.
Thanks for the help!


Wednesday, August 31, 2011, 10:29:15 PM, you wrote:

#639931#20
Date:
2011-10-20 21:17:33 UTC
From:
To:
I ran into this bug and couldn't find any reference to
GRUB_CMDLINE_LINUX_XEN_REPLACE in /etc/grub.d/20_linux_xen until I
looked at the sid package.  The bug where this was actually fixed is
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617538.

It sure would be great to get this backported to squeeze, I'd like to
think others would otherwise waste as much time trying to sort this out
as I did.

- Ben

#639931#25
Date:
2011-12-14 13:50:17 UTC
From:
To:
I'm installing a new Debian Squeeze server with Xen and found the bug in
grub2 described in #639931.

Colin, sorry for mailing you directly but, as this was fixed by you in
#617538 for Sid and Wheezy versions, is there a way to backport the fix
for Squeeze version of grub2 (or to Squeeze-backports repository) ?

Thanks for help.