[opensuse-virtual] configuring the chainloader 'workaround' for grub2 booting of Xen on EFI ?
I'm setting up GRUB2-booting of Xen on EFI Reading http://lists.xenproject.org/archives/html/xen-users/2014-03/msg00142.html http://wiki.xenproject.org/wiki/Xen_EFI Booting Xen.gz via GRUB2 can't be done directly, but needs a chainloader workaround. The example GRUB2 config given is: menuentry 'Xen EFI' { insmod part_gpt insmod search_fs_uuid insmod chain chainloader (hd0,gpt1)/EFI/XEN/xen.efi } On EFI opensuse with grub2 & Xen installed, find / | egrep "xen|grub" | grep "\.efi$" /boot/grub2/x86_64-efi/grub.efi /boot/grub2/x86_64-efi/core.efi /boot/efi/EFI/opensuse/grubx64.efi /usr/lib/grub2/x86_64-efi/grub.efi /usr/lib64/efi/grub.efi /usr/lib64/efi/xen.efi /usr/lib64/efi/xen-4.efi /usr/lib64/efi/xen-4.5.0_03-359.efi /usr/lib64/efi/xen-4.5.efi The xen.efi file is located /usr/lib64/efi/xen.efi not at the target path chainloader (hd0,gpt1)/EFI/XEN/xen.efi (1) Is the right procedure to simply mkdir -p /boot/efi/EFI/XEN cp /usr/lib64/efi/xen.efi /boot/efi/EFI/XEN/ (2) If the Xen install doesn't populate xen.efi into that directory, then at every Xen update/upgrade, will xen.efi need to be re-copied manually? (3) With the GRUB2-installed opensuse, I find no more 'device.map' file under /boot/... Is device.map still used? If none exists, what's the default mapping? For a given location, how do you query/return the device-map drive ? E.g., grub2-probe --target=device /boot/efi returns /dev/sdc2 In order to correctly modify the example's "(hd0,gpt1)" in chainloader (hd0,gpt1)/EFI/XEN/xen.efi I need to know whether /dev/sdc2 is (hd0) or (hd1) etc. LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 28.03.15 at 01:43,
wrote: The xen.efi file is located /usr/lib64/efi/xen.efi
not at the target path
chainloader (hd0,gpt1)/EFI/XEN/xen.efi
(1) Is the right procedure to simply
mkdir -p /boot/efi/EFI/XEN cp /usr/lib64/efi/xen.efi /boot/efi/EFI/XEN/
Yes and ...
(2) If the Xen install doesn't populate xen.efi into that directory, then at every Xen update/upgrade, will xen.efi need to be re-copied manually?
... yes, albeit the grub scripts should be taking care of this as long as there's a reference to the image from other than custom.cfg. Jan -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Mon, Apr 13, 2015, at 12:34 AM, Jan Beulich wrote:
(2) If the Xen install doesn't populate xen.efi into that directory, then at every Xen update/upgrade, will xen.efi need to be re-copied manually?
... yes, albeit the grub scripts should be taking care of this as long as there's a reference to the image from other than custom.cfg.
Here that's not the case. Only a single reference exists
cd /boot
egrep -rlni "xen\.efi|xen\.cfg" .
./grub2/custom.cfg
custom.cfg is of course sourced,
cat /etc/grub.d/41_custom
#!/bin/sh
cat <
On 13.04.15 at 15:33,
wrote: On Mon, Apr 13, 2015, at 12:34 AM, Jan Beulich wrote: (2) If the Xen install doesn't populate xen.efi into that directory, then at every Xen update/upgrade, will xen.efi need to be re-copied manually? ... yes, albeit the grub scripts should be taking care of this as long as there's a reference to the image from other than custom.cfg.
Here that's not the case. Only a single reference exists
cd /boot egrep -rlni "xen\.efi|xen\.cfg" . ./grub2/custom.cfg
custom.cfg is of course sourced,
cat /etc/grub.d/41_custom #!/bin/sh cat <
If the goal is to have the updating done automatically, where 'other than custom.cfg' should that config be placed?
That's the wrong question to ask: When you want a non-auto- generated entry, it needs to go there. Yet what gets copied automatically is (afaik) only what is needed for auto-generated entries.
Or should the grub scripts be modified to handle it?
Perhaps that would be possible, but I can't judge whether that would also make sense from a conceptual perspective. Jan -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Mon, Apr 13, 2015, at 06:47 AM, Jan Beulich wrote:
If the goal is to have the updating done automatically, where 'other than custom.cfg' should that config be placed?
That's the wrong question to ask: When you want a non-auto- generated entry, it needs to go there. Yet what gets copied automatically is (afaik) only what is needed for auto-generated entries.
Or should the grub scripts be modified to handle it?
Perhaps that would be possible, but I can't judge whether that would also make sense from a conceptual perspective.
I'm not thrilled with grub2 to begin with -- more trouble than it's worth, especially when specific, non auto-generated customizations need to be in place. But it's the standard install, and needs to be dealt with. Looking at the grub scripts, it's a mess in there. I'm thinking that leaving custom.cfg alone, and non-auto-generated, is the right thing to do. The issue arises in this case only after kernel-xen or Xen updates. Figuring out how to hook zypper so that "if kernel-xen or Xen has just been updated then copy new xen.efi to EFI boot partition re-exec grub2-mkconfig re-exec mkinitrd " Just automating what I'm doing manually, instead of trying to mangle grub2, might be a simpler approach. -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
participants (2)
-
Jan Beulich
-
lyndat3@your-mail.com