Skip to content

"Ignoring downgrade" with older grub2-efi installed #933

Closed

Description

@miabbott

I upgraded my system to Fedora 42 (specifically a custom build of Silverblue 42 using the Universal Blue tooling), which includes grub2-efi-ia32-2.12-28.fc42.x86_64 and grub2-efi-x64-2.12-28.fc42.x86_64, etc

When I check the output of bootupctl status, I see the following:

$ sudo bootupctl status 
Running as unit: bootupd.service
Component EFI
  Installed: grub2-efi-ia32-1:2.12-21.fc41.x86_64,grub2-efi-x64-1:2.12-21.fc41.x86_64,shim-ia32-15.8-3.x86_64,shim-x64-15.8-3.x86_64
  Update: Ignoring downgrade
No components are adoptable.
Boot method: EFI

It looks like the shim packages have successfully upgraded the EFI binaries, but the grub2-efi packages have not.

When I try bootupctl update, it reports no updates avaiilable.

$ sudo bootupctl update
Running as unit: bootupd.service
No update available for any component.

Nothing in the journal points to a failure or error.

Activity

  1. added
    help wanted
    triaged
    on May 28, 2025
  2. HuijingHei commented on Jun 30, 2025

    @HuijingHei
    Contributor

    Thank you @miabbott for the reporting, I can reproduce when I upgrade from stable stream 41.20250331.3.0 that includes grub2-efi-x64-1:2.12-21.fc41.x86_64

    [root@cosa-devsh updates]# cat EFI.json | jq
    {
      "timestamp": "2025-03-27T11:42:23Z",
      "version": "grub2-efi-x64-1:2.12-21.fc41.x86_64,shim-x64-15.8-3.x86_64"
    }
    

    to newer 42.20250609.3.0 that includes grub2-efi-x64-1:2.12-28.fc42.x86_64

    [root@cosa-devsh updates]# cat EFI.json | jq
    {
      "timestamp": "2025-03-27T10:27:15Z",
      "version": "grub2-efi-x64-1:2.12-28.fc42.x86_64,shim-x64-15.8-3.x86_64"
    }
    

    Run bootupctl update, get No update

    [root@cosa-devsh updates]# bootupctl status
    Running as unit: bootupd.service
    Component BIOS
      Installed: grub2-tools-1:2.12-21.fc41.x86_64
      Update: Ignoring downgrade
    Component EFI
      Installed: grub2-efi-x64-1:2.12-21.fc41.x86_64,shim-x64-15.8-3.x86_64
      Update: Ignoring downgrade
    No components are adoptable.
    CoreOS aleph version: 41.20250331.3.0
    Boot method: EFI
    
    [root@cosa-devsh updates]# bootupctl update
    Running as unit: bootupd.service
    No update available for any component.
    

    But it should update, this is the corner case that the new 42.20250609.3.0 with timestamp 2025-03-27T10:27:15Z < older 2025-03-27T11:42:23Z in 41.20250331.3.0, though the version is newer. We should find a workaround for this.

  3. travier commented on Jun 30, 2025

    @travier
    Member

    Hum, why are we checking the timestamps and not relying only on the versions?

  4. cgwalters commented on Jun 30, 2025

    @cgwalters
    Member

    Parsing version numbers gets into the thorny issue of cross-distribution version strings. There's of course https://uapi-group.org/specifications/specs/version_format_specification/ and maybe we could try to constrain our inputs to match that.

  5. added
    jira
    on Aug 4, 2025
  6. cgwalters commented on Aug 8, 2025

    @cgwalters
    Member

    This is I think probably a relatively unusual case in that the build for Fedora N-1 is chronologically newer than the version for Fedora N.

    However...instead of going all the way to comparing version numbers in the same way RPM does, we could simply incorporate the data from /usr/lib/os-release into our calculations. If the combination of either $ID or $VERSION_ID have changed, we assume that we need to apply the update, regardless of timestamp.

    But inside an "$ID-$VERSION_ID" (an OS stream/release/version) I think it's pretty safe to just rely on timestamps and not tie ourselves to any specific package system comparison method.

  7. HuijingHei commented on Aug 10, 2025

    @HuijingHei
    Contributor

    But inside an "$ID-$VERSION_ID" (an OS stream/release/version) I think it's pretty safe to just rely on timestamps and not tie ourselves to any specific package system comparison method.

    I am concerned that if we transfer to /usr/lib/efi and not rely on rpmdb, might need to compare the version as can not get the timestamp from path /usr/lib/efi/<grub2|shim>/<version>-<release>, WDYT?

  8. cgwalters commented on Aug 13, 2025

    @cgwalters
    Member

    You are right that trying to adapt to the /usr/lib/efi format would force comparing version numbers.

    However, one option here is to suggest that OSes using this conform to https://uapi-group.org/specifications/specs/version_format_specification/ instead.

    One way to do that I think for Fedora would be to start by ignoring the epoch. If a component there ever needed to bump epoch, we'd have to instead map it to one of ~ or ^.

    But actually since nowadays RPM supports those too I think we could just hopefully not ever bump epoch again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedjiratriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions