You are not logged in.

#1 2023-10-27 05:50:01

ayushnix
Member
From: Mumbai, India
Registered: 2021-11-14
Posts: 9
Website

Sysctl Params For Specific Kernels When Building Unified Kernel Images

I'm using linux-hardened and linux-lts on my Arch Linux desktop and I'd like to enable specific sysctl parameters with different values for each kernel image when building unified kernel images with mkinitcpio.

The wiki mentions the "/etc/kernel/cmdline" file and "/etc/cmdline.d/" directory for specifying kernel parameter but they are used regardless of which kernel I'm building. Should I use "/boot/loader/entries/{archhardened,archlts}.conf" instead? Is there any other method to accomplish what I want while still building unified kernel images?

Offline

#2 2023-10-27 10:25:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,387

Re: Sysctl Params For Specific Kernels When Building Unified Kernel Images

Do they need to be set in the initramfs/early boot? If you just care about them getting executed/applied at some point you can do e.g. a systemd oneshot depending on a particular kernel to apply whatever change you need during e.g. normal multi-user.target.  Like I did in https://bbs.archlinux.org/viewtopic.php … 0#p1993010 for example

Offline

Board footer

Powered by FluxBB