LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't insert module into kernel (http://www.linuxquestions.org/questions/linux-newbie-8/cant-insert-module-into-kernel-84253/)

swamysk 08-21-2003 01:10 PM

Can't insert module into kernel
 
Hi

I am trying to insert modules but with bad results - I suspect its to do with the kernel version or something but being very new, I can't be sure what needs to be done. Here is the dump of what resulted:

[root@localhost alsa]# modprobe snd-intel8x0;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss
/lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o: unresolved symbol snd_verbose_printk
modprobe: insmod /lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o failed
modprobe: insmod snd-intel8x0 failed
/lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o: unresolved symbol snd_verbose_printk
modprobe: insmod /lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o failed
modprobe: insmod snd-pcm-oss failed
/lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o: unresolved symbol snd_verbose_printk
modprobe: insmod /lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o failed
modprobe: insmod snd-mixer-oss failed
/lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o: unresolved symbol snd_verbose_printk
modprobe: insmod /lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o failed
modprobe: insmod snd-seq-oss failed
[root@localhost alsa]#

Could anyone please help......thanks a ton.

swamysk 08-21-2003 01:18 PM

While compiling the source (make) there was a portion that said this:

checking for directory with kernel source... /lib/modules/2.4.21-0.13mdk/build
checking for kernel version... 2.4.21-0.13mdk
checking for GCC version... Kernel compiler: Used compiler: gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)

*** NO PREDEFINED KERNEL COMPILER IS DETECTED
*** Assuming the same compiler is used with the current system compiler.

*** Please make sure that the same compiler version was used for building kernel.

Could this be to blame? Any help with what I need to do next would be greatly appreciated. It'll help me get audio working!

Thanks

kamstrup 08-21-2003 02:41 PM

Do you have kernel-sources installed? I think you must have since you can even compile... Try 'rpm -qa | grep kernel-source' and 'uname -r'

swamysk 08-21-2003 04:39 PM

Quote:

Originally posted by kamstrup
Do you have kernel-sources installed?
Yes. I installed it recently.

Quote:

Originally posted by kamstrup
Try 'rpm -qa | grep kernel-source' and 'uname -r'
It didn't seem to do anything - just came back to the prompt. What was it supposed to do?

Thanks

swamysk 08-22-2003 04:49 AM

Could someone please help. Thanks.

kev82 08-22-2003 05:36 AM

where did you get these modules from? they wernt compiled with the kernel were they? its better to compile the kernel and modules with the same compiler so perhaps it would be better to recompile the whole kernel.

it looks like your kernel is missing some dependancies, either sound support isnt in the kernel or you havnt run depmod since you installed these new modules. but as i say above, modules should be compiled with the same compiler that did the kernel.

kamstrup 08-22-2003 05:37 AM

If 'rpm -qa | grep kernel-source' dosn't return something like: 'kernel-source-2.4.21-0.25mdk' I don't hink you have kernel source installed correctly.
Try 'rpm -qa | grep kernel'.
Can you remember what command and/or program you used to install sources? If you can't remember maybe it's still in your shell history (browse through it with up-arrow and remember to be root (if you installed sources as root that is)).

greetings, kamstrup

swamysk 08-22-2003 12:05 PM

Quote:

Originally posted by kev82
it looks like your kernel is missing some dependancies, either sound support isnt in the kernel or you havnt run depmod since you installed these new modules. but as i say above, modules should be compiled with the same compiler that did the kernel.
The compiler is the same - its a new installation and I haven't done anything to update the compiler (if I understood you correctly).

Also, here is the result of running depmod -ae
depmod: *** Unresolved symbols in /lib/modules/2.4.21-0.13mdk/kernel/sound/acore/snd.o
depmod: snd_verbose_printk


Quote:

Originally posted by kamstrup
Try 'rpm -qa | grep kernel'.
This is the result
kernel-2.4.21.0.13mdk-1-1mdk
kernel-source-2.4.21-0.13mdk

Quote:

Originally posted by kamstrup
Can you remember what command and/or program you used to install sources?
The sources got installed on their own from the CD when I installed another application that needed them. I ran auto update (Mandrake specific app probably) to do this.

Your feedback please....thanks.

kev82 08-22-2003 12:38 PM

from what i can see you are trying to compile some extra kernel modules and get them to work with the standard precompiled kernel that comes with mandrake, i asked whether the compiler that you compiled the modules with was the same as the one which compiled the kernel, this is unlikely if you didnt compile the kernel yourself. i would suggest you compile yourself a new kernel with whatever gcc you have, and then compile the modules for that kernel with the same gcc. there is a kernel compiling guide somewhere on this site but im not sure where.

swamysk 08-22-2003 12:49 PM

Quote:

Originally posted by kev82
i would suggest you compile yourself a new kernel with whatever gcc you have, and then compile the modules for that kernel with the same gcc.
I didn't compile a new kernel - just installed the source.

If I did compile the kernel now from the source, would it change any of my current config settings? Is there a set of config files that I should backup before and restore after?

Also, I installed new nVidia drivers - would recompiling the kernel change any of that?

Thanks for the help.

kev82 08-22-2003 01:15 PM

it wouldnt change any settings, if you dont do it right not all of your hardware will work but you can always boot back with your old kernel. as long as you change the value of EXTRAVERSION in the kernel makefile so you dont overwrite your current modules then nothing can really go wrong. once you get these modules working you will need to reinstall the nvidia kernel module for your new kernel but thats not hard to do.

swamysk 08-22-2003 02:25 PM

Any final options before recompiling the kernel?

Any chance I can undo the new driver installation and reset the system to the earlier config? Basically just roll back the changes that were made through the configure, make and make install commands. If I can restore the system to that point, that would be great.

Thanks

kev82 08-22-2003 03:00 PM

as long as each kernel has a different EXTRAVERSION then you can have as many kernels as you like and choose which you want at boot time, i have 4 different kernels installed at the moment.

swamysk 08-22-2003 05:08 PM

Quote:

Originally posted by kev82
as long as each kernel has a different EXTRAVERSION then you can have as many kernels as you like and choose which you want at boot time, i have 4 different kernels installed at the moment.
Ok I think I'm getting closer to installing the kernel. Checked the Makefile and it says the following

EXTRAVERSION = -0.13mdkcustom

What should I do to have multiple kernels on the same system?

Thanks for helping.

kev82 08-22-2003 05:27 PM

basically you need to make sure that none of the EXTRAVERSION's of your kernels are the same, i tend to set mine to the time/date of compilation, eg -18.12.02:21.55

i suggest you now go and find yourself a kernel compilation guide, theres probably one at www.tldp.org


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