How can I persist kernel options with systemd-boot?

Hey All

I need to add some specific boot options, in my case it’s mem_sleep_default=deep

I can add this to the /boot/loader/entries/ file but this seems to get regenerated when I upgrade (kernel or systemd, not figured it out yet).

What is the precursor to that file? If this was grub, I’d change the grub.cfg.

Is there an equivalent for systemd-boot?

Thank you in advance!

Hey :wink:

After every kernel upgrade update-grub will be run. I guess you need to add it to GRUB_CMDLINE_LINUX= in /etc/default/grub .

best regards

Hi - I’m using systemd-boot, not grub. Do you know the equivalent for systemd-boot?

Hi!
Take a look at this link
Systemd-boot

Put it in your conf file:

title   Arch Linux
linux   /vmlinuz-linux
initrd  /intel-ucode.img
initrd  /initramfs-linux.img
options root=UUID=6c684626-0c2f-49b1-bda1-e39aca915742 rw amdgpu.gpu_recovery=1 amdgpu.lockup_timeout=3000 net.ifnames=0 nowatchdog acpi_enforce_resources=lax sysrq_always_enabled audit=0 
2 Likes

I’m also very interested in the solution.
In GRUB as already stated above, there exists a global config where you can set the kernel parameters persistent.
However as the original thread starter I’m also facing the issue to make plymouth kernel parameters persistent if the kernel gets updated. For my understanding for each new kernel there gets a .conf file created in /boot/loaders/entries. However, if the kernel gets updated, a new conf file is created and set as default, which does not have the kernel options supplied. For me there does not exist a arch.conf file. If a I supply one and set it as default, after a new kernel update it gets unset as default.
Is there someone who can help?

Check the sdboot-manage which is a community contributed script

sudo pacman -Syu systemd-boot-manager

Edit /etc/sdboot-manage.conf and place your options

Courtesy of @dalto Projects · dalto / systemd-boot Manager for Manjaro · GitLab

4 Likes

Thanks, this is exactly what I was looking for!