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

Forgot Password?
 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
RSS Feeds


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: 1,064
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
__________________
Microsoft isn't bad its just stupid.

Read my Blog at --> Penguin Inside Subscribe Feed
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
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 10:34 AM.






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

Content Relevant URLs by vBSEO 3.3.0 RC2