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? |
- 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 |
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? |
Did you recompile your kernel ?
What is the output with : Code:
ls -l /lib/modules/`uname -r` |
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 |
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) Code:
uname -r |
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? |
Quote:
|
I don't think I did.
The thing is I left my old kernel intact, but now they are both affected by this. |
You could cp /boot/config-2.4.31 in .config in your kernel dir,
then run make oldconfig and compile, install modules and kernel |
Yeah that fixed it. Thanks alot.
What do you think caused the problem? |
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. |
Quote:
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. |