LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-11-2009, 09:49 AM   #1
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Rep: Reputation: 15
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
 
Old 02-12-2009, 03:29 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
you need to use mkinitrd to create a new initrd image which includes your module.
 
Old 02-12-2009, 03:46 AM   #3
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by datopdog View Post
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
 
Old 02-12-2009, 03:48 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
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.
 
Old 02-12-2009, 04:40 AM   #5
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
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.
 
Old 02-12-2009, 05:07 AM   #6
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by datopdog View Post
Code:
zcat initrd.img | cpio --make-directories --extract
The modules are loaded from the file init you can add your commands there


where exactly ?
 
Old 02-12-2009, 05:13 AM   #7
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
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.
 
Old 02-12-2009, 06:57 AM   #8
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by datopdog View Post
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
 
  


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
Add drivers to initrd shvnsen Linux - Enterprise 4 11-22-2008 11:54 PM
how can I add udev into initrd? randomsel Slackware 1 06-29-2008 08:27 PM
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 12:09 AM
removing a module from initrd tomazN Linux - Software 2 05-28-2006 03:31 PM
initrd - module parameters diamondT Linux - General 0 09-03-2003 02:39 AM


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