[Tutorial] Convert to systemd-boot

No because the entry name is going to change with kernel update.

A wildcard is the best solution.

1 Like
[limo@lenovo ~]$ ls /efi/loader/entries
2ba377af56ef4fb0898b46fcc244bcb9-5.15.63-1-lts.conf
2ba377af56ef4fb0898b46fcc244bcb9-5.15.63-1-lts-fallback.conf
2ba377af56ef4fb0898b46fcc244bcb9-5.19.4-arch1-1.conf
2ba377af56ef4fb0898b46fcc244bcb9-5.19.4-arch1-1-fallback.conf

I just looked at /efi/loader/entries/ and opened a file.
Seems there is a lot that can be done here.

change the default line in /efi/loader/loader.conf to read:

default 2ba377af56ef4fb0898b46fcc244bcb9*lts.conf

See if that works for you.

1 Like

This file has only:

timeout 3
#console-mode keep

Is that OK?
I just add

default 2ba377af56ef4fb0898b46fcc244bcb9*lts.conf

to the end of the file?

Yes

done.
Now it reads

timeout 3
#console-mode keep
default 2ba377af56ef4fb0898b46fcc244bcb9*lts.conf

I will reboot now.
UPDATE:
Done, it was set as default and booted to LTS.
Thanks a lot @dalto

Just curious as usual, wouldn’t this file and those folders allow me to put a few entries pointing to an earlier snapshot?

Out of curiosity I did

[limo@lenovo ~]$ systemd-analyze
Startup finished in 2.361s (firmware) + 3.373s (loader) + 2.395s (kernel) + 2.790s (userspace) = 10.921s 
graphical.target reached after 2.725s in userspace.
[limo@lenovo ~]$ 

That is total of 10.921s + 2.725s = 13.646 compared to about 20 ~ 22 s before.

So, using systemd-boot, we don’t have to worry about this anymore?
https://security.archlinux.org/package/grub

1 Like

You can solve that problem with pacman -Rc grub :wink:

It is possible but it might not work even if you did., Since the kernel is now outside the snapshot, if you booted into a snapshot with a different kernel version the modules and kernel version will be mis-matched.

1 Like

:+1:

So, as long as the kerenel version is till the same (no kernel update) it will work?
This would be better than nothing.
Whenever a kernel gets updated we modify the file. Maybe a little script can update the file to reflect the latest kernel. hopefully automatically.

What you think?

It should

Feel free to give it a shot.

1 Like

Thank you for this guide! I made my setup by manual way and all went well.

Btw you don’t need pacman hook if you enable:systemd-boot-update.service

3 Likes

Thank you for the guide.

Can I remove:

UUID=XXXXXXX /boot/efi vfat umask=0077 0 0
out of my `/etc/fstab/ afterwards? Or is /boot still needed, it just has to stay empty?


Also is it possible to boot into Windows via systemd-boot if Window & Windows bootloader are on a different disk from my EndeavourOS installation?

If you follow the tutorial, that shouldn’t be in your /etc/fstab anymore because you change it in this step:

# To make the mount change permanent, edit `/etc/fstab` and change where it reads `/boot/efi` to `/efi`

I am not sure. I think the Windows stuff is all automated. Did it not add it?

1 Like

Sorry, I should read it more carefully.

Thank you for your help.

__

I did not follow the instructions yet, I wanted to know beforehand if I can stil boot into Windows or not (without going through the UEFI BIOS boot entrys each time)

1 Like

Generally speaking, systemd-boot automatically detects Windows and adds an entry for it. However, I haven’t tried to dual-boot Windows in a long-time so I don’t know if it supports that specific configuration.

1 Like

Sorry, I have another question:

Does this mean that I would have to edit my /etc/fstab/ again?

So “undo” this step:

And change /efi to /boot?

Yes, if you want it mounted on /boot

Yes.

1 Like

Thanks, I guess the manual method is for advanced users?

Since it does not explain those steps in detail nor the the symbolic link stuff (thus assumes that the users know what they are doing)…

I guess I should stick with kernel-install method but the easy modify kernel options from the manual method sound intriguing. Mhh :thinking:

Once again thank you for taking your time and creating this tutorial.

Err…the manual method is for people who want to take a “do it yourself” approach and/or people who want things to be more “arch-like”.

The kernel-install method is for people who want things to be automated and/or people who want things more “systemd-like”.

It is pretty simple with the kernel-install method too. You just edit /etc/kernel/cmdline and re-run kernel-install.

1 Like

@dalto
Hopefully my last question:

I now have several folders in /efi/EFI/ (following the kernel-install method):

drwxr-xr-x 2 root root 4,0K 27. Aug 20:43 boot
drwxr-xr-x 2 root root 4,0K 27. Aug 15:08 endeavouros
drwxr-xr-x 2 root root 4,0K 25. Aug 21:25 EndeavourOS-grub
drwxr-xr-x 2 root root 4,0K 27. Aug 20:43 Linux
drwxr-xr-x 2 root root 4,0K 27. Aug 20:43 systemd

Do I need all of them (especially both endeavouros and EndeavourOS-grub)?

image