Bug 1293725

Summary: UEFI bootloader is not updated by rpm-ostree, even though rpm package version suggests otherwise
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: rpm-ostreeAssignee: Colin Walters <walters>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 31CC: fmartine, mattdm, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-03 23:31:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Murphy 2015-12-22 20:58:36 UTC
Description of problem:

On a UEFI system, /boot/efi/EFI/fedora/grubx64.efi is not updated by 'rpm-ostree upgrade' even though the grub2-efi package version is updated.


Version-Release number of selected component (if applicable):
rpm-ostree-2015.11-1.fc23.x86_64
ostree-2015.11-2.fc23.x86_64


How reproducible:
Always

Steps to Reproduce:
1. rpm-ostree upgrade
2. reboot
3.

Actual results:

System is now on 23.38 and rpm -q reports grub2-efi-2.02-0.25.fc23.x86_64.

However, sha256sum of /boot/efi/EFI/fedora/grubx64.efi matches that of the grubx64.efi binary in grub2-efi-2.02-0.23.fc23.x86_64.rpm


Expected results:

grubx64.efi should be the binary in the package reported to be installed.


Additional info:

https://lists.fedoraproject.org/archives/list/cloud%40lists.fedoraproject.org/thread/JUTQBMUSO25WRAWTFLTMODM2MUBEF2RR/

Comment 1 Colin Walters 2015-12-22 21:54:43 UTC
This is currently expected; there are no %post scripts per package on the client, they're all run on the compose server.  extlinux used to update itself in %post but that was backed out.

Bootloaders for rpm-ostree are thus installed exactly once by Anaconda right now.

Offhand I'd say that it'd be best if Fedora had a once-per-major-version upgrade model for the bootloader.  This could be a systemd service, or generally something shared by the fedup code and rpm-ostree.

Comment 2 Chris Murphy 2015-12-23 04:19:47 UTC
Short term fix proposal: How about rpm -q spits back grub2-efi-2.02-0.23.fc23.x86_64.rpm? i.e. pin the version of the RPM so that it actually matches the version of the EFI bootloader binaries on the ESP? At least that way I'm not mislead by the reported version number into thinking I've got the 0.25 fix for CVE-2015-8370.

I don't think it's realistic to have a once per major version upgrade model. The updates aren't arbitrary, they happen when they happen, and we have to have a way for atomic baremetal installs to be as secure and up to date as non-atomic baremetal installs - eventually.

Comment 3 Chris Murphy 2015-12-23 19:57:23 UTC
For example, grub2-2.02-0.7.fc22 is the first instance of GRUB for Fedora 22, and the current one is grub2-2.02-0.18.fc22. In that time frame, CVE-2014-4607 and CVE-2015-8370 were fixed, as were a bunch of bugs. On average it looks like each release sees GRUB updated about 10 times.

I see this bug as a kind of regression from UEFI non-atomic installs, back to the broken state on BIOS, except worse because grub2-install isn't available on UEFI. The user has to know to copy /usr/lib/ostree-boot/efi/EFI/fedora/grubx64.efi to the ESP to actually update the bootloader.

Comment 4 Colin Walters 2016-01-04 16:41:46 UTC
I agree this is a problem that we need to fix, but it's also not new to Atomic; *non*-UEFI *non* Atomic, i.e. BIOS "mainline" installs also don't have the bootloader updated by RPM updates either.

Comment 5 Colin Walters 2016-01-27 14:46:47 UTC
Unlikely to design a solution here soon, but keeping the bug open.

Comment 6 Fedora End Of Life 2016-11-24 14:27:54 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-02-28 09:51:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 8 Colin Walters 2018-02-06 15:28:50 UTC
As a short term hack, it should work to just e.g.:

rpm2cpio grub2-efi-x64 | (cd / && cpio -div) or equivalent.  Obviously this could be scripted/controlled in a much more nice way.  We should probably better track the RPM versions of things we install into /boot.

Comment 10 Fedora End Of Life 2018-02-20 15:26:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 11 Ben Cotton 2019-05-02 22:06:04 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Javier Martinez Canillas 2019-05-19 12:22:45 UTC
For reference, I've opened an ostree issue about this some time ago:

https://github.com/ostreedev/ostree/issues/1649

Comment 13 Ben Cotton 2019-08-13 17:08:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 14 Ben Cotton 2019-08-13 19:19:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 15 Ben Cotton 2020-11-03 17:29:08 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Colin Walters 2020-11-03 23:31:21 UTC
This is the job of https://github.com/coreos/bootupd/ - we are shipping it in FCOS.