2014-08-07 16:01
Modifying an initrd file system
I needed to do this recently.
To unpack:
mkdir root
sudo chown root:root root
sudo chmod 775 root
cd root
zcat ../initrd.gz|sudo cpio -id
Do the alterations
To repack into a new image, current directory at root/:
find ./ | sudo cpio -H newc -o | gzip >../newinitrd.gz