Home  -  Infos/Docs  -  Tools/Outils Code  -  Links/Liens  -  News  -  Download  -  Others/Autres Site map

compress/uncompress create/modify initrd images:

to uncompress your initrd image:

go to /var/tmp or any other EMPTY directoryv ~:$ cd /var/tmp/

uncompress your initrd image in this directory
/var/tmp/:$ gzip -cd /boot/initrd.img | cpio -id

it will uncompress the image
and 'extract' files and directories in (strcuture).


to recompress your modified image:

go to /var/tmp
~:$ cd /var/tmp/
or your directory where your sctructure(files and dirs)

create you image
/var/tmp/:$ find ./ | cpio -H newc -o > ../modified-initrd.cpio

compress your image
/var/tmp/:$ gzip ../modified-initrd.cpio
it will create the compressed image and change name to modified-initrd.cpio.gz

so rename it to something like that and place it in /boot
/var/tmp/:$ mv ../modified-initrd.cpio.gz /boot/modified-initrd.img

now modify grub,lilo,...,xen configuration to use your new image

you can do the same procedure if module are compressed in a /modules/modules.gz or something like that