LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2009, 04:27 AM   #1
touser
Member
 
Registered: Apr 2005
Posts: 31

Rep: Reputation: 15
Compile and load kernel module automatically after boot? (Intel NIC module)


Hello everyone, i have a remote machine that needs to be rebooted into an older kernel, the problem is the older kernel does not have support for the onboard intel NIC, and according to the readme file that comes with the source for the module: "This driver is only supported as a loadable module at this time. Intel is not supplying patches against the kernel source to allow for static linking of the driver."

Does anyone know if it is possible to patch this into the kernel before compiling? Or would i be better off writing a small shell script to compile, load, and bring up the interface using cron to initiate the network interface after boot? Any better ideas? Thanks for any help!
 
Old 08-28-2009, 09:05 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
All distros have a means of automagically loading kernel modules at boot. Follow the readme to create the module, and simply add the name to whatever process your distro uses. Nothing more to do unless you need config options - the readme will cover that if needed.
 
Old 08-29-2009, 07:14 PM   #3
touser
Member
 
Registered: Apr 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Thank you syg00, but doesn't the module need to be compiled against the kernel it is going to be run on? Assuming that is the case, i have to reboot into that kernel to compile and load the module for the first time, which is where all of the confusion is coming from. I'm compiling a new (older) kernel without support for the nic, and rebooting it remotely. I then need to get the module for that nic compiled and loaded automatically? If i can just compile the module on the currently running kernel and toss it into /etc/modules and have it load on boot of the new kernel that would be great, but i don't think that will work?
 
Old 08-29-2009, 08:45 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
OK, sorry - I obviously wasn't concentrating ...
Yes, generally modules would/should be compiled against the appropriate kernel. There are all sorts of potential (dependency) issues; at compile- as well as run-time. Don't see it often, but possible.
You can force load the module (might work ok), or you could try retro-fitting the patch to the old kernel. Ugly.
Let me think some more (this post to put me back on the subscribed list).
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to load alternate kernel module on boot fancylad Linux - Kernel 2 06-18-2008 02:32 AM
If I want a module to load automatically at boot up then I would... lumix Linux - Newbie 1 04-18-2007 11:38 PM
how to load a kernel module at boot time yugandhar Linux - Kernel 1 09-08-2006 02:33 AM
i want to compile and load a module into kernel ramya272 Linux - Newbie 3 02-21-2004 10:17 AM
I have to build , load and compile a FAT fs module into the kernel.wat should i do? ramya272 Linux - Newbie 2 02-06-2004 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:06 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration