puppetlabs/razor-el-mk — pull request #20 by jeffmccune (2014-03-19 03:48:29+00:00)
Title: Fix dracut could not boot error by patching initrd

Without this patch, microkernel images built with this project fail to boot.
The root cause of this problem appears to be an issue with dracut [1] where
dracut mis-configures udev to fire an event when the loop0 device is created.
This is a mis-configuration because loop0 may never be created so the event
never fires. This, in turn, prevents the root filesystem from being mapped
correctly and an error message `Could not boot` and `/dev/mapper/live-rw does
not exist`.

This patch addresses the problem by patching dracut to monitor the
"loop-control" device, which will be created when the loop kernel module is
loaded.

The patching is done but taking the final initrd0.img, which is in fact two
concatenated gzip compressed cpio archives, unpacking it, patching the initrd
filesystem, then re-packing it.

Unfortunately, this was the best way I could come up with since dracut is
installed by kickstart and we don't really have a great way to inject a patch
without carrying our own version of the package.

[1]:
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=ba9368fa4fedda0f72d84f910d01d7da201405a3