LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   I want to edit initrd.img in my fedora 6 dvd-iso (https://www.linuxquestions.org/questions/linux-general-1/i-want-to-edit-initrd-img-in-my-fedora-6-dvd-iso-516811/)

rishipandit007 01-06-2007 12:51 AM

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

Simon Bridge 01-06-2007 05:56 PM

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.

rishipandit007 01-11-2007 12:14 AM

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.:D 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

Simon Bridge 01-11-2007 02:55 AM

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.

rishipandit007 01-17-2007 11:35 PM

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.

rishipandit007 01-17-2007 11:45 PM

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.

Simon Bridge 01-18-2007 02:44 AM

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.

rishipandit007 01-19-2007 12:42 AM

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


All times are GMT -5. The time now is 08:01 PM.