Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 10-16-2009, 08:38 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Adding modules to avoid rebuilding the kernel


I have a system running Mandrake 9.2 with a custom kernel based off of 2.4.22-10mdk. The only custom part is that many previously unnecessary options were removed.

Network Device support and many of the Network Options, including Packet Socket and Packet filtering (which seem to be necessary if I want to use dhclient or dhcpcd) are not configured. I would like to avoid rebuilding the kernel on the existing system for v&v reasons).

It looks like the three modules I need are:

1. 8139too (network card)
2. mii (which 8139too depends on)
3. af_packet (the packet socket module)

I have successfully build kernels with these options modularized, modprobed, setup eth0, and pinged google. But as soon as I start putting pre-compiled (maybe built is the right word?) modules on the existing system, I get unresolved symbols. I have built the modules using the existing system's config file, so I thought it should work.

In all my different kernel builds, I have used the same kernel name (EXTRAVERSION in the .../linux/Makefile is unchanged)

Maybe what I'm trying to do isn't possible. I'd like to understand why, but nothing I've read has helped explain it either way.

Is there a way to avoid a kernel rebuild? if so, how can I do it? Am I missing something simple?

Please let me know if I can provide any additional information. I'm pretty new to Linux, so I'm not sure what may or may not be helpful.

Thank you in advance
Old 10-16-2009, 12:35 PM   #2
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Better than 9/10 times, what you are trying to do will not work, and definitely is not recommended. There are always exceptions to the rules, but generally, doing what you are doing, will not produce happiness.

Even kernel modules, built as modules, require that the kernel blob itself be constructed in such a way so that it is compatible the modules, i.e. a module needs a "socket" to connect to the kernel with, and a kernel that is not built what this "socket" will not have a way to accept the module that was built separately (hence errors like "undefined symbols").

Also, the kernel will, at the *very* least, complain that a module built for "abc" kernel, is not compatible, or is an incompatible format, when you try to use it with kernel "xyz". So kernel "abc" will only be happy with modules built with/for kernel "abc".

I'm not sure what you meant by "v&v" reasons as to not wanting to rebuild the kernel on the machine, but it really is your best bet, and will give less headaches in the long run, to just do it that way



config, ethernet, kernel, modules, network, upgrade

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
rebuilding perl modules on 12.2 for slimserver tfrei Slackware 2 12-14-2008 03:42 AM
Rebuilding kernel, /lib/modules/*kernel version* not appearing khaos83 Red Hat 2 01-14-2008 04:28 AM
adding modules to the kernel kanelin Mandriva 1 10-26-2006 05:27 AM
problem adding kernel modules on bootup irmark Linux - Hardware 1 02-10-2006 01:44 AM
Adding kernel modules dustin_wielenga Slackware 5 02-16-2005 12:10 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration