For TripleO I was tasked with enabling our deployment ramdisks to be built with Dracut. There are a couple of reasons we want to do this.
First, Dracut is a standard ramdisk tool and many people have experience with using it. This means users of TripleO won't necessarily have to re-learn a completely new ramdisk environment in order to use or debug TripleO ramdisks.
Second, Dracut can handle many of the networking and hardware things that had to be done manually in our old ramdisks. There's not really a good reason to reimplement all of that when it already exists. In addition, using Dracut will likely allow more exotic deployments to things like diskless systems if someone so desired. I don't believe our old ramdisks can handle the variety of setups that Dracut can.
The main purpose of this post is just to jot down some thoughts from the process of enabling Dracut to build our ramdisks.
rd.neednet=1
parameter to Dracut as part of the kernel command-lineThat's all I can remember off the top of my head. It's been a few weeks since I initially did this work so I may have forgotten something, but I think the main points are covered.
For reference, here is the dracut call I'm using to build the ramdisks:
dracut -N --install 'tail head awk ifconfig cut expr route ping tgtd tgtadm nc wget curl tftp' \
--kernel-cmdline "rd.shell rdinitdebug rd.neednet=1" \
--include $TMP_MOUNT_PATH/init-func /init-func \
--kver ${KERNEL_VERSION} \
--add-drivers "virtio virtio_net virtio_blk" \
/tmp/ramdisk