PDA

View Full Version : [ubuntu] "FATAL: Module not found error" using modprobe



shariefbe
December 13th, 2008, 05:42 PM
Hello,
i have an problem with modprobe command...i compiled the usbcore module and inserted using "insmod" command...and its working..when i see "lsmod" its in that list...but when i insert this module using "modprobe" i am getting the FATAL error....that is

root@sharief-desktop:/home/sharief/Desktop/drivers/core# modprobe usbcore.ko
FATAL: Module usbcore.ko not found.
i dont know whats the error...can anyone help me...

Partyboi2
December 13th, 2008, 11:50 PM
Try

modprobe usbcore without the .ko end bit.

shariefbe
December 14th, 2008, 03:20 AM
yes...getting the same error...see

root@sharief-desktop:/home/sharief/Desktop/drivers/core# modprobe usbcore
FATAL: Module usbcore not found.

shariefbe
December 14th, 2008, 03:22 PM
i disabled that module while compiling the kernel.....now i am trying to install manually...this is for college project...please help me

iponeverything
December 14th, 2008, 03:39 PM
Generate your module dependencies


sudo depmod -a

shariefbe
December 15th, 2008, 05:30 AM
when i use this command am getting the following error...

sharief@sharief-desktop:~$ sudo depmod -a
[sudo] password for sharief:
FATAL: Could not rename /lib/modules/2.6.26/modules.dep.temp into /lib/modules/2.6.26/modules.dep: No such file or directory
sharief@sharief-desktop:~$

iponeverything
December 15th, 2008, 10:45 AM
attach the file /tmp/find.txt from this command:


find /lib/modules > /tmp/find.txt

shariefbe
December 15th, 2008, 01:31 PM
this is the attched txt/find.txt file..

iponeverything
December 15th, 2008, 02:06 PM
backup your original module to /root if you have one:


sudo mv /lib/modules/`uname -r`/kernel/drivers/usb/core/usbcore.ko /root/


Next copy your custom module into its place:


sudo cp /home/sharief/Desktop/drivers/core/usbcore.ko /lib/modules/`uname -r`/kernel/drivers/usb/core/usbcore.ko

rerun our depmod command:


sudo depmod -a


If this depmod fails run this and upload /tmp/debug.txt.


sudo depmod -v -a > /tmp/debug.txt 2>&1


If the depmod did work load your module with:


sudo modprobe usbcore

shariefbe
December 15th, 2008, 02:36 PM
actually i didnt have "usbcore" module in /lib/modules/`uname -r`/kernel/drivers/usb/core/

so i tried the second command....for that i am getting the following error

root@sharief-desktop:/home/sharief# sudo cp /home/sharief/Desktop/drivers/core/usbcore.ko /lib/modules/`uname -r`/kernel/drivers/usb/core/usbcore.ko
cp: cannot create regular file `/lib/modules/2.6.26/kernel/drivers/usb/core/usbcore.ko': No such file or directory
root@sharief-desktop:/home/sharief#

shariefbe
December 15th, 2008, 02:40 PM
but i am getting this command work...

root@sharief-desktop:/home/sharief# sudo depmod -v -a > /tmp/debug.txt 2>&1
root@sharief-desktop:/home/sharief# sudo depmod -a
root@sharief-desktop:/home/sharief#

iponeverything
December 15th, 2008, 02:51 PM
put it in misc:


sudo cp /home/sharief/Desktop/drivers/core/usbcore.ko /lib/modules/`uname -r`/kernel/drivers/misc/usbcore.ko

and rerun your depmod.

shariefbe
December 15th, 2008, 03:01 PM
yes thanks...its working now...

root@sharief-desktop:/home/sharief# sudo cp /home/sharief/Desktop/drivers/core/usbcore.ko /lib/modules/`uname -r`/kernel/drivers/misc/usbcore.ko
root@sharief-desktop:/home/sharief# sudo depmod -a
root@sharief-desktop:/home/sharief# cd Desktop/
root@sharief-desktop:/home/sharief/Desktop# cd drivers/
root@sharief-desktop:/home/sharief/Desktop/drivers# cd core/
root@sharief-desktop:/home/sharief/Desktop/drivers/core# modprobe usbcore
root@sharief-desktop:/home/sharief/Desktop/drivers/core#

result of "dmesg" last 7 lines

[ 49.171452] NET: Registered protocol family 17
[ 52.641079] NET: Registered protocol family 10
[ 52.646322] lo: Disabled Privacy Extensions
[ 62.696213] eth0: no IPv6 routers present
[ 6316.438077] usbcore: registered new interface driver usbfs
[ 6316.438782] usbcore: registered new interface driver hub
[ 6316.442780] usbcore: registered new device driver usb
root@sharief-desktop:/home/sharief/Desktop/drivers/core#

even though my usb port is not working...what to do?please help me...

iponeverything
December 16th, 2008, 05:03 AM
i disabled that module while compiling the kernel.....now i am trying to install manually...this is for college project.

There is only so much a person can do. I did the easy part in getting your module to load using the modprobe command, I think you going to have to figure out why it does not work the way you expect on your own.

BTW -- you don't have to "cd" to any special directory for modprobe to work.

shariefbe
December 16th, 2008, 06:16 AM
yes...i dont know why it does not work.....can you help me to make my USB port work...

iponeverything
December 16th, 2008, 06:48 AM
This is school project right? What is the project? I am afraid we can't do your projects for you.

Does USB work with the stock kernel?

shariefbe
December 16th, 2008, 11:11 AM
yes..its college project...my project is "hacking the USB port"...i have to gather all the details about "USB port"...for that i planned to disable the usb support in the menuconfig....after that i compiled the "usbcore" module manually and planned to install dynamically...yes i done that..but now my usb port is not working....now i dont know what to do....can you help me...just now my usb port should work..by installing the module dynamically....Thanks a lot

iponeverything
December 16th, 2008, 12:42 PM
If your usb works with original default kernel and does not work with your module, I would say that problem is with your module and not with the usb port.

If the issue is with your module, it may mean that you are not quite done with your project yet --

shariefbe
December 16th, 2008, 03:27 PM
yes i know that...for that only am finding help from you...now i have to find the problem with my module....but i dont know how to find and how to rectify that...please help me....

shariefbe
December 17th, 2008, 04:13 AM
i have to make my USB port to work....help me

iponeverything
December 17th, 2008, 04:21 AM
no. I can't help you.

No one is going to be able to give you some magic command for you to paste into your terminal window to make *your* modified usb module do whatever mysterious thing that it is supposed to do - for you to complete *your* assignment.

shariefbe
December 17th, 2008, 04:30 AM
ya Thanks...i didnt ask like that...just i want to know the necessary "modules" which is needed to make USB port work....Thats all...after that i will do the remaining things....

iponeverything
December 17th, 2008, 05:49 AM
foo@lp:~$ lsmod |grep usb
usbcore 148848 3 uhci_hcd,ehci_hcd


FYI - modprobe loads all the necessary ancillary modules.

So -- The problem is with your usbcore.ko.

shariefbe
December 17th, 2008, 11:11 AM
whether i need to install this "uhci_hcd,ehci_hcd" modules?

iponeverything
December 17th, 2008, 12:32 PM
type
lsmod |grep usb and see.

I am done with this thread. Don't expect another response from me. Don't PM me.

Ask your teacher or a classmate for help or use google.

shariefbe
December 17th, 2008, 01:45 PM
ya ok Thanks.....Thanks a lot

danger89
April 8th, 2010, 04:57 PM
I found wusbcore (*.ko) in my kernel is this the same?