Systemd-boot created entries on kernel upgrade do not have current command line

Hello.

I updated my kernel to 5.16 using Manjaro Settings Manager and I noticed my current kernel command line was not added to the generated entries for the new kernel. I opened an issue on systemd (systemd-boot default kernel command line arguments · Issue #22731 · systemd/systemd · GitHub) but it looks like the issue might be on Manjaro’s side.

How can I debug how the entries are generated in my case?

Manjaros default boot loader is grub.

When using systemd-boot you’re responsible to maintain it and adapt it accordingly.

Why don’t you just try what poettering said?

if you have /etc/kernel/cmdline already, just add your switch there, and it will be honoured for future kernel installs. if you don#t then do cat /proc/cmdline > /etc/kernel/cmdline and then add it there.

EDIT:

That command only works in root, you need to alter it to work with sudo.

cat /prc/cmdline | sudo tee /etc/kernel/cmdline
1 Like

Where is this kernel-install script being called?

From my understanding, by default, Manjaro doesn’t use systemd-boot and the kernel is not installed via systemd (but pacman and hooks for mkinitcpio).
So, modifying a file /etc/kernel/cmdline will probably not work out-of-the-box.

Presumably when kernels are installed. This seems to be the man page.

Manjaro uses grub by default so no it wouldn’t work out of the box. However if a user has configured systemd-boot correctly, then presumably it would.

The goal of this script is to generate the kernel image (at least depmod is run, and its pre-configured with a few hooks), so I guess it’s a replacement for mkinitcpio. And then copy it to its final destination at /boot/... somewhere.
In Archland, this is already done with mkinitcpio and you have to generate the systemd-boot loader files yourself.

I guess it’s possible to remove mkinitcpio and use a custom pacman-hook for this script but in the end it will probably take more maintenance time that simply copying the /boot/loader/entries for new kernel versions and adjusting your cmdline manually.