Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Gentoo, with kernel 2.6.30, and I tried to load a module with modprobe usbcore, but it fails with modprobe: module 'usbcore' not found.

However, I can find a directory with that name in the directory /sys/module/. What is wrong here?

share|improve this question
    
By gentoo 2.6.30 I assume that's the kernel version. Right? –  schaiba Feb 14 '13 at 18:00
    
Module binaries are located in /lib/modules/<kernel-version>/ and not in /sys/module/. The way you load a module is in no way different then in other distributions. –  Flow Feb 15 '13 at 10:38

2 Answers 2

up vote 1 down vote accepted

You can check whether the module you are trying to insert is present or not using

$ modprobe -l | grep usbcore

Generally all the modules are present in the path /lib/modules/<kernel-version>/kernel/

If present, you can then insert the module using modprobe or insmod command.

$ insmod <complete/path/to/module>

EDIT: If modprobe -l option is not there, you can run the following find command to list all the modules:

root@localhost#  find /lib/modules/`uname -r` -name '*.ko' 
share|improve this answer
    
modprobe has no option -l –  Alex Feb 15 '13 at 6:13
    
@Alex: I have updated the answer. –  pradeepchhetri Feb 15 '13 at 6:18
    
Thanks, it seems the module is NOT available. –  Alex Feb 15 '13 at 6:54

if you already have the directory /sys/module/usbcore i would assume the module is already loaded. check if 'lsmod' or 'cat /proc/modules' are listing it, to be sure if its loaded or not.

one possible reason why modprobe might tell you it can't find the module, could be that its not indexed in /lib/modules/kernel version/modules.dep. you can regenerate this file by submitting 'depmod'.

since modprobe doesn't know howto load this module. I would guess that you probably already have it loaded because its in your initrd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.