Find the answer to your Linux question:
Results 1 to 2 of 2
I have an application which runs in offline mode(machine boot from product CD & app runs). That product CD has customized RHEL kernel.which doesn't have SSH package/binaries/libraries. I have to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    8

    How to modify initrd.img


    I have an application which runs in offline mode(machine boot from product CD & app runs). That product CD has customized RHEL kernel.which doesn't have SSH package/binaries/libraries. I have to embed this package with the CD so that i can connect that target system remotely.
    For that purpose, i want to modify initrd.img kernel image file & but the mounted directory of this image file wouldn't be able to accomodate all the binaries/libraries of ssh.( error: ..files couldn't copy: no more space left on the device)

    So, I tried to create new initrd.img & copied all the existing files of old initrd.img alng with the new ssh package. I followed the following steps:

    dd if=/dev/zero of=initrd bs=1024 count=100000
    losetup /dev/loop3 initrd
    mkfs.ext3 /dev/loop3 mkfs -t ext2 /dev/loop3
    mount /dev/loop3 /mnt
    cp -dpR newInitrdfiles/* /mnt/
    umount /mnt
    losetup -d /dev/loop3
    gzip -9 initrd
    mv initrd.gz initrd.img

    But with this new image, the system is not booting up.
    It is throwing the following error:-
    INIT: running level 3
    INIT: no more processes in this run level.

    I am very much sure that this problem occurs due to new initrd.img file only.

    So how can i modify initrd.img or create new initrd.img file, so that i can embed this package into the product CD?
    So please, can any one help me out?
    Thanks in advance.

  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    there is
    mkinitrd
    command for creating initrd images

    man it for options
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •