How to pass kernel command line parameters from Dracut

In my related post about Dracut, it was mentioned that the key kernel_cmdline cannot be used by dracut in EOS. This is because while building the EOS initramfs the command used is
/usr/bin/dracut --force --hostonly --no-hostonly-cmdline /boot/initramfs-linux-lts.img

Here the main option is –no-hostonly-cmdline. According to dracut documentation this option implies that

This implies that if I wanted to pass the following parameters rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 I cannot do it using a configuration file inside the directory /etc/dracut.conf.d/. So the question is then how do I pass these options to dracut?

I am trying to pass this information so as to speed up the boot time. As per the documentation of dracut, link given above,

I also had a look at the forum post from about 1-2 years ago where this was discussed, but it seems that there have been some changes done which now prevent the key kernel_cmdline from being used.

I would not want to change the existing hooks of EOS present in the directory /usr/lib/dracut/dracut.conf.d/.

All help and clarifications on this would be appreciated.

dracut uses the kernel commandline from here: /etc/kernel/cmdline
Just put your options in that file and do a reinstall-kernels But dont be disappointed. The boot speedup is insignificant.

Thanks @mbod. The file /etc/kernel/cmdline does not exist on my system. Please see the output given below for more details.

$ ls -al /etc/kernel/cmdline
ls: cannot access '/etc/kernel/cmdline': No such file or directory
$ 
$ ls -alpF /etc/kernel/
total 20
drwxr-xr-x  3 root root  4096 Feb  8  2025 ./
drwxr-xr-x 99 root root 12288 Sep  9 11:52 ../
drwxr-xr-x  2 root root  4096 Jan 13  2025 install.d/
$

I am using GRUB2 for my boot loader and not systemd-boot.

In that case you should add kernel parameters to /etc/default/grub

Will Kernel understand the parameters, rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 passed on from GRUB configuration? I was under the impression that these were for the initramfs only.

No, it is kernel commandline parameters.

This is what you just posted here:

1 Like