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: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: passing options to grub in xen,openfirmware and efi
Date: Wed, 29 Apr 2015 17:02:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0

On 23.04.2015 11:35, Andrei Borzenkov wrote:
> 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.
I'm aware of the problem and I fully agree with you. Automatic install
doesn't use those and I think the reason for it was to specify root in
early days of porting. I don't think it's used for anything nowadays.

Also unless there is a good usecase for having command line parsing, I'm
all for killing existing ieee1275 parsing altogether and not introducing
any parsing in the future.
> 
> 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 :)
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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