Chinaunix首页 | 论坛 | 博客
  • 博客访问: 336036
  • 博文数量: 135
  • 博客积分: 4637
  • 博客等级: 上校
  • 技术积分: 1410
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-21 13:22
文章分类

全部博文(135)

文章存档

2013年(12)

2012年(14)

2011年(42)

2010年(22)

2009年(18)

2008年(27)

分类: LINUX

2013-08-22 13:24:00

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

阅读(695) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~