LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   add network module initrd (https://www.linuxquestions.org/questions/linux-general-1/add-network-module-initrd-703891/)

B-Boy 02-11-2009 09:49 AM

add network module initrd
 
Hi guys

How do I add a network module to a pxe initrd... I have managed to mount the initrd but when i make install and modprobe the module, it installs it into the /lib/modules/kernel-version.... of the system i am doing it from, instead of into the mounted initrd

datopdog 02-12-2009 03:29 AM

you need to use mkinitrd to create a new initrd image which includes your module.

B-Boy 02-12-2009 03:46 AM

Quote:

Originally Posted by datopdog (Post 3440722)
you need to use mkinitrd to create a new initrd image which includes your module.

so i cannot edit my current one?.....I am just afraid that I might miss some other modules and settings that are in my current initrd

datopdog 02-12-2009 03:48 AM

am sure you can unpack the current one and modify it to add your module and add load statements for it, initrd are gzipped cpio archives.

datopdog 02-12-2009 04:40 AM

Code:

zcat initrd.img | cpio --make-directories --extract
The modules are loaded from the file init you can add your commands there to load the module and include your module in the lib directory then recreate a gzipped cpio archive.

B-Boy 02-12-2009 05:07 AM

Quote:

Originally Posted by datopdog (Post 3440809)
Code:

zcat initrd.img | cpio --make-directories --extract
The modules are loaded from the file init you can add your commands there



where exactly ?

datopdog 02-12-2009 05:13 AM

when you extract the initrd you should find an init file in there if you are using a redhat based initrd, others may use a different initialization script. you will also see a libs directory where the modules are stored.

B-Boy 02-12-2009 06:57 AM

Quote:

Originally Posted by datopdog (Post 3440840)
when you extract the initrd you should find an init file in there if you are using a redhat based initrd, others may use a different initialization script. you will also see a libs directory where the modules are stored.

yes i see the lib dir but do i have to enter all the detail manually in there like the pci.map and modules.alias etc


All times are GMT -5. The time now is 11:55 AM.