For reverse engineering/rebuild of existing initrd, you can try my Python initrd module. It works on most platforms and you don't need to be root.
python3 -m pip install initrd
See the examples for how to use it:
https://github.com/bifferos/initrd/tree/master/examples
It requires gcc and kernel sources so it can find /usr/src/linux/usr/gen_init_cpio.c for re-assembly.