Comment 9 for bug 1915573

Revision history for this message
Lee Trager (ltrager) wrote :

@raharper - It looks like Dracut has support to autodetect which kernel modules are loaded and automatically adds them to the initrd[1]. While there may be some differences in what CentOS and Ubuntu compile into the kernel there will be more similarities than differences. The reason why I didn't answer which kernel modules should be added is because I don't know. This isn't just a problem with NVME but other storage types as well. We currently have a bug in packer-maas[2] where a user claims that the CentOS initrd is missing kernel modules but they don't know which.

To answer your questions:
1. I don't really like the idea of blowing up the initrd just in case. Ideally it would be rebuilt to include just the kernel modules needed for that hardware. MAAS's goal is to get as close as possible to CentOS's official installer which works this way. If that is our only option, I'd like to see if we can make the initrd in the Canonical provided image contain the drivers but not modify dracut.conf.
2. I think we just need to trigger the rebuild with `dracut --force /boot/initramfs-$KVER $KVER`

@sfeole - thanks for your info and letting us poke around at the hardware! Could you try adding

rebuild_initrd: ['curtin', 'in-target', '--', 'dracut', '--force', '/boot/initramfs-4.18.0-240.10.1.el8_3.x86_64.img', '4.18.0-240.10.1.el8_3.x86_64']

to curtin_userdata_centos on each controller and attempt to redeploy CentOS 8?

[1] https://github.com/dracutdevs/dracut/blob/master/modules.d/90kernel-modules/module-setup.sh#L35
[2] https://github.com/canonical/packer-maas/issues/22