1. How to exacting the initrd.img file.
[root@ts1 /]# mkdir testfarm
[root@ts1 /]# ls
bin dev lib lost+found mnt opt sbin sys usr
boot etc lib64 media net proc selinux testfarm var
cgroup home linux misc nfsshare root srv tmp
[root@ts1 /]# cp /linux/initrd-new.img /testfarm/
[root@ts1 /]# cd /testfarm/
[root@ts1 testfarm]# ls
initrd-new.img
[root@ts1 testfarm]# gunzip < initrd-new.img | cpio -i --make-directories
110121 塊
[root@ts1 testfarm]# ls
bin etc init lib modules sbin sys usr
dev firmware initrd-new.img lib64 proc selinux tmp var
2. put busybox into the /bin directory
[root@ts1 testfarm]# cp /sbin/busybox bin/
[root@ts1 testfarm]# ls
bin etc init lib modules sbin sys usr
dev firmware initrd-new.img lib64 proc selinux tmp var
[root@ts1 testfarm]# ls
bin etc init lib modules sbin sys usr
dev firmware initrd-new.img lib64 proc selinux tmp var
[root@ts1 testfarm]#
3. How to create an initrd.img file.
[root@ts1 testfarm]# ls
bin etc init lib64 proc selinux tmp var
dev firmware lib modules sbin sys usr
[root@ts1 testfarm]# find . | cpio --quiet -c -o | gzip -9 >/tmp/initrd_update.img
[root@ts1 testfarm]# file /tmp/initrd_update.img
/tmp/initrd_update.img: gzip compressed data, from Unix, last modified: Fri Jul 2 16:20:42 2010, max compression
[root@ts1 testfarm]#