We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Redhat 4.1 Kernel compilation

harlow asked
Medium Priority
Last Modified: 2013-12-15
This question is probably not intrinsically worth 400 points, but I need to get it solved, so I am offering the "big bucks" in hopes of getting the attention of an expert who can resolve this quickly.

I have RedHat 4.1 installed and running quite well on my system: IBM PS/1 486/33, 32 mb, 212 and 850 mb HD, SB 16 with 2X CD200F CDROM.  TCP/IP didn't work when installed, so I undertook a kernel rebuild as per FAQ, HOWTO, RedHat documents, etc.  The kernel version is 2.0.27.

When I reboot I now get a long series of messages about module versions not matching the kernel.  I did the build as follows (in this order):

make mrproper
make xconfig (selecting appropriate options)
make dep
make clean
make zlilo
make modules
make modules_install

In the xconfig step, I have enabled networking, included ppp in the kernel (rather than as a module), and made most other, nonessential functions as modules.  

The build sequence seems to be error free with one small exception: during make zlilo, there is a warning message from gcc which says that "3c59x.c needs configuration but has not included config file".  I did not select any Ethernet or other LAN features in the xconfig step, and I have no such hardware, so I have no idea why it is trying to compile this module.  I presume that this is harmless in any event, but I checked all the includes in that source module, and all of the appropriate .h files exist and are where they belong.

Anyway, when the new kernel boots, I get a long sequence of about 20-25 messages saying that module versions do not match the kernel (none of which have to do with the 3c59x).  However, the system seems to run fine except when I try to establish a PPP connection (using DIP).  It dials and gets the physical connection, but fails to establish the PPP protocol; ifconfig shows only a local loopback.  System logs show more module version- incompatibility problems.

I have carefully redone all the steps; I have looked in the /lib/modules/2.0.27/* directories, and it appears that all the right modules are there, with date stamps corresponding to the latest make.  There are also a lot of older modules there, which are from (I guess) the original RedHat make, for features I did not select.  Should these old versions have been cleared out by one of the make steps?  Should I clear them out manually?  Is there somethig else I am doing wrong?

Thanks.  400 easy points to someone....

Justin Harlow
Watch Question

Check in your /etc/rc* scripts how modules are added to the kernel: by kerneld (I guess it's default for 2.0.x) or by insmod, see there in which directory the modules are expected, should be something like  /lib/modules/`uname -r` .
Check this directory if it contains *your* new build modules.
A reasons taht this fails may be:
make modules_install uses an other directory (for installation) than the boot scripts

I think (back at kernel 1.2.13) it was RedHat which expected modules loading from  /lib/modules/`uname -a` , which is a realy crude one.

I marked this as comment, cause i don't know if it realy fixes your problem (but still will give you a hint:).
Forgot to say that there is a configuration switch
but don't know in detail how it works.

I may have at least half of the answer to your question.

This seems to have been a common type problem and is one that I have been struggling with myself lately.

Apparently make clean does not clean up old modules properly.

So, before you do make clean, you should take the old modules and move them to a backup directory.

if you do this, many of your problems will away

I am still left with a real PCMCIA modules problem for which I am told I need do download the new source and am also left with some modules loaded in rc.M that don't exist and need to be edited out by hand. Everything else works whihc is a big change from when I was note deleteing/moving the old modules.

No no no...All you have to do is delete the old modules.  They are in /lib/modules/2.0.18 for RedHat4.1.

Don't worry about 3c5x9.c not having a config file, it says that all the way up to 2.1.39 (probably furthert, but I haven't gotten any of the latest kernels).

The old modules you don't need, and should be deleted.  You should then only get one error, complaining about iBCS module, which you shouldn't worry about either.  If you want to get rid of the iBCS module, it's in /lib/modules/default/misc (I think).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Well, yes and no....  I followed everyone's suggestions, but still seem to have some problems.  Specifically, I did an rm -r /lib/modules/2.0.27 and a complete kernel remake.  This time, I installed ppp as a module rather than in the kernel itself, to allow more visibility into what it is doing.   The new kernel boots fine and issues no module-related error messages, but there is still some sort of issue with the ppp and/or tcp/ip installation.  

I followed all the setup instructions in the net-3 HOWTO to make sure I had all the etc/... files set up right.  However, I can't even ping myself; it says I am unreachable:

PING jeh.linux.org ( 56 data bytes
ping: sendto: Network is unreachable
ping: wrote jeh.linux.org 64 chars, return=-1

When I do an insmod ppp, I get several module-compatibility messages and the module aborts.

slhc_free: wrong version or undefined
slhc-init: wrong version or undefined
Loading Failed! The module symbols (from linux-2.0.27) don't match your linux-2.0.27.

In short, it looks like I still have some sort of module issue, Any ideas?  Need more/different info?



look at your /etc/networks and/or setup your routing with route ...

Here you need to do a depmod -a, which will find all the module dependancies.  This probably is run at boot time, in /etc/rc.d/rc.sysinit already, though.  Then, to load the modules, use insmod -f (module name).  This will force the loading of the modules, even if the kernel symbols do not match.

Mike Crist


OK, I think the original issues are behind me.  Thanks, Mike (and others).

I still can't seem to ge the internet routing working, but I will post a separate question on that one, since it is beyond the original scope of this problem.

Again, thanks to all who helped me out!


Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.