Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: mb on December 18, 2011, 02:45:06 PM

Title: modprobe blacklist not working
Post by: mb on December 18, 2011, 02:45:06 PM
I am trying to blacklist the module snd_intel8x0m as it is causing problems with snd_intel8x0. i have in the file /etc/modprobe.conf; blacklist snd-intel8x0m, blacklist snd_intel8x0m and blacklist intel8x0m. Yet (sometimes, it seems) it still loads. I also tried creating /etc/modprobe.d/blacklist.conf in case this should be used instead- no change. Same goes for firewire_ohci and firewire_core.

Am i putting in the name right? AFAICT it should just be whatever is in lsmod, but with '-' replacing '_'. Correct? If the name isn't the issue then what might it be??
Title: Re: modprobe blacklist not working
Post by: roberts on December 18, 2011, 02:49:14 PM
Use blacklist boot code see FAQ http://distro.ibiblio.org/tinycorelinux/faq.html (http://distro.ibiblio.org/tinycorelinux/faq.html)
Title: Re: modprobe blacklist not working
Post by: tweetyhack on January 19, 2012, 01:18:07 PM
I tried the the boot option blacklist=pcsprk,ppdev,parport,parport_pc but that doesn't seem to work. I also created /etc/modprobe.d/blacklist.conf with contents:
blacklist pcspkr
blacklist ppdev
blacklist parport
blacklist parport_pc

That does not work either. Any ideas?
Title: Re: modprobe blacklist not working
Post by: Juanito on January 19, 2012, 01:29:20 PM
blacklist=module1 blacklist=module2, etc

eg blacklist=ssb blacklist=bcma blacklist=b43
Title: Re: modprobe blacklist not working
Post by: tweetyhack on January 19, 2012, 02:47:54 PM
ahh, muy bueno! Thanks Juanito! I still like my format better, short and simple :). I know archlinux does it that way. Can't be too hard to implement right?
if(",".exist){
  modules = blacklist.split(",")
  modules.each{
    not load each module
 }
}else{
  not load single module
}
Title: Re: modprobe blacklist not working
Post by: Rich on January 19, 2012, 04:04:59 PM
Assuming it does impact the startup script too badly, this might be worth implementing, considering
that the line length limit for boot codes is 256 characters. Changing to a comma separated format
would save 10 characters for each additional module blacklisted. While this might not sound like a
big deal, it could make a difference for someone using several UUIDs at 36 characters a piece.
Title: Re: modprobe blacklist not working
Post by: curaga on January 20, 2012, 02:52:42 AM
Is that python? In a boot script?

Yes, if you have many modules to blacklist, please post a patch for a comma delimited format. But if you go over a few modules, it still won't be enough, and it would be better to remaster your blacklist file in.
Title: Re: modprobe blacklist not working
Post by: maro on January 22, 2012, 05:51:38 AM
Here would be a patch that should allow to have comma delimited blacklists (in addition to the multiple blacklist boot codes option):
Code: [Select]
--- tc-config-orig
+++ tc-config
@@ -101 +101,3 @@
-               echo "blacklist $i" >> /etc/modprobe.d/blacklist.conf
+               echo "$i" | tr ',' '\n' | while read j ; do
+                       echo "blacklist $j" >> /etc/modprobe.d/blacklist.conf
+               done

That means that "blacklist=first blacklist=second blacklist=third blacklist=fourth" and "blacklist=first,second,third blacklist=fourth" should both create the same '/etc/modprobe.d/blacklist.conf'.
Title: Re: modprobe blacklist not working
Post by: roberts on January 25, 2012, 01:10:29 PM
Patch accepted. Thanks.