LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-17-2010, 02:18 AM   #1
atmurali
Member
 
Registered: Nov 2007
Location: Kerala
Posts: 42

Rep: Reputation: 15
rmmod doesn't work properly


Hello,
I am using mini2440 arm board with linux 2.29.4 kernel ported. I can successfully insert the kernel module (main.ko). But when trying rmmod it does not be removed.
###########
[root@FriendlyARM /]# rmmod main.ko
rmmod: chdir(2.6.29.4-FriendlyARM): No such file or directory
[root@FriendlyARM /]# modprobe -r main.ko
modprobe: chdir(2.6.29.4-FriendlyARM): No such file or directory
##########
Please help me to solve the problem.
Thanking You,
Anoob T Murali.
 
Old 03-17-2010, 07:01 AM   #2
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
What does dmesg say,

After you insmod the module ?

After you rmmod the module ?
 
Old 03-18-2010, 12:33 AM   #3
atmurali
Member
 
Registered: Nov 2007
Location: Kerala
Posts: 42

Original Poster
Rep: Reputation: 15
Hello,
When I 'insmod' the module, the message in printk(" message"); was displayed (in dmesg also).

After 'rmmod' there is no other messages in 'dmesg'.
What may the problem is?
 
Old 03-18-2010, 12:37 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
Did you check whether the module loaded?
What is the output for lsmod?
 
Old 03-18-2010, 12:47 AM   #5
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by atmurali View Post
Hello,
I am using mini2440 arm board with linux 2.29.4 kernel ported. I can successfully insert the kernel module (main.ko). But when trying rmmod it does not be removed.
###########
[root@FriendlyARM /]# rmmod main.ko
rmmod: chdir(2.6.29.4-FriendlyARM): No such file or directory
[root@FriendlyARM /]# modprobe -r main.ko
modprobe: chdir(2.6.29.4-FriendlyARM): No such file or directory
##########
Please help me to solve the problem.
Thanking You,
Anoob T Murali.
Are you sure there is a module named main.ko?
First check the output of lsmod to see if its there or not, if its not there then its obvious that it will give that error.
use this command to serach main.ko:
#lsmod |grep main.ko
 
Old 03-19-2010, 12:00 AM   #6
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware64, LFS
Posts: 312

Rep: Reputation: 53
The kernel looks for its modules in /lib/modules/`uname -r`/. Likely your kernel and your modules aren't in sync with what arch/release they think they are, likely because they were installed from some (differing) packages. That is, either the kernel or the modules is having an identity crisis. You can avoid the problem totally by building/installing the kernel and its modules from the same source. Remember to run depmod afterwards. Also, modules should be inserted with 'modprobe whatever' and removed with 'modprobe -r whatever'. List all available modules the kernel knows of with 'modprobe -l '.
 
Old 03-19-2010, 12:13 AM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by atmurali View Post
Hello,
I am using mini2440 arm board with linux 2.29.4 kernel ported. I can successfully insert the kernel module (main.ko). But when trying rmmod it does not be removed.
###########
[root@FriendlyARM /]# rmmod main.ko
rmmod: chdir(2.6.29.4-FriendlyARM): No such file or directory
[root@FriendlyARM /]# modprobe -r main.ko
modprobe: chdir(2.6.29.4-FriendlyARM): No such file or directory
##########
Please help me to solve the problem.
Thanking You,
Anoob T Murali.
A module is inserted with insmod using the fileid of the module; which ends with ".ko". However, the fileid is not the module name; which is the fileid minus the ".ko". Try doing a rmmod on just "main". By the way, that is a somewhat dangerous name for a module.
 
1 members found this post helpful.
Old 03-19-2010, 12:39 AM   #8
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quakeboy02,

Oh you are so correct, this small error slipped out of my mind
 
Old 03-23-2010, 12:26 AM   #9
atmurali
Member
 
Registered: Nov 2007
Location: Kerala
Posts: 42

Original Poster
Rep: Reputation: 15
Thumbs up

Thank You all.

I got it.
One of my problems was using rmmod main.ko, I have used it without .ko.
Second I created a folder "2.6.29.4-FriendlyARM" under /lib/module.

And Thank You for all.
 
Old 03-23-2010, 12:28 AM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
atmurali,

Nice, you got it solved
 
Old 04-23-2010, 04:26 AM   #11
wujianwen
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
also refer to :www.developmentboard.net
embedded board
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS lookup doesn't work, ping, firefox will not work properly lovemov Linux - Networking 2 04-23-2009 02:30 PM
Gui doesn't work properly Goudvis Linux - Laptop and Netbook 2 02-27-2009 03:24 PM
Getting betaftpd to work properly. roystonlodge DamnSmallLinux 2 12-18-2008 01:04 PM
CP command doesn't work properly? itz2000 Linux - Newbie 1 08-02-2005 01:14 PM
gpm don't work properly Duukkis Linux - Software 3 03-21-2004 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration