You are not logged in.

#1 2018-08-13 07:40:06

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

EFI Systemd-boot or Xen EFI

Not really sure where this post belongs as I am trying to debug an issue and I can't tell which package to dig into the code of.

Systemd-boot efi option calls an EFI Xen binary; however, we cannot pass parameters to this EFI binary.

title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi
options acpi=false

Is there a bug with systemd-boot where I cannot pass parameters using the efi option?

Or, is there a bug with Xen's EFI binary where it normally reads parameters on command line from an UEFI shell; but, ignores those parameters when being passed by a boot loader (e.g. systemd-boot)? 

If we can narrow it down, I'll dig into the code and/or open issues for the executable.  But I'd rather not open a Xen issue if it is a problem with Systemd-boot, or vice=versa.

/TL;DR

I am researching the documentation on Xen EFI.  Specifically, this page: https://xenbits.xen.org/docs/unstable/misc/efi.html.

Now, there's a need to have multiple options in your bootloader (default, recovery, recovery shell-only, Xen, etc).  What I am trying to do is to extend those same kind of options into Xen by passing different parameters.  Via the URL above, there's a specific sentance at the end of the page:

Extra options to be passed to Xen can also be specified on the command line, following a -- separator option.

Not sure if that is talking only about the Chain option in the configuration file, or as a Xen EFI binary command line option.

I am using systemd-boot so I have multiple entries, such as:

10-xen.conf
11-xen-noacpi.conf

In the second one, I have set:

title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi --acpi=false

However, I get an error saying "Error loading \xen-4.11.0.efi --acpi=false : Not found".  I am not sure if this indicating that it is trying to find a file actually named "xen-4.11.0.efi --acpi=false", which would indicate some escaping command in Systemd-boot.  Or, does it mean the Parameter is Not found?

Also, the docs are not clear if it means to use -- as between efi binary and "options=" prefix or just individually listed separated by a space.  So I tried several combinations.

efi     /xen-4.11.0.efi --acpi=false
efi     /xen-4.11.0.efi -- acpi=false
efi     /xen-4.11.0.efi --options=font=8x8
efi     /xen-4.11.0.efi -- options=acpi=false
efi     /xen-4.11.0.efi -cfg=test.cfg
efi     /xen-4.11.0.efi --cfg=test.cfg

Where I copied existing xen.cfg to test.cfg for the last two.  Regardless of the combination, the exact same error comes up.

So I am not sure if there is some special escaping for systemd-boot's "efi" option needed; or, if the Xen EFI binary doesn't detect parameters (maybe EFI params?) if being launched from an UEFI Shell.

I also originally tried using the options field; but, it did not have any effect - even at attempting to purposely break it, the system continued to boot without error.  So the options field is ignored.

Last edited by eduncan911 (2018-08-13 14:26:53)

Offline

#2 2018-08-13 12:19:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: EFI Systemd-boot or Xen EFI

Afaik you have to list command line options you are passing to the EFI binary to boot in a seperate options field in your loader.conf as opposed to the efi line which should just contain the file path.

Not a packaging issue, moving to Apps & DE

Offline

#3 2018-08-13 12:34:49

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: EFI Systemd-boot or Xen EFI

V1del wrote:

Afaik you have to list command line options you are passing to the EFI binary to boot in a seperate options field in your loader.conf as opposed to the efi line which should just contain the file path.

This is described in the wiki as well
https://wiki.archlinux.org/index.php/Sy … ng_loaders

following a -- separator option.

This means a option that contains only two dashes, so it should be surrounded by spaces. This is a common pattern for parameter handling in linux.

Last edited by progandy (2018-08-13 12:39:45)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2018-08-13 14:16:21

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: EFI Systemd-boot or Xen EFI

V1del wrote:

Afaik you have to list command line options you are passing to the EFI binary to boot in a separate options field in your loader.conf as opposed to the efi line which should just contain the file path.

Ah, totally forgot to mention that.  Yes, I tried to that at first and it while that does allow it to boot - no combination of options yield any differences.  For example, I tried the following:

# no dashes
title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi
options acpi=false

# dashes
title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi
options --acpi=false

# attempting config file option
title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi
options -cfg=test.cfg

# config file option, no dash
title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi
options cfg=test.cfg

# double-dash config option?
title   Xen Hypervisor (ACPI Disabled)
efi     /xen-4.11.0.efi
options --cfg=test.cfg

None of these had any effect.  I purposely broke the test.cfg to see if it was using it or not.  I also passed junk parameters and looked for them in the journalctl log. 

I know if i pass a junk option in the xen.cfg, it halts the entire system.  So it is very sensitive.  However, nothing had any effect of using the "options" flag.

So basically, back to square one.  Is it a Xen callee thing, or an Systemd-boot EFI caller thing.

V1del wrote:

Not a packaging issue, moving to Apps & DE

Thank you for finding a home!  However, I don't think this has anything to do with Desktop environments nor any applications (which "DE" implies desktop applications - which this is not).  For example, I am setting up a farm of 9 servers that only run Xen and Arch dom0 - there is zero Desktop nor Applications in use here.

Perhaps we need to be moved again?

Last edited by eduncan911 (2018-08-13 14:27:47)

Offline

#5 2018-08-13 15:49:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: EFI Systemd-boot or Xen EFI

This would be one of the few cases that would make sense in the System Administration subforum, that has been closed down due to improper use, and it's about how to make the systemd-boot application pass parameters to an EFI file properly I'm thinking it's best to stay here.

Offline

Board footer

Powered by FluxBB