[Top][All Lists]

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

Re: [Regression] efi: Don't display a uefi-firmware entry if it's not su

From: Morten Linderud
Subject: Re: [Regression] efi: Don't display a uefi-firmware entry if it's not supported
Date: Wed, 31 Aug 2022 13:16:15 +0200

On Wed, Aug 31, 2022 at 12:07:33AM +0200, Philip Müller wrote:
> On 30.08.22 23:34, Javier Martinez Canillas wrote:
> > > 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.
> Well I think it would be the best approach to add backward compatibility as
> most users don't even know on how to install grub via grub-install. That is
> done via the graphical installer Calamares on most Arch-based Distributions.
> Updating the grub menu is common if you install multiple kernels or use
> snapshots via BTRFS.

Lets make a clear distinction between how Arch, the package upstream in this
case, and how derivative distros like Manjaro, the downstream user of this
package, uses grub though. The intent behind the packaging on our end does not
match up with what you the expectations you are conveying here.

Arch doesn't make assumptions about the users system and since `grub-install` is
a complicated command we can't automate this for users. If they use Secure Boot
they need to include modules, where is the ESP located and so on.

Arch requires the users to know how this command works, and it's a fair
assumption as it's documented in our install instructions. The fact that
derivative distros relies on this decision from Arch is their problem and should
not necessarily be a grub upstream issue.

Other distros build and ship monolithic grub.efi binaries for Secure Boot and
shim setups. From what I understand this entails that the configuration and the
binary stays in sync. This is not the case for Arch currently but might change
in the future.

If grub needs the configuration and grub.efi binaries to stay in sync, then it
would be much better for `grub-install` to support a config file like how people
have wound up using `grub-mkconfig`. Then shipping a hook that simply runs
`grub-install` would be simpler.

I think this is a good future solution as it would remove the need for distros
to ship `grub-install` wrappers anyway.

Morten Linderud

reply via email to

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