In case of Ubuntu 12.04 the initramfs image is a CPIO image with LZMA compression.
You can decompress it by the following:
mkdir /tmp/ubuntu_boot
cd /tmp/ubuntu_boot
cat /cdrom/casper/initrd.lz | lzcat | cpio -i
You can do your modifications (for example the above one)
And compress it again (watch out for the correct cpio parameters!) like this:
cd /tmp/ubuntu_boot
find . | cpio --quiet --dereference -o -H newc | lzma -c9 > /tmp/initrd_new.lz
相关热门文章
给主人留下些什么吧!~~
评论热议
本文详细介绍了如何解压并进行修改Ubuntu12.04的initramfs镜像,以及如何重新对其进行压缩。通过执行特定命令,可以实现对系统的初始化文件系统的定制化操作。
863

被折叠的 条评论
为什么被折叠?



