You are not logged in.

#1 2024-07-10 08:08:27

qu@rk
Member
Registered: 2021-07-28
Posts: 58

multiple EFISTUBs with different command line parameters

I have two different kernels that I use via EFISTUB boot method, and I'd like to have different kernel command line parameters for each of them. At the moment the config for both is taken from /etc/kernel/cmdline. How could I instruct mkinitcpio to use a different cmdline file for each?

Offline

#2 2024-07-10 10:44:01

cryptearth
Member
Registered: 2024-02-03
Posts: 1,020

Re: multiple EFISTUBs with different command line parameters

you don't
with efistub you're supposed to give the cmdline via the uefi boot entry

Offline

#3 2024-07-10 11:47:47

qu@rk
Member
Registered: 2021-07-28
Posts: 58

Re: multiple EFISTUBs with different command line parameters

As far as I understand it, the command line parameters are added into the efi files when generated with mkinitcpio -P. It even mentions that during the process, that it uses /etc/kernel/cmdline file for adding the parameters to the efi files.
I added the boot entries from UEFI shell with bcfg, I've seen no way of specifying the cmdline parameters with it.

edit: I just noticed in the Wiki: https://wiki.archlinux.org/title/EFISTUB#bcfg
Still, I'd like the different parameters to be added to the efi files, I have an encrypted setup and don't want to expose the kernel parameter file.

Last edited by qu@rk (2024-07-10 12:32:47)

Offline

#4 2024-07-10 12:53:19

cryptearth
Member
Registered: 2024-02-03
Posts: 1,020

Re: multiple EFISTUBs with different command line parameters

what you describe sounds more like https://wiki.archlinux.org/title/Unified_kernel_image

Offline

#5 2024-07-10 14:56:42

qu@rk
Member
Registered: 2021-07-28
Posts: 58

Re: multiple EFISTUBs with different command line parameters

Indeed! I added "--cmdline /etc/kernel/cmdline2" to the default options of the second kernel (in /etc/mkinitcpio.d/ preset file for second kernel) and it used that. Solved.

Offline

#6 2024-07-12 11:28:26

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

Re: multiple EFISTUBs with different command line parameters

you just need to add to the default optiionsin /etc/mkinitcpio.d/linux.preset that : --cmdline /path/to/your/cmdline , or you pass the cmdline to the boot entry like windows do , with efibootmgr -unicode option, but for more flexibility stay with --cmdline option , its more realibale

Offline

Board footer

Powered by FluxBB