Access efi folder to change to set default kernel

Good Morning,

I have the problem that I don’t know how to access the efi folder to set the default kernel to the zen kernel. I can change the kernel during boot by pressing F1 and select default, but with every update of the kernel the setting gets reset.

https://discovery.endeavouros.com/installation/systemd-boot/2022/12/

So I want to access the efi folder to edit loader.conf file to set the zen kernel with wildcards (?) to be the default and after an update the setting remains.

sudo nano /efi/loader/loader.conf and edit the file as desired.

Press Ctrl-O, enter and Ctrl-X to save and exit nano.

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.

https://discovery.endeavouros.com/installation/systemd-boot/2022/12/

4 Likes

Thank you very much that worked perfectly. Now i know what my failure was, I tried to access efi with cd

sudo -s cd /efi/loader

And then ls to see where I am

ls

This never worked. Maybe you have a command for privileged folder access?

$ sudo -s (type in your password)

# cd /efi/loader

PS.
If your initial issue is solved, please consider marking the post giving the solution as such.

3 Likes

Thank you so much. I wish you a nice weekend.

1 Like

You are welcome!

Have a nice weekend you too!

:enos: :wave:t5:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.