[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] EFI boot unsuccessful with Ubuntu 18.04 dom0



> about your grub configuration to load Xen:
> are you using your default distro's config?

my distro is

        lsb_release -rd
                Description:    openSUSE Leap 15.0
                Release:        15.0

but my relevant pkgs are newer than distro release versions, each sourced from 
here:

        Kernel, Efi
                https://build.opensuse.org/project/show/home:pgnd:Kernel:stable

        Xen, Qemu
                
https://build.opensuse.org/project/show/home:pgnd:Virtualization:Xen
                
https://build.opensuse.org/project/show/home:pgnd:Virtualization:qemu

        Grub2
                https://build.opensuse.org/package/show/home:pgnd:grub2/grub2
        
> Is it multiboot or multiboot2?

The grub multiboot modules are available

        find /usr/share/grub2/x86_64-efi -name *multiboot*
                /usr/share/grub2/x86_64-efi/multiboot.module
                /usr/share/grub2/x86_64-efi/multiboot2.module
                /usr/share/grub2/x86_64-efi/multiboot.mod
                /usr/share/grub2/x86_64-efi/multiboot2.mod

        grep multiboot /boot/grub2/x86_64-efi/command.lst
                module2: multiboot2
                module: multiboot
                multiboot2: multiboot2
                multiboot: multiboot

but, reading

        https://wiki.xenproject.org/wiki/Xen_EFI

