I have a file in /boot/initramfs.gz
extract it using tar -xzvf initramfs.gz -C ./
I got a file initramfs
.
└──╼ $ file initramfs
initramfs: ASCII cpio archive (SVR4 with no CRC)
It can be open using ark
. But I want to change some files in this file initramfs
.
I extracted it using ark
and got a folder initramfs
. Now I want to save it as before.
How do I create an ASCII cpio archive (SVR4 with no CRC) like the original?
cpio
from the command line. However you probably don't want to change initramfs files this way; next time you do an update which installs a patched kernel then the new initramfs generated for the new kernel won't have your changes in it. You should follow your OS distribution processes for adding files and stuff into it, so they are persisted.