LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-26-2006, 11:13 PM   #1
dogslayer
LQ Newbie
 
Registered: Feb 2006
Posts: 23

Rep: Reputation: 15
unable to remove kernel module........


hey guys..... recently i tried out the packet filter code given in linux journal.....its a kernel module using netfilter hooks and all.....thing is that i was able to insert the module using "insmod" but cudnt remove the module using "rmmod" i had to restart the comp to remove the module.......
can smeone tell me how to remove the module without restarting, whn rmmod dosent work....\

by,
dogslayer
 
Old 03-26-2006, 11:29 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,770

Rep: Reputation: 205Reputation: 205Reputation: 205
With 2.6 series kernels, module unloading can be enabled or disabled in the kernel configuration. In your case, it sounds like it is disabled.
 
Old 03-26-2006, 11:32 PM   #3
dogslayer
LQ Newbie
 
Registered: Feb 2006
Posts: 23

Original Poster
Rep: Reputation: 15
no dude am able to unload other modules using "rmmod" its only for this packet filter module am hving problem wid....
and iam using fc4...which by default supports unloading and loading of modules.......

Last edited by dogslayer; 03-26-2006 at 11:34 PM.
 
Old 03-26-2006, 11:37 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,131

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
If you look at lsmod do any other modules depend on that module? I don't think the ekrnel will let you remove a module when dependant modules are loaded.
 
Old 03-26-2006, 11:47 PM   #5
dogslayer
LQ Newbie
 
Registered: Feb 2006
Posts: 23

Original Poster
Rep: Reputation: 15
its actually an personally built and compiled module..... i dont think it has any other dependencies.....
 
Old 03-27-2006, 12:21 AM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,770

Rep: Reputation: 205Reputation: 205Reputation: 205
Try "forcing" it to unload with "rmmod -f modulename"

For this to work, CONFIG_MODULE_FORCE_UNLOAD must also be enabled in your kernel config...

There must be a reason your kernel isn't unloading the module. Generally, it will only allow modules to unload if it is "safe" to do so.

Last edited by rkelsen; 03-27-2006 at 12:22 AM.
 
Old 03-27-2006, 12:26 AM   #7
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
hmm,

actually rmmod checks two things
1. any dependency
2. if the module is not used

here the issue seems like that the module is being used up by some process even if it is not having any dependency. Try to figure out any service or process which is using that module, after the service is stopped or the process killed, you can actually use rmmod to unload the module. always remember to use the -e option to save the persistant data otherwise you might loose some data.

-Rahul.
 
  


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
Remove module-init-tools due to kernel#2.6.9-1.667 Lobais Fedora 0 11-12-2004 01:15 PM
Slackware 10- Please confirm my steps used to remove a module from a pre-built kernel jtp51 Slackware 7 11-03-2004 05:02 PM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
Unable to unload eepro100 module in Kernel 2.6 simjii Linux - General 0 12-08-2003 11:50 PM
How to remove module from kernel without recompile? Stoic Linux - Software 10 09-23-2003 06:17 PM


All times are GMT -5. The time now is 03:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration