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

Re: [Xen-users] Xen EFI boot how to?



On Mon, Jul 2, 2012 at 9:23 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
On Mon, 2012-07-02 at 14:09 +0100, Shriram Rajagopalan wrote:
> I have a IBM System x3600 series server with UEFI.
>  I managed to compile the xen EFI (xen-4.2-unstable.efi).
> The machine is currently running Ubuntu with grub2.
> I can see a grubx64.efi in /boot/efi/EFI/ubuntu/grubx64.efi
> Where should I put the xen efi ?
> I tried creating a efi/EFI/xen/xen-4.2-unstable.efi and added it as a boot option using efibootmgr.
> All I get in that case is a blank screen.
> I had to go into the UEFI bios menu to delete that option in order to boot
> the system via the usual grub.

Not sure if you've seen this but some EFI docs were committed last week,
maybe they help?

http://xenbits.xen.org/docs/unstable/misc/efi.html



Thanks for the pointer Ian!. That answers a bunch of questions.

I still have a couple of questions:

1. EFI_VENDOR 

On my machine, I have /boot/efi/EFI/ubuntu/grubx64.efi
Does this mean I should set the EFI_VENDOR to 'EFI/xen' ?

I once tried to simply (dumb!) create the EFI/xen directory and
dropped the xen-4.2-unstable.efi on that folder, added that folder
as one of the EFI boot options, via the efibootmgr program.

2. Config file

 The doc says that the binary requires a config file. Should this
config file be placed in the same target folder (i.e. /boot/efi/EFI/xen/xen-4.2-unstable.cfg) ?

"One can override this with a command line option (-cfg=<filename>" 
 What command is this referring to ?

3. Location of Kernel files
 
Can they be in their usual /boot/vmlinuz.. location or should they also be placed
in the same folder as the efi ?

 

Errata:
@jacek:
  I have tried booting xen with the usual grub option. I get 
"Not enough memory to relocate dom0 kernel". When I searched online, this seemed
to be a bug with RHEL/IBM SystemX machines. However, the fixes pointed to changing
some boot orders, etc which dont apply to my machine IMO.

so, on a limb, I applied a patch  from a serverfault.com post (modded to xen-4.2):
Patch below for reference.


This one allowed me to boot into xen finally, via the grub option. Unfortunately, xen only sees 1 CPU
on a 16-core machine (dual socket). What a bummer. It just says
(XEN) Multiboot-e820 RAM map:
(XEN)  0000000000000000 - 000000000006c000 (usable)
(XEN)  000000000006c000 - 000000000006d000 (ACPI NVS)
(XEN)  000000000006d000 - 000000000009f000 (usable)
(XEN)  000000000009f000 - 00000000000a0000 (ACPI NVS)
(XEN)  0000000000100000 - 000000007c11d000 (usable)
(XEN)  000000007c11d000 - 000000007ec92000 (reserved)
(XEN)  000000007ec92000 - 000000007f7bf000 (ACPI NVS)
(XEN)  000000007f7bf000 - 000000007f7ff000 (ACPI data)
(XEN)  000000007f7ff000 - 000000007f800000 (usable)
(XEN)  0000000080000000 - 0000000090000000 (reserved)
(XEN)  00000000fed1c000 - 00000000fed20000 (reserved)
(XEN)  00000000ff800000 - 0000000100000000 (reserved)
(XEN)  0000000100000000 - 0000001080000000 (usable)
(XEN) ACPI Error (tbxfroot-0218): A valid RSDP was not found [20070126]

===

diff -r c6c9d20963d7 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Jun 26 17:00:20 2012 +0100
+++ b/xen/arch/x86/setup.c      Mon Jul 02 02:06:30 2012 -0400
@@ -667,6 +667,7 @@
     if ( ((unsigned long)cpu0_stack & (STACK_SIZE-1)) != 0 )
         EARLY_FAIL("Misaligned CPU0 stack.\n");
 
+#if 0
     if ( efi_enabled )
     {
         set_pdx_range(xen_phys_start >> PAGE_SHIFT,
@@ -684,6 +685,7 @@
 
         memmap_type = loader;
     }
+    /* disable raw e801 and e820 for now in favor of multiboot provided maps */
     else if ( e820_raw_nr != 0 )
     {
         memmap_type = "Xen-e820";
@@ -699,7 +701,10 @@
         e820_raw[1].type = E820_RAM;
         e820_raw_nr = 2;
     }
-    else if ( mbi->flags & MBI_MEMMAP )
+    else
+#endif
+
+    if ( mbi->flags & MBI_MEMMAP )
     {
         memmap_type = "Multiboot-e820";
         while ( (bytes < mbi->mmap_length) && (e820_raw_nr < E820MAX) )


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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