Kernel params

I’m trying to figure out how to add some kernel params.

While installing EOS I didn’t choose a particular bootloader, so my guess it’s the systemd-boot, right?
I tried to press “e” while booting and added my params, but…

  1. How do I check if they are indeed applied? I run this script, but it didn’t show my params:
cat /proc/modules | cut -f 1 -d " " | while read module; do \
 echo "Module: $module"; \
 if [ -d "/sys/module/$module/parameters" ]; then \
  ls /sys/module/$module/parameters/ | while read parameter; do \
   echo -n "Parameter: $parameter --> "; \
   cat /sys/module/$module/parameters/$parameter; \
  done; \
 fi; \
 echo; \
done
  1. To make the change persistent after reboot, I need to edit /boot/loader/entries/arch.conf, right? But shouldn’t it exist already? Maybe it has some other location for EOS?
cat /proc/cmdline

Example output on my system:

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=63f0145a-af73-43ce-ac7d-8a985fe0bbb7 rw quiet loglevel=3 nowatchdog zswap.enabled=0

Lifted from Arch Wiki page

You can check the parameters your system was booted up with by running cat /proc/cmdline and see if it includes your changes.

1 Like

Not very sure about that.

What is the default enttry listed in /boot/loader/loader.conf

It should have a line like this

default  arch.conf

or

default  linux.conf

That worked perfectly, thanks!
I did booted up with my params.

I don’t have this - loader - folder at all.
When I navigate to /boot/ and ls it, I get:
intel-ucode.img

Is this a multi boot system?

And what do you get when you run ls in /efi?

Nope

A large num dir, with kernels inside, I guess.
an EFI and loader folders.

P.S.
Oh, I think I found it… it’s in the entries folder? per kernel params?

Try checking inside it if you see a loader.conf and entries/arch.conf

Yes. There should be different file for each kernel.

Don’t modify those files, they are generated. If you want to change kernel params, edit /etc/kernel/cmdline and then run sudo reinstall-kernels

3 Likes

Indeed, these params are the exact what I’ve seen when pressed “e” on the boot. Thanks

1 Like

Worked like a charm.
One thing, though. If I would use pure Arch, what would I need to do instead of reinstall-kernels? I guess it’s EOS’ thing, right?

It depends, that command comes from the package kernel-install-for-dracut which is also in the AUR. If you used that, it would work the same way.

If you don’t use the automation provided by kernel-install and the above package, you would have to first manually create one or more entry files for each kernel in /efi/loader/entries and then make the modifications there. You would also need to create and remove those files manually as you add and remove kernels.

1 Like

Ah! You’re the maintainer. That’s so cool.

That’s good to know, thanks.
I’ll maybe go and check this practically in the future, just to know how it’s done.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.