Packing and unpacking initrd
From Leo's Notes
This page was last edited on 15 April 2013, at 05:35.
modify initird.img or other similar images
To extract initird.img:
# Go to an empty directory before extracting the image. # eg: mkdir -p /mnt/initrd_extract && cd /mnt/initrd_extract gzip -dc < ../initrd.img | cpio -i
To pack files back into initrd.img
# Go to the directory containing the contents of the image. # eg: cd /mnt/initrd_extract find . | cpio -o -c | gzip -9 > ../initrd.img