2

Please, how do I set systemd-boot/kernelstub (/boot/efi/loader/loader.conf) to remember last booted OS? In GRUB its easy by GRUB_SAVEDEFAULT=true ... but in POP! OS... How? Thanks!

crysman
  • 852

4 Answers4

1

This has been implemented by setting

default @saved

in the loader.conf and running bootctl install

see https://man.archlinux.org/man/loader.conf.5#OPTIONS or man loader.conf for details.

opennomad
  • 301
0

Such feature/option is not implemented in systemd-boot, at least not entirely. You can at best press d to save the highlighted entry as conf-overriding default in an EFI variable. If you want "last as default" to happen you need to press d every time before Enter.

It shouldn't be too hard to implement, although I am not sure if upstream want to have such option, as they probably tend to keep systemd-boot simple.

Besides, you can always use grub instead.

Tom Yan
  • 10,996
0

That's the neat part: You don't.

We do not want to write to the EFI variables unless such action is explicitly requested by the user. The EFI variable store is fragile on some machines and it should not be touched by any action during normal operations.

There is the d key for for default, to set the default manually.

https://github.com/systemd/systemd/issues/477#issuecomment-118436201

Your best bet would be to install GRUB2.

0

Answers already mentions default @saved in the loader.conf and systemd changelog does not mention this, but based on the merge date of https://github.com/systemd/systemd/pull/21070 I assume that this option is available after systems 251.

PopOs 22.04 has systemd 249. So maybe this option will be available after the next popos release.

sudo bootctl status should return Features: Support @saved pseudo-entry

Alex
  • 1
  • 1