[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

unpack and pack initrd



nice day,
I need to edit the initrd.img, but found that things that seem wrong initrd. I do it as follows:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
root@etchrouter:~# md5sum /boot/initrd.img-2.6.25-2-amd64
17e4647d1e75160d474f10385cf63095  /boot/initrd.img-2.6.25-2-amd64

i extract  initrd.img:

root@etchrouter:~# gzip -dc < /boot/initrd.img-2.6.25-2-amd64  | cpio -i
30459 blocks

i pack it to initrd.img:

root@etchrouter:~# find . -print -depth | cpio -o -H newc > /var/lib/tftpboot/initrd.img find: warning: you have specified the -depth option after a non-option argument -print, but options are not positional (-depth affects tests specified before it as well as those specified after it). Please specify options before other arguments.
30459 blocks

and md5sum of new file:

root@etchrouter:~# md5sum /var/lib/tftpboot/initrd.img
e8fed092730e7d3899d19cb2dda22a75  /var/lib/tftpboot/initrd.img
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ Problem, the new file is that it does not work :-)
Please someone advise me how to do it correctly?

Thanks a lot

m.




Reply to: