LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2006, 02:50 PM   #1
snalion
LQ Newbie
 
Registered: Aug 2006
Posts: 11

Rep: Reputation: 0
Unhappy 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
 
Old 09-08-2006, 10:39 PM   #2
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
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 ??
 
Old 09-08-2006, 10:40 PM   #3
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
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.
 
Old 09-12-2006, 12:13 PM   #4
snalion
LQ Newbie
 
Registered: Aug 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Unhappy

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!!
 
Old 09-12-2006, 10:46 PM   #5
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
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?
 
Old 09-13-2006, 11:21 AM   #6
snalion
LQ Newbie
 
Registered: Aug 2006
Posts: 11

Original Poster
Rep: Reputation: 0
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!
 
Old 09-14-2006, 01:09 AM   #7
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
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.
 
  


Reply


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
modprobe: FATAL: Could not load /lib/modules/.../modules.dep Ankardo Debian 9 02-01-2011 06:09 PM
FATAL: Could not load /lib/modules/2.6.14-default/modules.dep no such file exist dr_zayus69 Linux - Software 3 12-26-2005 07:44 PM
Compile Error- /lib/modules/extra/modules.dep UpChuck Debian 2 01-11-2004 11:20 AM
/etc/conf.modules is more recent than /lib/module/2.2.15-4mdk/modules.dep Derek-kun Linux - Newbie 3 09-26-2003 03:56 AM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:16 AM.

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