You are not logged in.
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
you don't
with efistub you're supposed to give the cmdline via the uefi boot entry
Offline
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
what you describe sounds more like https://wiki.archlinux.org/title/Unified_kernel_image
Offline
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
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