On Mon, Apr 12, 2021 at 5:43 AM Zbigniew Jędrzejewski-Szmek
<zbys...@in.waw.pl> wrote:
>
> On Sat, Apr 10, 2021 at 09:04:09PM -0000, Filippe LeMarchand wrote:
> > > This shouldn't be the case. Unless there's a bug, grub2 may be
> > > installed an unused. If it interferes with sd-boot, please file
> > > a bug.
> >
> > The grub2-efi-x64 package contains directory
> > /boot/loader/entries. AFAICT this directory presence alone makes
> > kernel-install script install the boot files there instead of
> > /boot/efi/loader (which is needed for sd-boot). Should this be
> > considered a grub2 bug?
>
> It's not only a grub2 bug, it's also a straightforward recreation of a
> bug that was already fixed once with a lot of pain [1].
>
> At the time a solution was hashed out that depends on the presence of
> certain directories [2]. The idea was that bootctl would create
> /boot/efi/loader/entries only when 'bootctl install' is called [3].
> And the appropriate grub2 equivalents would do that same when grub2 is
> installed to EFI. And generally, it should be fine for both sets of
> rpms (and even other boot loaders!) to be installed into the system,
> so that systems don't stop booting again when the grub2 rpms are
> pulled in through a dependency.
>
> This is fragile, and is certainly not an ideal solution, but we didn't
> have a better solution that would work for existing systems without an
> explicit user intervention. But now grub2 embeds /boot/loader/entries
> directly in grub2-efi-x64.rpm, breaking things.
>
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1648907
> [2] https://github.com/systemd/systemd/commit/cf73f65089
> [3] https://github.com/systemd/systemd/commit/341890de86
>
> In fact, the presence of a bunch of other files in /boot in
> grub2-efi-x64 seems like a bad idea. IMO, just installing the grub2
> packages should either not modify /boot (which is not the exclusive
> property of grub2 and often has limited space), or if this cannot
> be done, grub2 needs to make sure that the grub2 packages are not
> a dependency of anything and can only be installed with an explicit
> user request.
>

Ideally, we should change to a system similar to what openSUSE does
and have the RPMs install bootloader content into /usr, then execute a
helper program that copies things over to /boot and configures things
properly (we should still have the files %ghosted in /boot, though!).
This makes it much more straightforward to support updating or
downgrading bootloader files when needed, which is why openSUSE does
it this way to support full system snapshots with rollback
functionality.



-- 
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to