Tuesday, August 14, 2012

How to edit Ramdisk

Steps for editing the ramdisk.

mv ramdisk.img ramdisk.cpio.gz
gzip -d ramdisk.cpio.gz
mkdir root_fs
cp ramdisk.cpio root_fs/
cd root_fs
cpio -i -F ramdisk.cpio
rm ramdisk.cpio

/* Make the Changes*/

cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk_new.cpio
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
cd ..
mv newramdisk.cpio.gz ramdisk.img
rm -rf root_fs
rm ramdisk.cpio ramdisk_new.cpio

No comments:

Post a Comment