Solved

Redhat 4.1 Kernel compilation

Posted on 1997-07-30
8
345 Views
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
harlow@src.org
(919)941-9464
0
Comment
Question by:harlow
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
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:).
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
Forgot to say that there is a configuration switch
CONFIG_MODVERSIONS
but don't know in detail how it works.
0
 

Expert Comment

by:gallun
Comment Utility
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.



0
 
LVL 1

Accepted Solution

by:
MikeCrist earned 400 total points
Comment Utility
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).


0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:harlow
Comment Utility
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 (192.168.1.0): 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?

Thanks

JEH

0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
look at your /etc/networks and/or setup your routing with route ...

0
 
LVL 1

Expert Comment

by:MikeCrist
Comment Utility
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
mike@mwaz.com
0
 

Author Comment

by:harlow
Comment Utility
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!

JEH

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now