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

Re: [Xen-users] Xen on Debian Stretch on UEFI


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: Ian Macdonald <imac@xxxxxxxxxx>
  • Date: Fri, 20 Apr 2018 17:04:29 +0200
  • Autocrypt: addr=imac@xxxxxxxxxx; prefer-encrypt=mutual; keydata= xsFNBFOXLOEBEADEQsPNAmFQhpIPCyk7weE7AbcEyU4Oc21revaZZYN5UdQP27tig7WTk2oc 2QReen9sZBJQDrMmrJMc3N8zFvYLCCghXb0u3P1qHmSbNSPEl0KI7nHhwg1IoCKsctZA9OOP PsH8/8qw7IZblyZDR39pfMM4ndJFC00EsH1DlMkmb8+1FF/HBPFO/+pa0kg9E3yP2WXjKKQt ULAvIzLznBMacxpi05zce1DcC0SjQaB7OaT4HkRH/Fzq4jCEA0i1l9k4cfpSa4XH+R8xkhwQ qWDTh5K6SKxHyyiIBkGH+5jQ8tW6av8RWZPu36vJMndXZgTZ5CaCyRZf78LjSOyXcitFZnBr Q4h2LBEl4EG7YpDDSBGDKiYhw30Pp88dc79UqfAD7o4l8CeLQBGnvnnz1xadyXS64c087Q35 KdLVQmQ6Q53HplXx9nXAcH8GMXIBimQSNji60CmgnOXMWbC6sXwzjIeM2BYi5+BC9cn6gJAa DEFFgArBICxTCrVPNOvqCi6aYdcMikBZc4LAgP7Fyd3/FboJAbxw1ofeKYgoSgB9TjcCaKmf /+sYjRbJ9NtQszPOba7KokshRfUVTxIcow1319pnuZSKBH3VmQE7E84jm9ieG102G1+N6bJ5 bL16AYY4ORmuhfmv7qczuiqtddsGqa4JPnTDd7e2NdeDCSZuNwARAQABzSRJYW4gRC4gTWFj ZG9uYWxkIDxpbWFjQGxhaWd1YW5hLm9yZz7CwXcEEwEIACEFAlOXL1ICGwMFCwkIBwMFFQoJ CAsFFgMCAQACHgECF4AACgkQd5vWv6MF3vxVvBAAtg3dWyljpalMqsAJ4QXgTCqN7/T43SBm avaojrStN40T1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kkBj8zGwCh+/f2LOJLMaWpVAz1jnChvhRt32yj00RpzegS66vKq2QbAXFnBQH4WAm gfoKxzTSzbf2oW6eIH+ifdJtVmgXyS5mjlFCfuEbhnsnKRY/b2w2K2fkNbACNL4Gmuh7gErz hKSEc28GWOAvHEQrsjSIfoZCzI7c5gjgUVaD+2mIs2du7k6Uayx6a2DsqQ/K/1UqyMIuMFkL JaLz26vDsZ3HJ7WHQBCGi44whlWRhYpfRNvLb3XhEf1vyu5IZQ4fABEBAAHCwV8EGAEIAAkF AlOXLWsCGwwACgkQd5vWv6MF3vy20xAAqaYMvEiaHo7rPB375f4mWh0Kt+Xi9/NYs09L9wds forYnutRnRXUb5MHbGRVWG04sjFo+SqG4IA/KfbaOTcA/F2Q82M4llwx5htMHiFNQ00lQ7pN ugWJ4pmOjCAHq7sR8AJh5RQwkFOynacTEQt9wPcu9gsb757UmYgaTPbu80Mk+eMxYwm755WJ ZmhmZle75S/VgZmRuANggHsf66IgMSohRs5gI7SVlpK9VqZDKC5y6DML2nG9iHJbg6N9pA+h S6p6grWDb7ZW+9VQC5j6RF5kZncYujEouJD9JB1AtncCaPtZdUHpVMWXi4xeXZ/WP5ZEoNFD UHz3l99GcKtHZn39Pi1CfUYOoXdb/0JCmomePV1CAGy+i2BjUGXKC8U4wwfrh//SMWluIhO1 qbUsQb2dotD/ZGgnxdhughAFpKzyVEU8ZdqNo3+bzDD5wcba1UIM02JcvZt1EsQsZ/4YpYoh BpWwlYvqegXbJy3WAH+ByN1z/CQ+RmgC/3a21afQu+Yuj0CfKdeP8yOJZshtbYS+H5p5lri1 vET98DDeO0DJdcto9wdIvVzL4bS6doP99DL3WB8KljGYKtMHFLdSVc3V07QdXlRYsCH0Fi5n cK0/i7seVgRPoenb7wAkDLJ8sCaK2Qk6o2ketjFwKbImjSRBbKy0IUjtldzRz+IYvcQ=
  • Delivery-date: Fri, 20 Apr 2018 15:05:58 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Openpgp: preference=signencrypt

Hi Robert,

Thanks for your suggestions. I tried with your suggested 'efibootmgr'
command and it set up a boot entry identical to the one I already had. I
only have one ESP partition on this machine right now, so if I leave out
those parameters, it looks like the system correctly guesses the
location of the ESP partition for me anyway.

However, I installed an EFI shell and was able to try booting the
xen-4.8-amd64.efi file from the EFI shell. The output I got was this:
****
Xen 4.8.3 (c/s ) EFI loader
Using configuration file 'xen-4.8-amd64.cfg'
vmlinuz-4.9.0-6-amd64: [snip long hex numbers]
initrd.img-4.9.0-6-amd64: [snip long hex numbers]
Read failed for initrd.img-4.9.0-6-amd64: ErrCode 0x8000000000000004
****

