Running dracut -f <pathToInitRamFs> <kernelVersion> to add some custom drivers to the initramfs shows an error message from the nvme command.
In addition, it fails to copy those custom drivers into the initramfs saying
dracut-install: Failed to find module 'DtPcie' /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/DtPcie.ko
Even though the file does exist in the root filesystem tree:
# ls -l /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/Dta.ko
-rw-r--r-- 1 root root 56015744 Jul 6 13:03 /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/Dta.ko
And lsinitrd confirms the initramfs does not contain the Dta.ko driver (and in fact does not contain the entire drivers/misc subtree:
# lsinitrd /boot/initramfs-4.18.0-147.el8.x86_64.img | grep Dta
# (nothing)
# lsinitrd /boot/initramfs-4.18.0-147.el8.x86_64.img | grep misc
# (nothing)
Original error message
dracut -f /boot/initramfs-4.18.0-147.el8.x86_64.img 4.18.0-147.el8.x86_64
nvme-1.9.dirty
usage: nvme <command> [<device>] [<args>]
The '<device>' may be either an NVMe character device (ex: /dev/nvme0) or an
nvme block device (ex: /dev/nvme0n1).
The following are all implemented sub-commands:
list List all NVMe devices and namespaces on machine
list-subsys List nvme subsystems
id-ctrl Send NVMe Identify Controller
etc etc etc
See 'nvme <plugin> help' for more information on a plugin
dracut-install: Failed to find module 'DtPcie' /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/DtPcie.ko
dracut-install: Failed to find module 'Dta' /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/Dta.ko
dracut-install: Failed to find module 'Dtu' /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/Dtu.ko
dracut-install: Failed to find module 'LXV4L2D_PL330B' /lib/modules/4.18.0-147.el8.x86_64//kernel/drivers/misc/LXV4L2D_PL330B.ko
This is the same output as if you type nvme by itself with any of the required arguments.
Other than rebuilding the initramfs with the command above I'm not doing anything with dracut. But this error message is coming out.
I need those modules in the initramfs and I have not seen this dracut error before. How would I resolve it?
System Info: Centos 8.1
# uname -a
Linux 4.18.0-147.el8.x86_64 #1 SMP Wed Dec 4 21:51:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
# yum list installed | grep dracut
dracut.x86_64 049-27.git20190906.el8 @anaconda
dracut-config-rescue.x86_64 049-27.git20190906.el8 @anaconda
dracut-network.x86_64 049-27.git20190906.el8 @anaconda
dracut-squash.x86_64 049-27.git20190906.el8 @anaconda