Saturday, March 8, 2008

creating initramfs

link: initrd
ref:  Documentation/filesystems/ramfs-rootfs-initramfs.txt

- initramfs is a feature of Linux 2.6
- you can embed your root image (cpio.gz file) using CONFIG_INITRAMFS_SOURCE during kernel config

1. after creating your directory structure execute command
  • cd tmp/root/dir/; find . | cpio -o -H newc | gzip) > /boot/initramfs.cpio.gz
2. you can extract your initramfs image file using the command
  • cpio -i -d -H newc -F initramfs_data.cpio --no-absolute-filenames