Systemd-boot and multiple kernels

The method that will survive the kernel being renamed is the one described in post 2: Systemd-boot and multiple kernels - #2 by BluishHumility

I also found the wiki entry dalto mentioned, which bears the same explanation: https://discovery.endeavouros.com/installation/systemd-boot/2022/12/

How to change the default entry to boot

There is a default entry inside /efi/loader/loader.conf that determine the default boot entry.

On a new install, it will look something like this:

default 665eca4ae83246df8ec17d1cbc6a1763*

That first string of characters is you entry token which identifies the install. That is important if you are dual-booting with another Linux, otherwise it can be replaced with *. That line supports wildcards and so if you want to boot the LTS kernel by default you could use something like this:

default 665eca4ae83246df8ec17d1cbc6a1763*lts.conf

Alternatively, if you want to boot the mainline kernel by default, something like this should work:

default 665eca4ae83246df8ec17d1cbc6a1763-*-arch?-?.conf

These changes will take effect on the next reboot and nothing else is required except modifying the file.

3 Likes