LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-06-2007, 12:51 AM   #1
rishipandit007
Member
 
Registered: Oct 2006
Distribution: Debian, Ubuntu, Centos
Posts: 36

Rep: Reputation: 17
I want to edit initrd.img in my fedora 6 dvd-iso


Hi,
I want to edit /sbin/init and /sbin/loader files located on initrd.img of my fedora 6 dvd-iso.

Thanx in advance
 
Old 01-06-2007, 05:56 PM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
I want to edit /sbin/init and /sbin/loader files located on initrd.img of my fedora 6 dvd-iso.
You can't - the DVD is read-only. You have to transfer the files to writable memory, edit them there, and burn a new disk.

Last edited by Simon Bridge; 01-06-2007 at 05:57 PM.
 
Old 01-11-2007, 12:14 AM   #3
rishipandit007
Member
 
Registered: Oct 2006
Distribution: Debian, Ubuntu, Centos
Posts: 36

Original Poster
Rep: Reputation: 17
This time i am giving the details what i exactly want to do

Quote:
Originally Posted by Simon Bridge
You can't - the DVD is read-only. You have to transfer the files to writable memory, edit them there, and burn a new disk.
I think i wasn't able to make it clear wat i want. Da thing is i am a computer literate. I know dat it's read only. I have got Fedora 6's iso on my system from which i have got the initrd.img from the isolinux folder and i have also gunzipped the initrd.img and then extracted all the file using 'cpio'. I have also compiled a new kernel so dat it can support my laptop's most components but i want to edit the /sbin/init and /sbin/loader (it loads all the modules from /modules/modules.cgz). It's an ELF 32 bit LSB executable.
I tell you the thing here... I have compiled the new kernel with built-in support for isa-pcmcia using 3c574_cs(my pcmcia card uses this module). The newly created kernel just works fine as i have got 2 more distributions already running on my laptop but when i use the newly built kernel for installation of fedora 6, it's /sbin/loader scripts overrides dat built-in support for my card in my kernel and tries to load modules for it. (i know cause during installation i switch to other terminals as well so that i can know what modules are loading).. I have tried to make it work by removing the modules(pcmcia_core.o, 3c574_cs.o) from the /modules/modules.cgz but still it ain't working.

One more thing i want to know where is that information which tells the installation process(initrd.img of isolinux folder) if we are showing it the path to correct distribution's iso's. I mean can i edit redhat's /isolinux/initrd.img (cause it is properly inserting modules for my pcmcia card, i have installed redhat from that..) so that it sees fedora6 iso's as the iso's from which linux should be installed..
I have tried it by changing a few file like .buildstamp .profile but i am not able to find a cure for this.
The thing that is killing me is how to open /sbin/init and /sbin/loader. I have read those using readelf but it only gives some sort of information. I want to edit that loader so that it doesn't tries to load modules for my pcmcia card as i have compiled the support in the kernel..

Thank you
I know it's boring to read all of the above stuff but i hope u'll find some way for doing this
 
Old 01-11-2007, 02:55 AM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
I think i wasn't able to make it clear wat i want.
And you think that writing pidgin English will help?
Quote:
Da thing is i am a computer literate.
You are also print-literate - but you are refusing to write as if you are.

I am sorry, I cannot make head nor tail of this.

It looks like you want to remaster the fedora install disk so it will install a custom kernel you have created. Is this correct?

There are tools for remastering install DVDs from minor changes all the way up to creating your own distribution. Google for them.
 
Old 01-17-2007, 11:35 PM   #5
rishipandit007
Member
 
Registered: Oct 2006
Distribution: Debian, Ubuntu, Centos
Posts: 36

Original Poster
Rep: Reputation: 17
Thank you

Quote:
Originally Posted by Simon Bridge
And you think that writing pidgin English will help?You are also print-literate - but you are refusing to write as if you are.

I am sorry, I cannot make head nor tail of this.

It looks like you want to remaster the fedora install disk so it will install a custom kernel you have created. Is this correct?

There are tools for remastering install DVDs from minor changes all the way up to creating your own distribution. Google for them.
I must say that this was a great answer. I am just asking for help on ELF 32-bit LSB so, 386, v1 (SYSV), stripped and you are telling me to look to other sources for help.. So nice of you. Thank you.
 
Old 01-17-2007, 11:45 PM   #6
rishipandit007
Member
 
Registered: Oct 2006
Distribution: Debian, Ubuntu, Centos
Posts: 36

Original Poster
Rep: Reputation: 17
Smile Requesting for a little help

With due respect i must say that you seem to be a senior member and i have already said that i am sorry for my language as i am having english as my second language. You have suggested a very nice thing to google for tools but i must say that i don't have that much time. I would have been greatful if you would have given me url's of some basic tools for doing this.
The whole thing is if you have ever tried to modify initrd.img that you must have encountered /sbin/init and /sbin/loader.
These are ELF 32-bit LSB so, 386, v1 (SYSV), stripped. I am able to read the information using readelf(i am using redhat 9 for this). Now i just want to edit the loader script so that i can tell the script to try to load which module. If you can get me some info on how to modify this, i shall be thankful. Sorry for the rude behaviour.
 
Old 01-18-2007, 02:44 AM   #7
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
I still don't understand what you want to do.

If you want to install a driver for fedora core to use, you can create a driver disk and use that. You don't need to add this to the initrd in the fedora install media.

If automatically loaded drivers are consistently wrong, you can override hardware detection for that kind of device.

See:
http://fedora.redhat.com/docs/fedora...-hardware.html

The device is an "isa-pcmcia" card - I can only guess you mean an "ISA-PCMCIA Bridge" ... allowing a pcmcia card to be plugged into an ISA port??

There are drivers for these cards already
Quote:
In the standalone pcmcia-cs drivers, the i82365 module supports both ISA-to-PCMCIA, PCI-to-PCMCIA, and PCI-to-CardBus bridges.
... from http://www.linuxhowtos.org/PCMCIA/PCMCIA%20Howto.htm

The only reason for remastering the install CD (i.e. editing its initrd.img) is to create your own distribution. This is usually done to add functionality to a live CD.

Hence I am confused.
 
Old 01-19-2007, 12:42 AM   #8
rishipandit007
Member
 
Registered: Oct 2006
Distribution: Debian, Ubuntu, Centos
Posts: 36

Original Poster
Rep: Reputation: 17
Smile Thank you

Hi,
Thank you. I will try to dive into the stuff.
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need initrd-2.6.9-1.667.img for Fedora Core 3 shadoxx428 Linux - Software 2 04-17-2005 01:41 PM
Initrd.img spaguzz Slackware 4 12-16-2004 03:35 AM
Initrd.img spaguzz Linux - Software 1 12-09-2004 03:21 PM
What's an initrd.img? hotel-lima Linux - Newbie 2 06-11-2004 05:50 PM
initrd.img php_rocks Linux - Newbie 1 08-31-2003 11:20 PM


All times are GMT -5. The time now is 09:51 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