cpio notes

From Noah.org
Revision as of 18:48, 28 September 2010 by Root (Talk | contribs) (Created page with 'Category: Engineering == Create a cpio archive == Note that '''archive''' should be outside of the directory tree that is being archived. <pre> find . | cpio -o > ../archiv…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Create a cpio archive

Note that archive should be outside of the directory tree that is being archived.

find . | cpio -o > ../archive

Create a Linux kernel initrd

An initramfs is a root filesystem embedded into the Linux kernel. It is the successor of initrd.

IMPORTANT: Do not use the '-depth' option with `find`!

find . | cpio -o -H newc | gzip > ../initrd.cpio.gz

List the contents of initrd

gunzip --to-stdout /boot/initrd.img-2.6.31-22-server | cpio -t

Extract a Linux kernel

gunzip --to-stdout /boot/initrd.img-2.6.31-22-server | cpio -i -d -H newc --no-absolute-filenames