Hide Forgot
Description of problem: Right in /usr/share/dracut/modules.d/90kernel-modules/installkernel there is an admission of the need for a feature whereby filesystems (and other modules probably) can indicate they are optional and likely should not be included in an initramfs if not being used as the root filesystem: # hardcoded list of exceptions # to save a lot of space rm -fr ${initdir}/lib/modules/*/kernel/fs/ocfs2 There should be a generic mechanism where modules/filesystems can opt out of being put into an initramfs unless required (i.e. to mount root). The fact that you hardcoded one supports my assertion, IMHO.
That code is not in there anymore. Instead it moved to the config file. $ fgrep omit_drivers /etc/dracut.conf.d/01-dist.conf omit_drivers+=" .*/fs/ocfs/.* " Feel free to create your own config file with a regexp to omit any kernel driver.