LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 09-25-2009, 04:09 AM   #1
sanketks
LQ Newbie
 
Registered: May 2008
Posts: 5

Rep: Reputation: 0
Question Modifying initrd.img for custom recovery disk


I am creating a new custom recovery disk(iso) from the RHEL5 iso.
For that, I am copying only the basic stuff from the RHEL5 iso such as "images" and "isolinux" folders which help to boot the system.
I am successfully able to boot from the custom iso I created.

Now I have one more requirement where I need to do auto loading of a kernel module(cifs.ko) at the boot time.
I tried the following. But did not succeed.
"I modified the initrd.img by copying the cifs.ko into the modules folder where all the kernel modules reside. By default cifs.ko was not there in that folder. But it did not auto load at boot time. I tried to insert some scripts as well. But all in vain."

One possible way I could find out from internet is that, the init script can be modified to insert an "insmod" command for the cifs module.
In normally booted system, the "/boot/initrd-2.6.18-92.el5PAE.img" contains the init which is an editable script.
But in my case, the init is not a script, rather than it is a binary. Because the initrd.img which is there in isolinux folder is having a init binary not a script. Hence I am not able to change it.

Is there any way to achieve my requirements?

Any idea in this area will be of great help.
 
Old 09-26-2009, 02:05 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Wrap your binary with a script that loads your kernel module.
--- rod.
 
Old 09-28-2009, 11:15 PM   #3
sanketks
LQ Newbie
 
Registered: May 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Rod, any idea how to wrap the init with a script? I couldn't find a way out.
 
  


Reply

Tags
initrd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I pack stage2.img into initrd.img for a PXE linux rescue? real1elmo Red Hat 12 10-14-2009 06:29 PM
How do I edit the initrd.img in the RHEL 5.1 boot disk? Ken B Red Hat 6 07-18-2008 08:34 AM
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 12:09 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-01-2007 11:24 PM
how to make initrd.img for your kernel without boot disk? donaldtalbert Linux - Software 1 06-19-2005 10:30 PM


All times are GMT -5. The time now is 09:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration