Steps to create initrd

  1. Creating initrd using mkinitrd

    # mkinitrd  -v -f –with=e1000 /tmp/initrd.gz 2.6.9-55

  2. Extracting the initrd image to add contents in it

    # mkdir /initrdroot
    # cd /initrdroot
    # gzip -dc /tmp/initrd.gz | cpio -id
    # ls  /initrdroot
    bin  dev  etc  init  lib  linuxrc  lost+found  mnt  proc  root  sbin  sys  sysroot  tmp  usr  var

    Now add binaries and libraries to the initrdroot

  3. To recreate the initrd based on /initrdroot

    # find ./ | cpio -H newc -o > /tmp/unixfooinitrd
    # gzip /tmp/unixfooinitrd
    # mv /tmp/unixfooinitrd /boot/unixfooinitrd.gz

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Resizing ext3 filesystem

Next Post

Netapp VIFs loadbalancing

Related Posts