Pages

2010-08-24

Linux: Create .cpio archive for initramfs

We suppose that our initramfs directory is under /tmp/initramfs
 To create the .cpio archive that will be loaded by the bootloader, we do:
  1. cd /tmp/initramfs
  2. find .  | cpio --quiet -c -o > /tmp/initramfs.cpio
  3. cat /tmp/initramfs.cpio | gzip > /tmp/initramfs.cpio.gz
  4. An voilà, /tmp/initramfs.cpio.gz can now be passed to the bootloader to be your root file system

No comments:

Post a Comment