LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 11-01-2007, 07:04 PM   #1
xerxesdaphat
LQ Newbie
 
Registered: Mar 2004
Posts: 6

Rep: Reputation: 0
Blacklisting automatic driver modules


I asked this question here as it's really about blacklisting stuff in general, not just wireless networking.

Background:
The rt2570 USB (but internal) wireless card on my laptop running Ubuntu 7.10 has begun to get rather flaky lately, presumably because of heat. So I went out and bought a Atheros-based PCMCIA card (TP-LINK WN-610G, works brilliantly, highly recommended!). That's happily ticking over. However, the internal wireless card is still there. What is irritating is that if a particular button on the laptop's case is accidentally nudged, this switches off the original wireless card and due to bugs in the driver, causes a kernel panic. Not good. If the module is unloaded (rmmod rt2570) first, there's not a problem. However the drivers are automatically loaded every boot. Interestingly if you press the button again to switch the wifi card back on, the modules need to be manually loaded (modprobe rt2570).

My question:
What I'd like to do is make it so the module is not loaded automatically on boot, however if I want to use the original card (for Wireshark, for instance), I'd like to be able to do a `modprobe rt2570' and have the thing still load. How do I accomplish this? Does blacklisting just prevent automatic loading, or does it forbid loading entirely?

Thanks very much.
 
Old 11-02-2007, 02:13 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by xerxesdaphat View Post
Does blacklisting just prevent automatic loading, or does it forbid loading entirely?
I am not sure, but I think it would be real easy to experimentally find out. I.e., try it and see.

If you don't want to or can't blacklist, another option would be to let the driver load but to manually unload it in /etc/rc.local. If you needed a slight time delay you could have rc.local background another script which first waits using the sleep command and then unloads the module. (BTW, the sleep command in Ubuntu will except fractional seconds.)

There's another option that might work. (I've never tried this; let the buyer beware.) You could create a file in /etc/modprobe.d that contains the line

Code:
install rt2570 /bin/true
(I am not at a Linux computer; I think true is in /bin) When modprobe tries to load the module, it will, instead (I hope) simply execute true instead. If you do this and it works, then to actually install the module you would have to:

Code:
modprobe --ignore-install rt2570
Hopefully one of these methods will help you out. If you try the last one, please let me know if it works.

Last edited by blackhole54; 11-02-2007 at 02:17 AM. Reason: clarification
 
  


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
automatic modules loading bolekilolek Fedora 3 06-28-2007 04:00 PM
blacklisting driver unisol Linux - Networking 1 06-09-2007 10:21 AM
Automatic load of snd modules guldo Debian 2 12-22-2006 01:27 PM
Ndiswrapper - trouble blacklisting existing driver randysparks Linux - Wireless Networking 1 08-06-2006 09:10 AM
Automatic Modules server-solution Linux - Software 0 10-11-2005 06:02 AM


All times are GMT -5. The time now is 12:37 PM.

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