While playing around with initrd images a few weeks back, I came across the mkinitrd “–with” option. This option allows you to add additional modules to an initrd image, which is useful when you have a new storage or Ethernet driver that isn’t supported by the base operating system. To use this option, you can place the names of the modules to add to the initrd image in quotes, and pass them to the “–with” option:
mkinitrd -v --with="aoe virtio"
To verify the image contains the modules you specified, you can extract the initrd image and poke around the lib/modules directory:
gunzip < initrd-184.108.40.206-213.fc11.x86_64.img | cpio -i
find . -name aoe ./220.127.116.11-213.fc11.x86_64/aoe.ko
find . -name virtio ./18.104.22.168-213.fc11.x86_64/virtio.ko
If you want the modules included in all future mkinitrd runs, you can add the modules to the modules variable in the/etc/sysconfig/initrd file. Nice!