Bug 753480

Summary: grub2-mkconfig does not create xen entries for i686 hosts
Product: [Fedora] Fedora Reporter: American Dave <bugs>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: berrange, dennis, jforbes, kraxel, mads, m.a.young, pjones, virt-maint, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-18 15:00:32 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description American Dave 2011-11-12 16:32:58 EST
Hello,

Description of problem:

After following the directions at http://fedoraproject.org/wiki/Features/XenPvopsDom0, neither the installation nor the command "grub2-mkconfig" creates Xen entries in grub2.cfg for i686 hosts.

Version-Release number of selected component (if applicable):

Fedora 16 + all updates / grub2-1.99-12.fc16.i686

Steps to Reproduce:
1. Install Fedora 16 i686
2. yum install -y xen
3. grub2-mkconfig | grep xen
  
Actual results:

No Xen Grub2 entries created

Expected results:

Xen Grub2 entries

Additional info:

x86-64 hosts appear to get the proper entries.
Comment 1 Mads Kiilerich 2011-11-17 16:31:38 EST
Do you have any xen kernels installed? Which files do you have in /boot ?
Comment 2 American Dave 2011-11-17 17:28:18 EST
Here's a bit more information about the system:

[root@vmhost ~]# uname -a
Linux vmhost 3.1.1-1.fc16.i686 #1 SMP Fri Nov 11 22:23:53 UTC 2011 i686 i686 i386 GNU/Linux

[root@vmhost ~]# rpm -qa|grep ^kernel
kernel-3.1.0-7.fc16.i686
kernel-3.1.1-1.fc16.i686

[root@vmhost ~]# rpm -qa|grep ^xen
xen-libs-4.1.2-1.fc16.i686
xen-4.1.2-1.fc16.i686
xen-licenses-4.1.2-1.fc16.i686
xen-runtime-4.1.2-1.fc16.i686
xen-hypervisor-4.1.2-1.fc16.i686

[root@vmhost ~]# ls /boot/
config-3.1.0-7.fc16.i686         memtest86+-4.20
config-3.1.1-1.fc16.i686         System.map-3.1.0-7.fc16.i686
efi                              System.map-3.1.1-1.fc16.i686
elf-memtest86+-4.20              vmlinuz-3.1.0-7.fc16.i686
grub                             vmlinuz-3.1.1-1.fc16.i686
grub2                            xen-4.1.2.gz
initramfs-3.1.0-7.fc16.i686.img  xen-4.1.gz
initramfs-3.1.1-1.fc16.i686.img  xen.gz
lost+found                       xen-syms-4.1.2
-----

Thanks much.
Comment 3 Mads Kiilerich 2011-11-17 17:47:12 EST
Please try to edit /etc/grub.d/20_linux_xen and insert a 'set -x' line near the top and run 'grub2-mkconfig 2> log' and attach the log.
Comment 4 American Dave 2011-11-17 19:26:00 EST
$ cat log 
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.1.1-1.fc16.i686
Found initrd image: /boot/initramfs-3.1.1-1.fc16.i686.img
Found linux image: /boot/vmlinuz-3.1.0-7.fc16.i686
Found initrd image: /boot/initramfs-3.1.0-7.fc16.i686.img
+ prefix=/usr
+ exec_prefix=/usr
+ bindir=/usr/bin
+ libdir=/usr/lib
+ . /usr/lib/grub/grub-mkconfig_lib
++ transform='s&^&&;s,grub,grub2,'
++ prefix=/usr
++ exec_prefix=/usr
++ datarootdir=/usr/share
++ datadir=/usr/share
++ bindir=/usr/bin
++ sbindir=/sbin
+++ echo grub
+++ sed 's&^&&;s,grub,grub2,'
++ pkgdatadir=/usr/share/grub2
++ test x = x
+++ echo grub-probe
+++ sed 's&^&&;s,grub,grub2,'
++ grub_probe=/sbin/grub2-probe
++ test x = x
+++ echo grub-mkrelpath
+++ sed 's&^&&;s,grub,grub2,'
++ grub_mkrelpath=/usr/bin/grub2-mkrelpath
+++ which gettext
++ gettext=gettext
+ export TEXTDOMAIN=grub
+ TEXTDOMAIN=grub
+ export TEXTDOMAINDIR=/usr/share/locale
+ TEXTDOMAINDIR=/usr/share/locale
+ CLASS='--class gnu-linux --class gnu --class os --class xen'
+ '[' xFedora = x ']'
+ OS='Fedora Linux'
++ echo Fedora
++ cut '-d ' -f1
++ tr A-Z a-z
+ CLASS='--class fedora --class gnu-linux --class gnu --class os --class xen'
+ case ${GRUB_DEVICE} in
+ '[' x46fe9463-2887-4175-8f41-0c93ae10c897 = x ']'
+ '[' x = xtrue ']'
+ test -e /dev/disk/by-uuid/46fe9463-2887-4175-8f41-0c93ae10c897
+ uses_abstraction /dev/mapper/vg_vmhost-lv_root lvm
+ device=/dev/mapper/vg_vmhost-lv_root
++ /sbin/grub2-probe --device /dev/mapper/vg_vmhost-lv_root --target=abstraction
+ abstraction='lvm '
+ for module in '${abstraction}'
+ test xlvm = xlvm
+ return 0
+ LINUX_ROOT_DEVICE=/dev/mapper/vg_vmhost-lv_root
++ /sbin/grub2-probe --device /dev/mapper/vg_vmhost-lv_root --target=fs
+ '[' xext2 = xbtrfs ']'
++ for i in '/boot/vmlinu[xz]-*' '/vmlinu[xz]-*' '/boot/kernel-*'
++ grub_file_is_not_garbage /boot/vmlinuz-3.1.0-7.fc16.i686
++ test -f /boot/vmlinuz-3.1.0-7.fc16.i686
++ case "$1" in
++ return 0
+++ basename /boot/vmlinuz-3.1.0-7.fc16.i686
++ basename=vmlinuz-3.1.0-7.fc16.i686
+++ echo vmlinuz-3.1.0-7.fc16.i686
+++ sed -e 's,^[^0-9]*-,,g'
++ version=3.1.0-7.fc16.i686
+++ dirname /boot/vmlinuz-3.1.0-7.fc16.i686
++ dirname=/boot
++ config=
++ for j in '"${dirname}/config-${version}"' '"${dirname}/config-${alt_version}"' '"/etc/kernels/kernel-config-${version}"'
++ test -e /boot/config-3.1.0-7.fc16.i686
++ config=/boot/config-3.1.0-7.fc16.i686
++ break
++ grep -qx CONFIG_XEN_DOM0=y /boot/config-3.1.0-7.fc16.i686
++ grep -qx CONFIG_XEN_PRIVILEGED_GUEST=y /boot/config-3.1.0-7.fc16.i686
++ for i in '/boot/vmlinu[xz]-*' '/vmlinu[xz]-*' '/boot/kernel-*'
++ grub_file_is_not_garbage /boot/vmlinuz-3.1.1-1.fc16.i686
++ test -f /boot/vmlinuz-3.1.1-1.fc16.i686
++ case "$1" in
++ return 0
+++ basename /boot/vmlinuz-3.1.1-1.fc16.i686
++ basename=vmlinuz-3.1.1-1.fc16.i686
+++ echo vmlinuz-3.1.1-1.fc16.i686
+++ sed -e 's,^[^0-9]*-,,g'
++ version=3.1.1-1.fc16.i686
+++ dirname /boot/vmlinuz-3.1.1-1.fc16.i686
++ dirname=/boot
++ config=
++ for j in '"${dirname}/config-${version}"' '"${dirname}/config-${alt_version}"' '"/etc/kernels/kernel-config-${version}"'
++ test -e /boot/config-3.1.1-1.fc16.i686
++ config=/boot/config-3.1.1-1.fc16.i686
++ break
++ grep -qx CONFIG_XEN_DOM0=y /boot/config-3.1.1-1.fc16.i686
++ grep -qx CONFIG_XEN_PRIVILEGED_GUEST=y /boot/config-3.1.1-1.fc16.i686
++ for i in '/boot/vmlinu[xz]-*' '/vmlinu[xz]-*' '/boot/kernel-*'
++ grub_file_is_not_garbage '/vmlinu[xz]-*'
++ test -f '/vmlinu[xz]-*'
++ return 1
++ for i in '/boot/vmlinu[xz]-*' '/vmlinu[xz]-*' '/boot/kernel-*'
++ grub_file_is_not_garbage '/boot/kernel-*'
++ test -f '/boot/kernel-*'
++ return 1
+ linux_list=
+ '[' x = x ']'
+ exit 0
done
Comment 5 Mads Kiilerich 2011-11-17 20:19:18 EST
There is no CONFIG_XEN_DOM0=y in /boot/config-3.1.0-7.fc16.i686.

Try to install kernel-PAE and you will find it set in config-3.1.0-7.fc16.i686.PAE and then grub2-mkconfig will create the entries.

I guess it is OK (and perhaps necessary) that XEN haven't been enabled in the non-PAE kernel. So I guess that if there is anything left here then it is a Xen documentation issue. Reassigning.
Comment 6 American Dave 2011-11-17 20:53:28 EST
Installing kernel-PAE and re-running "grub2-mkconfig -o /boot/grub2/grub.cfg" creates the needed entries.  Thanks much!
Comment 7 Michael Young 2011-11-18 15:00:32 EST
Yes, you need to use kernel-PAE as the dom0 kernel for i686, as non-PAE support was dropped in xen some time ago.