Reverse boot menu version ordering creates a UX problem with dual-boot NixOS systems
Component
systemd-boot
Is your feature request related to a problem? Please describe
The new boot menu entry ordering is version-descending (see boot.c) which creates a UX problem with dual-boot systems.
Previously my boot menu looked like this ("best" options marked with *):
NixOS 371
NixOS 372
NixOS 373 *
> Windows *
Reboot to Firmware Interface
Sometimes I have NixOS as the implied default, and sometimes I have Windows as the explicit default set with the 'd' key. Either way, the other option is just a single keystroke away. Now the boot menu looks like this:
NixOS 373 *
NixOS 372
NixOS 371
> Windows *
Reboot to Firmware Interface
The most useful/likely entries are now split between the top and bottom of the menu, and if I want to run NixOS instead of Windows, I have to go to the other side. If I had other auto-detected entries, the problem would be worse.
This is something of a special case, since there's no "good" solution if you have e.g. multiple versions of every OS. But then the true solution would be a hierarchical menu, which I expect nobody is volunteering to implement right now :) so handling common special cases seems fair.
Describe the solution you'd like
I would be happy to revert to the old behaviour. I liked it and I don't see any advantage to the current setup - is a descending (i.e. reverse) sort really more intuitive than an ascending (forward) sort? Surely that's a matter of opinion - I don't think a poll was done before making the change.
Describe alternatives you've considered
In principle, this is fixable by moving the auto-entries to the top of the list, but this seems like needless UI churn compared to reverting.
Making sort direction (and auto-entry location) configurable would be a more flexible solution.
Alternatively, NixOS could leverage sd-boot's new sort-key feature to hardcode the order (by appending the version to each entry's sort-key), but I suspect this is a hack; if I had 3 versions of Ubuntu instead of 3 NixOS generations I would still feel the same way. This option pushes responsibility onto every distro the user has installed, and it doesn't seem in keeping with the purpose for which the sort-key was added.
Summary of proposed options: A) Revert to the old behaviour (version sort ascending) B) Make sort directions configurable (Lennart previously described this as chickening out, but I wouldn't mind being a chicken.) C) Move auto-entries to the top D) Leave it to users/distros to enforce an order by (ab)using the sort-key.
Related PRs: #22066, #22391, #22519, #22791
The systemd version you checked that didn't have the feature you are asking for
251.4, but the code is the same on main.
hmm, let my grok this: this bug is about the fact that you now have to press the down arrow three times instead of once before hitting enter? and you'd rather only press it once? is there a technical problem with your computer so that your key wears out so quickly? how often do you reboot into the other OS? 500 times per hour?
i wouldn't mind adding support for maybe making pagedown or so jump to next OS instead of next item in the list. with that you could save your very very expensive key strokes
Just press w or l.
hmm, let my grok this: this bug is about the fact that you now have to press the down arrow three times instead of once before hitting enter? and you'd rather only press it once? is there a technical problem with your computer so that your key wears out so quickly? how often do you reboot into the other OS? 500 times per hour?
That's why I raised it as a feature request not a bug. No, there is nothing wrong with my keyboard; I just don't like it when behaviour changes seemingly at random and invalidates my muscle memory. I tried my best to be polite and put effort into the post; please don't be an asshole about it. I came here to make a UX proposal, not have an internet fight with a budget Linus Torvalds.
I came here to make a UX proposal, not have an internet fight with a budget Linus Torvalds.
i don't know what else you were expecting posting an issue like this
fwiw, I was wondering why my boot menu was always putting the irrelevant boot loaders first. The first one is also the default unless something else is manually set, making blind boots dangerous.
I even tried ordering my loader entry filenames incrementally, but that didn't solve it. Turns out systemd-boot is doing the exact reverse, ordering entries with the biggest number first. Try figuring that out :smile:
This kind of defeats the principle of least astonishment. I came to the wrong conclusion that it was random and out of the user's control.
So yeah, some switch to control sort order would be nice. Thanks!