LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2005, 02:51 PM   #1
ozymandias
Member
 
Registered: Aug 2005
Location: West Midlands, UK
Posts: 61

Rep: Reputation: 15
How do I swap kernel modules ??


I have written a (very) simple script to swap two sets of driver modules for my wireless card. One set allows promioscusous mode (foruse with Kismet etc.) the other does not (as required by xsupplicant).
Once the new drivers have been copied to /lib/modules/etc etc I have to reboot to allow the changes to take effect.
Is there an elegant way to do this? Should I be looking to modprobe -r the driver modules, then reinsert the new ones, or is there some command to reload all modules?
Will the kernel take this sort of abuse, or is it the equivalent of having the carpet pulled out from under it?!
 
Old 10-28-2005, 03:16 PM   #2
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
That all depends on whether module unloading has been compiled into your kernel. I have unloaded kernel modules before without too many ill effects. It probably also depends on the frequency with which you will be switching modules. Once a day vs. once every fifteen minutes could be a HUGE difference.
 
Old 10-28-2005, 03:49 PM   #3
ozymandias
Member
 
Registered: Aug 2005
Location: West Midlands, UK
Posts: 61

Original Poster
Rep: Reputation: 15
I'm using Debian 2.6.12 kernel (should have said, sorry)

The changes wouldn't be too often...
 
Old 10-28-2005, 04:39 PM   #4
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
Is it a kernel you compiled yourself or is it a stock Debian kernel?

Actually, you'll know if your kernel supports unloading by trying to remove a module using "rmmod" and then the kernel module name. If it fails (assuming you actually specified a module that was loaded ), then perhaps your kernel doesn't support it as is.
 
Old 10-28-2005, 06:17 PM   #5
ozymandias
Member
 
Registered: Aug 2005
Location: West Midlands, UK
Posts: 61

Original Poster
Rep: Reputation: 15
When I try to use rmmod orinoco or rmmod orinoco_cs (the modules for my wireless driver) i'm told they're in use. How do I stop them and replace them is the question (without rebooting)!

Oz.
 
Old 10-28-2005, 06:19 PM   #6
ozymandias
Member
 
Registered: Aug 2005
Location: West Midlands, UK
Posts: 61

Original Poster
Rep: Reputation: 15
Oh yes, and it's a standard install Debian kernel (being a newbie I'm not up to compiling my own, just yet!!)
 
Old 10-28-2005, 10:46 PM   #7
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
Now you've reached my limit for helping you since you are using Debian. In Slack, you would issue a

#/etc/rc.d/rc.pcmcia stop

command. This would stop the PCMCIA card and then I would imagine you could unload the appropriate modules. I'm not sure how to tell the PCMCIA system to stop in Debian. Perhaps Google can help you out here.
 
  


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
kernel: No module symbols loaded - kernel modules not enabled. Qucho Debian 9 05-26-2004 03:50 AM
Kernel Modules and modules.conf init Linux - General 0 02-20-2004 07:51 PM
new kernel (2.4.22 up from 2.4.20-6) - missing modules - use old modules? Simon Bridge Linux - Software 1 02-04-2004 06:52 AM
How to keep modules/drivers across kernel recompiles and kernel versions? Pisces107 Linux - General 5 01-21-2004 09:29 PM
Kernel modules: why are some kernel modules zipped? hampel Slackware 3 06-30-2003 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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