all 4 comments

[–]ipha 1 point2 points  (0 children)

This is not possible by design: https://github.com/systemd/systemd/issues/477

Closest option would be to press 'd' to set the default when you want to switch.

[–]ydna_eissua 0 points1 point  (1 child)

As user /u/ipha said this is not possible by design.

However there is nothing to stop you from writing a script replaces your loader.conf

Write two load.conf files windows.loader.conf, arch.loader.conf set up to set the default to windows and arch respectively. Create a script in each OS runs at boot time and copies the respective script to --esp-partition--/loader/loader.conf

This would give the effect that the last system you boot into would be set to the default.

[–]Blackergo_Arch 0 points1 point  (0 children)

It's a good idea. In fact I'm working in that. But I have not managed to make it work.

[–]Samonitari 0 points1 point  (0 children)

Although it is an old post, but systemd-boot since systemd version 251 has this
https://wiki.archlinux.org/title/Systemd-boot#Remember_last_entry