LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   modules.dep error message (https://www.linuxquestions.org/questions/linux-newbie-8/modules-dep-error-message-481648/)

snalion 09-08-2006 01:50 PM

modules.dep error message
 
I am trying to make a backup box from my production machine. I installed Slackware 10.2 from a CD and was able to bring it up fine. I then copied /boot, /etc, /var, /root folder from my original box, changed the lilo etc, and it too came up fine with the same logo, root passwd, etc. However I am having trouble with the network cards. The cards are different, so I got into the modules.conf file and uncommented the 3C509 part since thats what I'm using. On restarting, I saw some error messages that said "Can't open /lib/modules/2.4.26/modules.dep for writing" I tried to look under the /lib/modules, however all I see is 2.4.31. The command uname -r gives me 2.4.26, however I don't see a folder for that. I'm new to Linux and well totally confused. What am I doing wrong, or what should I do to correct this? Please help!! Thanks in advance

dxqcanada 09-08-2006 09:39 PM

Re: mod dep error
 
This is my guess ... the running kernel was built with an older kernel version than the modules.

I would have expected to see that the kernel is newer than the modules (ie. a new kernel was built but the modules where not installed).

In your case it is the other way around ... if you did a new install I cannot see how the kernel and modules would be mismatched.

Do you have the kernel source tree installed ??

blackhole54 09-08-2006 09:40 PM

Do I understand correctly that you did a regular install from Slackware 10.2 disk and then copied some, but not all of the directories from another machine over to it? In particular you copied the /boot directory but not the /lib directory? If so, I think you got a mismatch in versions between your kernel, which is in your /boot directory and the modules for it which are in the /lib/modules directory.

If I got this right, what you are trying to do sounds tricky to me. But if you still want to try it, I would suggest either not copying over the /boot directory (in which case your two systems will be running different kernels), or else in addition to everything else, copy over the /lib/modules/2.4.26 directory from your other machine.

snalion 09-12-2006 11:13 AM

Thank you for your replies.

dxqcanada -- I'm not sure what you mean by kernel source tree

blackhole54 -- You're correct, since I did not copy the modules directory. However I had googled on the error message and I found a command:
Code:

mkdir /lib/modules/`uname -r` && depmod -a
which seemed to create a folder wtih some files in it, and upon restarting again, it solved the error messages. But now, I have another problem regarding network cards. I have 4 installed. Three of them are 3Com and one is a Netgear. None of them seem to work. My "ifconfig -a" gives the following result:

Code:

dummy0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

tunl0    Link encap:IPIP Tunnel  HWaddr 
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

I have manually gone in rc.inet1.conf and given them static IP along with netmask. I have also tried to "route -v add default gw 192.168.137.254", however I get a "SIOCADDRT:Network is unreachable" error message. I have no clue on how to proceed. I had tried using netconfig, but that didn't help either. Any ideas, suggestions would be helpful. Thanks a lot!!

blackhole54 09-12-2006 09:46 PM

Unless I am missing something, it looks to me like all you did was create a directory for the modules of your running kernel, but didn't populate it with any actual modules. The depmod command probably added a couple of files. With no modules, I think these files would be very short!

In particular, the modules for your network cards should be in /lib/modules/2.4.26/net. Do you have such a directory?

snalion 09-13-2006 10:21 AM

No I do not have a "net" directory under /lib/modules/2.4.26. Can I just copy that from the /lib/modules/2.4.31/net directory and reboot the machine or there are different files for it? If so, where can I get those? Thanks!

blackhole54 09-14-2006 12:09 AM

Quote:

Originally Posted by snalion
No I do not have a "net" directory under /lib/modules/2.4.26. Can I just copy that from the /lib/modules/2.4.31/net directory and reboot the machine or there are different files for it? If so, where can I get those? Thanks!

The reason different versions of the kernel have different directories in /lib/modules is because in general you can not simply copy modules from one version of the kernel to another. (There my be times when it works by sheer luck.) If you insist on using a version of the kernel from another machine, I see no choice but to copy the modules over also. At least the modules that you need to use.


All times are GMT -5. The time now is 03:27 PM.