You are not logged in.

#1 2022-06-04 17:26:40

Jackseller
Member
Registered: 2020-08-03
Posts: 19

[SOLVED] sytemd-boot : sort loader files by name

Hi,

I am using systemd-boot as boot loader.

Till now, I named my loader files arch1.conf, arch2.conf, arch3.conf, etc... and they were automatically sorted by name on boot screen.
So arch1.conf was on top (and configured as default in loader.conf).

The result on boot screen was :

Arch Linux
Arch Linux - Fallback
Arch Linux -lts
Arch Linux-lts-Fallback

Today, I was doing a new install and it seems this method doesn't work anymore. I am unable to sort my loader files alphabetically. It seems to be sorted by date as default, whatever the name of the file.

Is there a way to sort the files by name as it was before ?

Last edited by Jackseller (2022-06-05 17:38:23)

Offline

#2 2022-06-05 17:01:21

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 714

Re: [SOLVED] sytemd-boot : sort loader files by name

systemd-boot's menu entry sorting changed in version 251. See https://systemd.io/BOOT_LOADER_SPECIFICATION/#sorting.

If you want a specific order, you need to use the "sort-key" option now. E.g. add:

sort-key 01

to the conf file of the top menu entry. "02" for the second, and so on.

Offline

#3 2022-06-05 17:40:48

Jackseller
Member
Registered: 2020-08-03
Posts: 19

Re: [SOLVED] sytemd-boot : sort loader files by name

Great, it works perfectly now.
Thank you for your help !

Offline

Board footer

Powered by FluxBB