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

Re: [Xen-users] How to persist domU efi boot order ?

Den 21. mars 2017 14:11, skrev James Dingwall:
On Mon, Mar 20, 2017 at 08:03:37PM +0100, Håkon Alstadheim wrote:

Either ovmf is not reading NvVars, or else NvVars gets created without
my settings. Maybe my "esp" partition is not found until _after_ ovmf
searches all drives, also non-existant ones?


Googling around I found this <https://lists.gt.net/xen/users/420486>, in

"wei.liu2 at citrix" says:
 > "As said in other email, we play a trick in our test system to
 > make ovmf load grub automatically. "

Anybody have a clue what that trick is, and care to share?

IIRC Once you have have the NvVars created then you can make persistent 
modifications from an EFI shell.  You
cannot make persistent modifications from the OS unless you write the NvVars 
file directly because OVMF cannot
modify the NvVars files once the OS has started.  You can preconfigure the ESP 
with a bootx64.efi which is grub
or any other EFI executable or create a startup.nsh which configures the 
persistent boot options.


cat << EOF > startup.nsh
bcfg boot add 0 fs0:\EFI\example\my.efi "My EFI Executable"
rm fs0:\startup.nsh

Seems using the shell rather than the boot menu to modify boot settings gets me no further.

The timestamp on NvVars does get updated, but the boot options are gone once i hit "reset" in the shell.

Tried interactively as well. Installed Shell.efi to
/boot/efi/EFI/Boot/BOOTX64.EFI Here are some excerpts from a session:
Shell> ls fs0:\EFI\debian
01/25/2017  10:28 <DIR>         4,096  .
01/25/2017  10:28 <DIR>         4,096  ..
01/25/2017  23:38             119,808  grubx64.efi
bcfg boot add 0 fs0:\EFI\debian\grubx64.efi "Direkte EFI grub"

Shell> bcfg boot dump
Option: 00. Variable: Boot000A
  Desc    - Direkte EFI grub
DevPath - PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)/HD(1,GPT,90D5552B-FCC8-41EB-83A9-81A66A8995B6,0x800,0x1DC800)/\EFI\debian\grubx64.efi
  Optional- N
Option: 01. Variable: Boot0000
  Desc    - EFI Floppy
  DevPath - PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x0)
  Optional- N
The screen gets a bit messed up, old output not clearing and such, seems the efi shell is not aware of the size of the console window, but I'm pretty sure the above is a correct rendition of what happened. After entering "reset", I'm back at a long wait followed by the first boot entry being floppy.

Xen-users mailing list



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