Skip to content

systemd-boot: default boot entry ignored with systemd v245 #86422

@danielfullmer

Description

@danielfullmer

Describe the bug
With systemd-boot v245, the default set in loader.conf by systemd-boot-builder.py is no longer respected. In the current state, it will always choose the boot loader entry with the largest version in the loader .conf file. This corresponds to the largest generation number.

To Reproduce
Steps to reproduce the behavior:

  1. On nixos-unstable, run bootctl install or bootctl update to ensure the latest systemd-boot is used.
  2. Run nixos-rebuild boot --rollback to switch back to a previous generation.
  3. Reboot and notice that it still defaults to the latest generation, not the previous one.

Additional context
This is a result of the following change: systemd/systemd@6cd12eb
The fix seems fairly straightforward, to just have systemd-boot-builder.py include the .conf suffix on the default entry in the loader.conf file. However, we would still have a problem if the user is using an older version of systemd-boot (if he or she hasn't updated with bootctl update).
Similarly, a user who hasn't updated systemd-boot using bootctl update since updating to v235 would not encounter this issue, since the default is still correct for their version of systemd-boot.

Upstream issue: systemd/systemd#15068

Notify maintainers
@flokli @andir @edolstra

Metadata

Metadata

Assignees

Labels

0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions