LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-23-2005, 09:55 AM   #1
yougene
Member
 
Registered: Oct 2005
Posts: 65

Rep: Reputation: 15
Can't load modules?


So I've been following the Linux Loadable Module How-To. The problem is whenever I try to do the examples they give such as

insmod serial.o
modprobe msdos


It tells me
insmod: serial.o: No such file or directory
or
modprobe: Can't locate module msdos



What am I missing here?
 
Old 11-23-2005, 10:03 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
- insmod requires the full path to the module or just the module name
if you are in the module directory

- msdos module is not seen by modprobe, because more likely it is not
present in /lib/modules/`uname -r`
try modprobe -l to see all available modules for modprobe
 
Old 11-23-2005, 10:08 AM   #3
yougene
Member
 
Registered: Oct 2005
Posts: 65

Original Poster
Rep: Reputation: 15
modprobe -l shows up nothing....

This can't be right though because I've had this computer load a nic module before. Can recompiling a kernel have any effect on this?
 
Old 11-23-2005, 10:18 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Did you recompile your kernel ?

What is the output with :
Code:
ls -l /lib/modules/`uname -r`
 
Old 11-23-2005, 10:49 AM   #5
yougene
Member
 
Registered: Oct 2005
Posts: 65

Original Poster
Rep: Reputation: 15
Yes, I recompiled the kernel to figure out how to do it. Very minimal the only feature I added was reiserfs support.

The computer didn't like me using 'uname -r' as a directory name for some reason but doing
ls -l /lib/modules/2.4.31 shows up this

build@ modules.generic_string modules.parportmap modules.usbmap
kernel/ modules.ieee1394map modules.pcimap pcmicia/
modules.dep modules.isapnpmap modules.pnpbiosmap
 
Old 11-23-2005, 11:55 AM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
the quotes are inversed ones ` not '
if you don't like inversed quotes, you could do bash syntax :
Code:
ls -l /lib/modules/$(uname -r)
Now what is the output with :
Code:
uname -r
find /lib/modules/2.4.31 -name "msdos.*"
 
Old 11-23-2005, 12:42 PM   #7
yougene
Member
 
Registered: Oct 2005
Posts: 65

Original Poster
Rep: Reputation: 15
Doing that shows up nothing.

I tried plugging my nic back in and its not working now so I guess the modules got deleted somehow. The only thing I've done to this system is a kernel compiling though. Is it possible the make modules_install deleted all my old modules?
 
Old 11-23-2005, 02:02 PM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Is it possible the make modules_install deleted all my old modules?
Did you enable drivers as module in kernel config ?
 
Old 11-23-2005, 02:27 PM   #9
yougene
Member
 
Registered: Oct 2005
Posts: 65

Original Poster
Rep: Reputation: 15
I don't think I did.


The thing is I left my old kernel intact, but now they are both affected by this.
 
Old 11-23-2005, 02:30 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You could cp /boot/config-2.4.31 in .config in your kernel dir,
then run make oldconfig and compile, install modules and kernel
 
Old 11-23-2005, 10:28 PM   #11
yougene
Member
 
Registered: Oct 2005
Posts: 65

Original Poster
Rep: Reputation: 15
Yeah that fixed it. Thanks alot.


What do you think caused the problem?
 
Old 11-27-2005, 08:25 PM   #12
yougene
Member
 
Registered: Oct 2005
Posts: 65

Original Poster
Rep: Reputation: 15
Ok the problem is pretty obvious.


Another related question though. How do I manage modules if I want to compile multiple kernels? Having to compile and reinstall all the modules after every time you try out a new kernel can't be the most practical way out there.
 
Old 12-16-2007, 04:29 AM   #13
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by yougene;
Another related question though. How do I manage modules if I want to compile multiple kernels? Having to compile and reinstall all the modules after every time you try out a new kernel can't be the most practical way out there.
I know this is an old thread but I though I would post an answer to this question in case other people stumble upon it.

Basically, if you are booting to multiple versions of the same kernel version you need to make sure you enable the suffix option in the config. It is under 'General Setup'->'Local Version'. This is used in the config for the smp kernel of Slackware 12. What happens is the your modules will install to /lib/modules/'kernel version'suffix, so for the 2.6.21.5-smp config in Slackware 12 '-smp' is what is under 'Local Version' and the modules are installed to /lib/modules/2.6.21.5-smp. If you are only using actually different kernel versions you don't need to worry about this.

Another thing that is important to keep in mind is that you might want to enable module versioning. This will help 3rd party modules to work across different kernel builds. Even still you might have to resort to some manual tricks to get some of them to play nicely (eg. nvidia).

Finally, you can also modify the EXTRAVERSION var in the kernel Makefile, so instead of using '5' you could use '5a' so the kernel would compile to 2.6.21.5a for instance.

Oh, and don't worry too much if you start getting errors at boot time because the system is trying to load modules that are now built in to the kernel. You can modify /etc/rc.d/rc.modules if you want to change this.
 
  


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 05:09 PM
FATAL: could not load /lib/modules/2.6.1/modules.dep Fr33B33R Slackware 3 01-12-2004 05:40 AM
modules.conf - Cannot get modules to load automatically gundelgauk Linux - General 1 12-27-2003 11:27 PM
modules load Beuzekom Linux - Newbie 2 08-22-2003 05:25 PM
Load Modules Before X Parksy Linux - Software 13 08-05-2003 08:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:18 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
Open Source Consulting | Domain Registration