Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > How to modify initrd.img
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 08-11-2008   #1 (permalink)
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.
tarunray is offline  

Reply With Quote
Old 08-11-2008   #2 (permalink)
Linux Engineer
 
b2bwild's Avatar
 
Join Date: Jul 2008
Location: Behind You!
Posts: 959
Send a message via MSN to b2bwild Send a message via Skype™ to b2bwild
there is
Quote:
mkinitrd
command for creating initrd images

man it for options
__________________
Hacking is like sex. You get in, you get out, and hope that you didn't leave something that can be traced back to you.
Read my Blog at --> Penguin Inside
b2bwild is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 08:48 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2