-   Linux - Newbie (
-   -   Compile and load kernel module automatically after boot? (Intel NIC module) (

touser 08-28-2009 04:27 AM

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!

syg00 08-28-2009 09:05 PM

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.

touser 08-29-2009 07:14 PM

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?

syg00 08-29-2009 08:45 PM

OK, sorry - I obviously wasn't concentrating ... :redface:
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).

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