LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't load modules? (https://www.linuxquestions.org/questions/slackware-14/cant-load-modules-385831/)

yougene 11-23-2005 09:55 AM

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?

keefaz 11-23-2005 10:03 AM

- 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

yougene 11-23-2005 10:08 AM

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?

keefaz 11-23-2005 10:18 AM

Did you recompile your kernel ?

What is the output with :
Code:

ls -l /lib/modules/`uname -r`

yougene 11-23-2005 10:49 AM

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

keefaz 11-23-2005 11:55 AM

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.*"


yougene 11-23-2005 12:42 PM

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?

keefaz 11-23-2005 02:02 PM

Quote:

Is it possible the make modules_install deleted all my old modules?
Did you enable drivers as module in kernel config ?

yougene 11-23-2005 02:27 PM

I don't think I did.


The thing is I left my old kernel intact, but now they are both affected by this.

keefaz 11-23-2005 02:30 PM

You could cp /boot/config-2.4.31 in .config in your kernel dir,
then run make oldconfig and compile, install modules and kernel

yougene 11-23-2005 10:28 PM

Yeah that fixed it. Thanks alot.


What do you think caused the problem?

yougene 11-27-2005 08:25 PM

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.

shadowsnipes 12-16-2007 04:29 AM

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.


All times are GMT -5. The time now is 07:33 PM.