On 8/30/22 23:14, Mike Gilbert wrote:> On Tue, Aug 30, 2022 at 4:16 PM Robbie 
Harwood <rharw...@redhat.com> wrote:
>> Why doesn't grub on the MBR get updated when you install a new grub
>> package?  That seems like the real issue here - what am I missing?
> 
> I think the grub project tries to maintain config file compatibility
> with older versions so that users can use new config files even if an
> older grub version is still installed in /boot/grub.
>

In my opinion the grub configuration scheme is already too complex (a script
that executes a set of scripts that generate sections of a script executed
on boot) to also throw backward compatibility in the mix.

I agree with Robbie here, either don't re-generate your GRUB config file in
a installed system or update the GRUB core image in the embedding gap too.

Anything but that feels like an uphill battle to me and would just add much
more complexity.
 
>> Regardless, if we can't count on fwsetup being updated, then I think we
>> need to go back to the original version of my patch which doesn't have
>> --is-supported.
>

Indeed. The original patch didn't use that option, it was added to address
some feedback that Robbie had on an earlier version.
 
> You could add a feature flag, which causes grub-core to set an
> environment variable when a new feature is supported. See the features
> array in grub-core/normal/main.c.
>
> You would then check for this feature flag in the grub.d snippet
> before calling fwsetup --is-supported.
>

Please don't. As mentioned, I think we should aim to simplify the grub.cfg
instead of making it more complicated.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to