Skip to content

sd-boot: sort menu items after removing boot counter from name #16457

@TriMoon

Description

@TriMoon

Is your feature request related to a problem? Please describe.
I'm trying to create 2 loader-entry files (eg. <ESP>/loader/entries/*.conf) in such a way that the one with boot-try counters gets selected before the one that has no boot-try counters but has its file name extended with other chars, fe:

  1. <ESP>/loader/entries/kubuntu+3.conf (with version 5.4.0-40-latest)
  2. <ESP>/loader/entries/kubuntu-prev.conf (with version 5.4.0-40-prev)
  3. <ESP>/loader/entries/kubuntu-old.conf (with version 5.4.0-28)

But using default kubuntu* or default kubuntu as setting inside <ESP>/loader/loader.conf is not showing the first as default when checking with bootctl list.

  • Files, 1&2, have almost identical contents with the exception of version as shown above plus different initrd value.
  • Same goes for file 3 plus different linux and initrd values.

The first IS shown as default when that entry has no boot-try counter though.

Describe the solution you'd like
bootctl and by extension systemd-bootx64.efi should select the first as default even with boot-try counters.
(Except when it is flagged as bad by the boot-try logic)

Describe alternatives you've considered
Still spinning my mind about how to accomplish this, any help appreciated...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions