You are not logged in.

#1 2024-05-15 16:25:10

user7z
Member
Registered: 2024-02-26
Posts: 25

[SOLVED]make mkinitcpio use each kernel with its own kernel cmdline

he guys i  hope your doing well , i need i functionality that requires a specific kernel cmdline , before continue i want to mention that i dont use bootloader and instead i use inified kernel image with its entry in the UEFI , mkinitcpio uses /etc/kernel/cmdline , i read in the wiki that its capable also of catching .conf files from /etc/cmdline.d , but for my situation i need each kernel with its own cmdline so i dont need to change it every boot , i.e for example /etc/cmdline.d/linux.conf /etc/cmdline.d/linux-zen.conf , as in the wiki mkinitcpio well catch all the cmdline and apply it , how to activate this behaviour .

Last edited by user7z (2024-05-15 22:22:45)

Offline

#2 2024-05-15 16:40:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,925
Website

Re: [SOLVED]make mkinitcpio use each kernel with its own kernel cmdline

According to the wiki you can edit the mkinitcpio preset for each kernel and specify default_options to include --cmdline=/etc/cmdline.d/linux.conf for the linux preset and --cmdline=/etc/cmdline.d/linux-zen.conf for the linux-zen preset.

Last edited by Trilby (2024-05-15 16:42:05)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-05-15 20:59:31

Crunchbang
Member
From: Script headers everywhere
Registered: 2024-04-25
Posts: 19

Re: [SOLVED]make mkinitcpio use each kernel with its own kernel cmdline

Trilby wrote:

According to the wiki you can edit the mkinitcpio preset for each kernel and specify default_options to include --cmdline=/etc/cmdline.d/linux.conf for the linux preset and --cmdline=/etc/cmdline.d/linux-zen.conf for the linux-zen preset.


Exactly right!   I use this method for booting however i have ReFIND installed as a final and 3rd option incase stuff goes south.   

My efi menu looks like:
Arch Linux EFI
Arch Linux EFI (Fallback)
ReFiND



I use the method trilby lists above to manage cmdline options in the first 2 entries.  I only ever touch refind in a system recovery situation.

Last edited by Crunchbang (2024-05-15 21:00:46)

Offline

#4 2024-05-15 22:23:19

user7z
Member
Registered: 2024-02-26
Posts: 25

Re: [SOLVED]make mkinitcpio use each kernel with its own kernel cmdline

thank you guys i did not know about that --cmdline option , have a nice day

Offline

Board footer

Powered by FluxBB