Systemd boot menu after restart

But isn’t changing the filenames going to break the auto selection for people who added wildcards to their “loader.conf”?

For example I added --arch?-?.conf* to the default entry so it always selects the mainline kernel for my desktop and a different wildcard to always select the LTS kernel for my laptop. This also works across kernel updates.

I assume this looks for matching files in the “entries” folder and changing the file names would break this for everyone who set it up like that (as was suggested on the wiki page https://discovery.endeavouros.com/installation/systemd-boot/2022/12/).

Yes. That being said, we haven’t committed to any changes yet. Currently, @BS86 is investigating what is viable.

Thanks for pointing that out. I didn’t realize until now, that the arch - part is part of the Version number on that specific one, but I think that should be solveable with some script logic.
It will still break the specific example, but it could be changed to a new matching string.
With that in mind, my goal would be to get the files looking like that:

69d6b9d7e...262e8290-lts.conf
69d6b9d7e...262e8290-lts-fallback.conf
69d6b9d7e...262e8290-arch.conf
69d6b9d7e...262e8290-arch-fallback.conf
69d6b9d7e...262e8290-zen.conf
69d6b9d7e...262e8290-zen-fallback.conf

But even if I get it to do that, it is not for me to decide if that can be used for EndeavourOS default packages, or just become a tutorial here on the Forum.

3 Likes

Unfortunately, my free time for today got consumed by work and converting my own system to systemd-boot and writing a tutorial on how to add an entry for Windows on another ESP, which can be found here

However, while now looking into the stuff on the system I am familiar with and also confirming that the @saved entry stays functional when
a) recreating the .conf files through changing boot parameters and running sudo reinstall-kernels and also
b) adding and removing kernels, or
c) the update of the LTS kernel that landed yesterday in testing - which changed the displayed order

I think I can now say for sure, that @saved does indeed save text strings in the background, and not some hash or boot order number.
However, the .conf files for the kernels contain

sort-key   endeavouros-6.1.12-arch1-1

And it could be, that @saved actually saves that string and not the string which is the filename of the .conf file.
However, it correctly saves the Windows-entry, too. Which could mean that it does still save the filename because the Windows-entry does not have a sort-key. And it can’t be the title, because that would match on all EndeavourOS entries: title EndeavourOS

I hope my free time tomorrow is enough for further investigations in that direction.

If what it is saving is the sort-key, that would be an easy change.

1 Like

well, I am now sure that it is the conf - filename, which internally is titled “ID”
from:
https://www.freedesktop.org/software/systemd/man/bootctl.html

`set-default ID, set-oneshot ID

Sets the default boot loader entry. Takes a single boot loader entry ID string or a glob pattern as argument.

and when typing bootctl list the ID is actually printed:

         type: Boot Loader Specification Type #1 (.conf)
        title: EndeavourOS (6.1.12-1-ck) (default) (selected)
           id: 56466391XXXXXXXXXXXXXXXX085dc-6.1.12-1-ck.conf
       source: /boot/efi//loader/entries/56466391XXXXXXXXXXXXXXXX085dc-6.1.12-1-ck.conf
     sort-key: endeavouros-6.1.12-1-ck
      version: 6.1.12-1-ck
   machine-id: 56466391XXXXXXXXXXXXXXXX085dc
        linux: /boot/efi//56466391XXXXXXXXXXXXXXXX085dc/6.1.12-1-ck/linux
       initrd: /boot/efi//56466391XXXXXXXXXXXXXXXX085dc/6.1.12-1-ck/initrd
      options: ...

         type: Boot Loader Specification Type #1 (.conf)
        title: Windows 11
           id: windows.conf
       source: /boot/efi//loader/entries/windows.conf
          efi: /boot/efi//tools/shellx64.efi
      options: -nointerrupt -noconsolein -noconsoleout windows.nsh

so we now know that internally, they use that ID to determine the right entry, and that ID is identical to the name of the conf - file in esp/loader/entries
Unfortunately that’s again my free time for today …

just a heads up - I haven’t forgotten about this task, I was just extremely busy and not sure when things will slow down.
But I will have to take 2 weeks of rest due to sick leave in April which might give me some time to deal with long overdue stuff like getting the saved-entry persist through kernel updates.

1 Like

don’t stress. with the last updates i now have the lts kernel in the first place of the systemd menu. of course i don’t know what all has been changed and who has worked on it.

i hope it’s nothing serious. all the best!

1 Like

that’s just the default sort order reacting to the new version numbers. No one has worked on it.

just an every day thing that requires the body to rest, but working on software is the exact thing that keeps the mind busy and the body rested.

2 Likes