Is it possible to tell dracut do not use configuration files in /etc/dracut.conf.d/ and /usr/lib/dracut/dracut.conf.d during initramfs creating?

I move configuration files to temporary directory before creation of initramfs for another system, and put it back after creation. I haven't seen any option in man pages about dracut. Maybe I'm not so careful.

  • You could use mount tricks to hide the files, and a mount name-space, to make it visible to only the relevant processes. Feb 21, 2020 at 9:44
  • @ctrl-alt-delor Thanks for suggestion. I'll try this solution later and write about it. Feb 27, 2020 at 15:11

1 Answer 1


If you are running dracut manually, then you can run dracut --conf CONFFILE --confdir CONFDIR

See man 8 dracut

However, dracut will mostly be run from a package manager's on kernel install hooks. E.g. on RHEL7, it's run from /usr/lib/kernel/install.d/50-dracut.install. And if this is the case, the direct answer to your question is no.

What you can do is create a conf file name /etc/dracut.conf.d/99_custom.conf and in that config file override any settings from other config files, with options such as dracutmodules, omit_dracutmodules, etc.

  • An approach with /etc/dracut.conf.d/99_custom.conf sounds like good. It seems is what I want! Thanks! Feb 27, 2020 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .