grub-devel
[Top][All Lists]
Advanced

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

Re: passing options to grub in xen,openfirmware and efi


From: Andrei Borzenkov
Subject: Re: passing options to grub in xen,openfirmware and efi
Date: Thu, 23 Apr 2015 12:35:51 +0300

On Thu, Apr 23, 2015 at 11:03 AM, Olaf Hering <address@hidden> wrote:
>
> Is there a way to pass options to grub in a Xen PV domU, in openfirmware
> and in EFI environment?
>
> In a PV domU arguments can be passed to the specified
> kernel="/path/file" with the extra="what ever" option.
> In openfirmware the arguments may come from the /boot/chosen node.
> In EFI it may be possible as well, not my area of expertise.
> In the wellknown dumb i386 BIOS no such way exist.
>
> In case grub has code to evalute these things, how can such arguements
> be used within grub.cfg? Where is that documented?
>

I believe the question briefly came up already but without any
followup. IIRC it was in relation to how to pass real kernel name to
grub in Xen.

For OFW grub will parse bootargs property, interpret it as series of
variable assignments separated by ";" and set these variables. There
is nothing similar for Xen or EFI cases currently. For EFI we could
fetch arguments using Loaded Image Protocol (LoadOptions). Another
option (in addition, not either/or) is to define GUID for grub and set
them in NVRAM.

What I do not like is the possibility to blindly set any internal
variable (consider overriding of $prefix). I'd prefer to set variables
in separate namespace, like grub.arg.XXX=YYY for XXX=YYY argument and
let user figure out what to do with them.

As long as variables are defined you of course can do whatever you
like with them, including referencing them in grub.cfg. How you can
use them in grub.cfg is limited only by your imagination then :)

I do not think it is documented anywhere mostly because feature does
not really exist; I suppose OFW was added mostly as prerequisite for
something else. git blame may answer it.

And of course patches are welcome :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]