swh
February 13, 2023, 2:38pm
1
hello, i’ve installed succesfully the newest cassini neo on my PC as I have announced the past few days.
short question: how do i get systemd-boot entry to make my pc always boot with the last selected kernel? or is this so intentional that i have to select each time which kernel i want to start.
i have linux, linux-lts and linux-zen kernel.
BS86
February 13, 2023, 2:43pm
2
I was told that systemd-boot can’t do that. It can only boot a preconfigured entry, not the last used entry.
Because of that, I still use grub.
Edit: That is the topic I asked the question with the possible “workaround” that does not do exactly the same in case that one of the entries is a Windows bootloader:
sudo bootctl set-default @current should set the currently booted kernel as default.
I guess it needs to be repeated if one boots into another kernel and wants that as default unless there is a similar way to make it permanent like in grub with:
GRUB_DEFAULT="saved"
GRUB_SAVEDEFAULT="true"
swh
February 13, 2023, 2:46pm
3
Ok thanks, didnt know that. First time i use systemd-boot.
It#s not that problem. i will just have to choose
opened 07:13AM - 03 Jul 15 UTC
closed 10:57PM - 03 Jul 15 UTC
sd-boot/sd-stub/bootctl
When no default boot option is set in loader.conf ("default" is omitted) and the… "LoaderEntryDefault" efivar isn't set, automatically pre-select (highlight) the last used boot entry in the EFI boot menu. In the case of a first-time boot, keep the current behavior of selecting the last suitable boot entry.
Use cases:
- Restarting an OS without having to manually select it again on boot. A system restart would always return to the same OS from which it was executed.
- Returning from hibernation would highlight the hibernated OS on boot, reducing the chance of accidental boot failures when a different OS tries to boot and mount a locked filesystem.
(The above use cases assume the OS was initially boot using systemd-boot)
Note that this functionality should apply to any OS boot entry, including auto-detected ones. (Windows and OSX, for example)
https://man.archlinux.org/man/loader.conf.5#OPTIONS
If set to “@saved ” the chosen entry will be saved as an EFI variable on every boot and automatically selected the next time the boot loader starts.
3 Likes
BS86
February 13, 2023, 2:49pm
6
Thanks! Last time you linked that bug, it ended with the post by cecton from Dec 2021 - the new additions in that issue actually make it usable for me.
swh
February 13, 2023, 2:53pm
7
Ok, on EOS there is no entry /boot/efi/loader/loader.conf
just /efi/loader/loader.conf
BS86
February 13, 2023, 3:06pm
9
@dalto maybe you can add the new information here
1 Like
swh
February 13, 2023, 3:15pm
11
this file is typically located in /efi/loader/
directory. Can you change this please.
dalto
February 13, 2023, 3:18pm
12
I am not sure this should be added to the Wiki. Won’t kernel updates break this?
this was the AI only copy pasted a screenshot
1 Like
system
Closed
February 15, 2023, 3:19pm
14
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.