current Grub2.02, here, apparently lacks the multiboot2-enabling patch

        [Inspect the grub.cfg. Make sure that it has 'multiboot2' and 'module2' 
for Xen. You may need the patch titled: [PATCH] Use grub-file to figure out 
whether multiboot2 should be used for Xen.gz See [1]

                [1] 
https://lists.xen.org/archives/html/xen-devel/2017-03/txtCeHTNmz1hZ.txt

The grub2-bundled xen config,

        cat /etc/grub.d/20_linux_xen
                ==> https://paste.fedoraproject.org/paste/sfDxWWhOFnv87IMPTUcYJQ

does reference `multiboot`, but NOT in the efi case,

        192       if $is_efi; then
        ...
        224                     chainloader  ${rel_efi_dir}/${xen_basename} 
${xen_basename} ${SUSE_CMDLINE_XENEFI} $section
        ...
        232       fi

using, instead, the chainloader.

Checking, the *generated* ('default' insofar as it's not manually modified) 
config does use the chainloader,

        cat /boot/grub2/grub.cfg
                ...
                ### BEGIN /etc/grub.d/20_linux_xen ###
                menuentry 'OpenSUSE, with Xen hypervisor' --class opensuse 
--class gnu-linux --class gnu --class os --class xen $menuentry_id_option 
'xen-gnulinux-simple-8d1e6d0f-a6d7-4bb2-8465-676586d534e' {
                        insmod part_gpt
                        insmod fat
                        set root='hd0,gpt2'
                        if [ x$feature_platform_search_hint = xy ]; then
                          search --no-floppy --fs-uuid --set=root 
--hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 
--hint='hd0,gpt2'  62B1-21F3
                        else
                          search --no-floppy --fs-uuid --set=root 62B1-21F3
                        fi
                        echo    'Loading Xen 4.12.0_03-lp150.628 with Linux 
4.20.13-lp150.2.gfb7c4a5-default ...'
                        chainloader  /efi/opensuse/xen-4.12.0_03-lp150.628.efi 
xen-4.12.0_03-lp150.628.efi  /mapbs config.1
                }
                submenu 'Advanced options for OpenSUSE (with Xen hypervisor)' 
$menuentry_id_option 'gnulinux-advanced-8d1e6d0f-a6d7-4bb2-8465-676586d534e' {
                        submenu 'Xen hypervisor, version 4.12.0_03-lp150.628' 
$menuentry_id_option 
'xen-hypervisor-4.12.0_03-lp150.628-8d1e6d0f-a6d7-4bb2-8465-676586d534e' {
                                menuentry 'OpenSUSE, with Xen 
4.12.0_03-lp150.628 and Linux 4.20.13-lp150.2.gfb7c4a5-default' --class 
opensuse --class gnu-linux --class gnu --class os --class xen 
$menuentry_id_option 
'xen-gnulinux-4.20.13-lp150.2.gfb7c4a5-default-advanced-8d1e6d0f-a6d7-4bb2-8465-676586d534e'
 {
                                        insmod part_gpt
                                        insmod fat
                                        set root='hd0,gpt2'
                                        if [ x$feature_platform_search_hint = 
xy ]; then
                                          search --no-floppy --fs-uuid 
--set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 
--hint='hd0,gpt2'  62B1-21F3
                                        else
                                          search --no-floppy --fs-uuid 
--set=root 62B1-21F3
                                        fi
                                        echo    'Loading Xen 
4.12.0_03-lp150.628 with Linux 4.20.13-lp150.2.gfb7c4a5-default ...'
                                        chainloader  
/efi/opensuse/xen-4.12.0_03-lp150.628.efi xen-4.12.0_03-lp150.628.efi  /mapbs 
config.2
                                }
                                menuentry 'OpenSUSE, with Xen 
4.12.0_03-lp150.628 and Linux 4.20.12-lp150.5.g5cf91fd-default' --class 
opensuse --class gnu-linux --class gnu --class os --class xen 
$menuentry_id_option 
'xen-gnulinux-4.20.12-lp150.5.g5cf91fd-default-advanced-8d1e6d0f-a6d7-4bb2-8465-676586d534e'
 {
                                        insmod part_gpt
                                        insmod fat
                                        set root='hd0,gpt2'
                                        if [ x$feature_platform_search_hint = 
xy ]; then
                                          search --no-floppy --fs-uuid 
--set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 
--hint='hd0,gpt2'  62B1-21F3
                                        else
                                          search --no-floppy --fs-uuid 
--set=root 62B1-21F3
                                        fi
                                        echo    'Loading Xen 
4.12.0_03-lp150.628 with Linux 4.20.12-lp150.5.g5cf91fd-default ...'
                                        chainloader  
/efi/opensuse/xen-4.12.0_03-lp150.628.efi xen-4.12.0_03-lp150.628.efi  /mapbs 
config.3
                                }
                                menuentry 'OpenSUSE, with Xen 
4.12.0_03-lp150.628 and Linux 4.20.12-lp150.4.gb35c1fc-default' --class 
opensuse --class gnu-linux --class gnu --class os --class xen 
$menuentry_id_option 
'xen-gnulinux-4.20.12-lp150.4.gb35c1fc-default-advanced-8d1e6d0f-a6d7-4bb2-8465-676586d534e'
 {
                                        insmod part_gpt
                                        insmod fat
                                        set root='hd0,gpt2'
                                        if [ x$feature_platform_search_hint = 
xy ]; then
                                          search --no-floppy --fs-uuid 
--set=root --hint-bios=hd4,gpt2 --hint-efi=hd4,gpt2 --hint-baremetal=ahci4,gpt2 
--hint='hd0,gpt2'  62B1-21F3
                                        else
                                          search --no-floppy --fs-uuid 
--set=root 62B1-21F3
                                        fi
                                        echo    'Loading Xen 
4.12.0_03-lp150.628 with Linux 4.20.12-lp150.4.gb35c1fc-default ...'
                                        chainloader  
/efi/opensuse/xen-4.12.0_03-lp150.628.efi xen-4.12.0_03-lp150.628.efi  /mapbs 
config.4
                                }
                        }
                }

                ### END /etc/grub.d/20_linux_xen ###
                ...

> Does it boot the gz image or the efi file?

from above, it chainloads the .efi

Atm, I've no idea _why_ Grub2 doesn't use multiboot2 with Xen/EFI.

There's this Redhat thread,

        Bug 1486002 - grub2-mkconfig does not work if xen.gz is installed.
         https://bugzilla.redhat.com/show_bug.cgi?id=1486002

which _may_ shed some light.  Maybe cc @ Konrad can comment further?


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.