Could I make a few suggestions while we're at it?
1) I sometimes build an initrd for a kernel I haven't installed yet. Yes, it's a mistake, but it happily succeeds and creates an initrd without any modules which then creates a non booting system.
=> initramfs should abort if its generated /lib/modules/kernel is empty
2) initramfs creates a temporary directory where it puts everything, and then deletes it before you can inspect it for debugging.
=> Add a --debug that leaves that directory behind for inspection.
Right now I have to unpack the initrd image which is more and more of a pain as it becomes a bundled binary of concatenated cpio images and god knows what.
3) document the binwalk method of unpacking initrd to debug if needed (somewhere in the manpage):
Or for the archives:
legolas [mc]# binwalk initrd.img
pick up the offset of the 2nd initrd image, and unpack like so:
legolas [mc]# cd subdir; dd if=../initrd.img bs=21136 skip=1 | gunzip | cpio -idv
Thanks for your work,
Marc