Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 09-25-2009, 05:09 AM   #1
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, 03:05 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Wrap your binary with a script that loads your kernel module.
--- rod.
Old 09-29-2009, 12:15 AM   #3
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.



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 07:29 PM
How do I edit the initrd.img in the RHEL 5.1 boot disk? Ken B Red Hat 6 07-18-2008 09:34 AM
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 01:09 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-02-2007 12:24 AM
how to make initrd.img for your kernel without boot disk? donaldtalbert Linux - Software 1 06-19-2005 11:30 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:37 AM.

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