Some searching online turned up these links:

https://www.mail-archive.com/xen-devel@xxxxxxxxxxxxxxxxxxxx/msg08323.html

https://datacentersupport.lenovo.com/es/es/solutions/ht506400

That error code apparently means EFI_BAD_BUFFER_SIZE, meaning the EFI
implementation can't read arbitrarily sized blocks, so the firmware
doesn't correctly read larger files when loading the Xen EFI stub. In
this case I suspect it's because the initrd.img file is about 18MB in
size with the firmware able to cope with files up to 16MB.

That second link above seems to suggest a patch to the Xen code that
will produce a xen.efi file which works around the initrd.img block size
issue. I am tempted to try patching and compiling Xen in order to get a
xen.efi file that will hopefully work around the file size issue.

Has anyone else run up against this problem? Any suggestions as to the
best way to get the hypervisor and dom0 booting in this situation?

Thanks in advance for any help, it's turned out to be a very long
process getting this new server up and running...

Best wishes,
-Ian

On 19/04/18 17:43, rmcnicol@xxxxxxxxxxxxxxxxxx wrote:
> Hey, your boot record needs to direct the firmware to disk and partition as 
> well. Also, UEFI path separators like *nix, not Windows.
> 
> Here's a good resource from ArchWiki: 
> https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#efibootmgr
> 
> So in : efibootmgr -w -L Xen -l "\EFI\xen\xen-4.8-amd64.efi" -c  
> 
> If your ESD is on sda1 then your boot record needs to be: efibootmgr --create 
> --disk /dev/sda --part 1 --loader /EFI/xen/xen-4.8-amd64.efi --label "Xen" -w
> Notice that disk, part, loader are not quoted (IIRC I had issues when these 
> options were in quotes) , and again path separator direction '/' not '\'
> 
> Robert McNicol
> IT Systems Administrator
> ServiceMaster Restore | Fraser Valley
> 
> 
>> -----Original Message-----
>> From: Ian Macdonald <imac@xxxxxxxxxx>
>> Sent: April 19, 2018 1:12 AM
>> To: xen-users@xxxxxxxxxxxxxxxxxxxx
>> Subject: [Xen-users] Xen on Debian Stretch on UEFI
>>
>> Hi,
>>
>> I have been setting up a new server to run Xen, but can't seem to get the
>> machine to boot the hypervisor correctly. The server has UEFI firmware and I
>> don't think we can run it in BIOS compatibility mode because the particular
>> hardware configuration requires full UEFI support in order for everything to
>> work.
>>
>> I have installed Debian Stretch on the server and can boot via UEFI into GRUB
>> and then Linux just fine.
>>
>> I have tried following the directions found on this page in order to get Xen
>> booting:
>> https://wiki.xenproject.org/wiki/Xen_EFI
>>
>> I have found that the Debian xen-hypervisor-4.8-amd64 package installs a file
>> at /boot/xen-4.8-amd64.efi. Should I be able to use this as my EFI boot 
>> file? Or
>> do I still need to actually compile Xen from sources in order to get a 
>> working
>> 'xen.efi' file?
>>
>> I have tried copying all files from the /boot directory into 
>> /boot/efi/EFI/xen/
>> and then creating /boot/efi/EFI/xen/xen-4.8-amd64.cfg
>> with the following contents:
>>
>> [global]
>> default=xen
>>
>> [xen]
>> options=console=vga loglvl=all noreboot
>> kernel=vmlinuz-4.9.0-6-amd64
>> root=UUID=c0589119-f679-4b3c-ac62-7a686ffe00b9 ro
>> ramdisk=initrd.img-4.9.0-6-amd64
>>
>> I then created an EFI boot entry pointing at Xen:
>> efibootmgr -w -L Xen -l "\EFI\xen\xen-4.8-amd64.efi" -c
>>
>> When I try to boot from that menu entry, the machine's firmware just returns
>> to system setup or to the boot menu, suggesting to me that it doesn't
>> recognise or isn't able to boot from xen-4.8-amd64.efi. I also tried renaming
>> that file to xen.efi and having the config in xen.cfg just in case that made 
>> a
>> difference, but the result was the same.
>>
>> I have tried booting Debian without using GRUB, using the kernel EFI stub to
>> boot, according to the instructions at 'https://wiki.debian.org/EFIStub'. I 
>> got
>> that to work for booting the normal kernel, so I know I can boot the mainline
>> Linux kernel directly from the EFI firmware without GRUB, but I've not been
>> able to boot the Xen hypervisor.
>>
>> Any suggestions or advice would very much appreciated.
>>
>> Many thanks,
>> -Ian Macdonald
>>  GreenNet
>>
>> --
>> Ian Macdonald
>> GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
>> XMPP/OTR: imac@xxxxxxxxxx  Wire.com: @idmacdonald
>>
>> GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
>> UK Tel:      0330 355 4011
>> Intl:        +44 20 7065 0935
>> Twitter:     @GreenNetISP
>> Registered in England & Wales, Company No. 02070438
> 
> 

-- 
Ian Macdonald
GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
XMPP/OTR: imac@xxxxxxxxxx  Wire.com: @idmacdonald

GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0330 355 4011
Intl:        +44 20 7065 0935
My desk:     +44 20 3559 4011
Twitter:     @GreenNetISP
Registered in England & Wales, Company No. 02070438



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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®.