grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/1] Add support for grub-emu to kexec Linux menu entries


From: Robbie Harwood
Subject: Re: [PATCH v2 1/1] Add support for grub-emu to kexec Linux menu entries
Date: Tue, 23 Aug 2022 17:03:46 -0400

Daniel Kiper <dkiper@net-space.pl> writes:

> On Tue, Aug 16, 2022 at 12:07:06PM -0400, Robbie Harwood wrote:
>> Raymund Will <rw@suse.de> writes:
>>
>>> Granted, the duplication of `--kexec` to signify "force it", might
>>> as well be spelled out as `--force-kexec` (or something similar).
>>> (But that change will provoke inconsistencies during an indefinite
>>> migration phase, where pre-boot images don't match binaries in the
>>> root filesystem, notably, when rollback snapshots come into play.)
>>
>> Passing --kexec twice (or --force-kexec) doesn't appear to change
>> anything in the versions of this patch I can easily find.  We could
>> add
>
> Yeah, I think Raymund is talking about a bit different version of the
> patch. Raymund, could you provide us the one which has that features,
> and potentially others, implemented?

openSUSE's version of this patch has support for that which I'll
incorporate in the next version.

>> the behavior you're describing though - Daniel, would that help with
>> your concerns about it?
>
> I would prefer --force-kexec but if double --kexec is used in existing
> environments I am OK with the latter. However, please document this
> behavior in the GRUB's docs.

Appears to be in use in openSUSE; I imagine they'll want that
preserved.  Could probably add --force-kexec as well if that's desired.

>>> Config-overrides in `grub.cfg` in turn would be a nice addition, but
>>> are relatively expensive to implement, as they'd probably need to be
>>> parsed and split into an array for `grub_util_exec()`, right?
>>
>> Yes.  It's inevitably best-effort, especially if we can't depend on a
>> working shell.
>
> I would prefer to have "config-overrides" but if it requires tons of
> work I am OK with existing implementation, +/- minor tweaks/fixes,
> assuming its assumptions and limitations are properly documented.

I think the reason Raymund and I are hesitant is due to the lexing of
arguments.  We need to split them to pass to grub_util_exec(), which
means we need to know how to split them.  And we can't just split on the
space character because of things like --append - i.e., it can
reasonably have spaces in it.  Quoting also is a problem for similar
reasons (and the suggested syntax uses single quotes).

So I don't see a simple way out, but maybe I've missed something.  Are
there particular arguments you have in mind for adding?  Maybe they
should be made default, or have specific options.

Be well,
--Robbie

Attachment: signature.asc
Description: PGP signature


reply via email to

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