sd-boot: fix menu ordering with boot counting#15577
sd-boot: fix menu ordering with boot counting#15577poettering merged 1 commit intosystemd:masterfrom
Conversation
systemd-boot selects the last valid entry by default, not the first. Fixes: systemd#15256
|
hmm? not sure i follow. sd-boot generlly boots the first entry in the boot menu, not the last, hence when we consider a boot entry "bad" we order it to the end? not sure i groke this? can you elaborate? |
|
@poettering I don't believe its true that sd-boot selects the first entry by default. To test, I placed 3 files in /boot/loader/entries with versions 1, 2, and 3, and made sure there is was no "default" in loader.conf. Upon booting, version 3 is selected at the bottom (excluding the "boot into firmware interface" option): If you only have 1 loader entry, and some automatically generated options, which are ordered at the end of the list, it might appear that Finally, here is the relevant code in Lines 1628 to 1651 in f20078d |

systemd-boot selects the last valid entry by default, not the first.
Fixes: #15256
Please let me know if I'm misunderstanding something. I'm looking to implement automatic boot fallback using
systemd-bootin NixOS here: NixOS/nixpkgs#84204