Differences between revisions 3 and 4
Revision 3 as of 2009-03-16 03:33:34
Size: 2317
Editor: anonymous
Comment: converted to 1.6 markup
Revision 4 as of 2009-06-15 05:52:57
Size: 2374
Editor: FranklinPiat
Comment: files in modprobe.d should be named *.conf in Lenny+
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
 1. Do not use {{{/etc/modprobe.d/blacklist}}} as, as can be seen in the comment of the header: naming modules there {{{...does not affect autoloading of modules by the kernel.}}}  1. Do not use {{{/etc/modprobe.d/blacklist.conf}}} as, as can be seen in the comment of the header: naming modules there {{{...does not affect autoloading of modules by the kernel.}}}
Line 11: Line 11:
 1. Create a file '{{{/etc/modprobe.d/<modulename>}}}' containing '{{{blacklist <modulename>}}}'.  1. Create a file '{{{/etc/modprobe.d/<modulename>.conf}}}' containing '{{{blacklist <modulename>}}}'.
Line 23: Line 23:
-rw-r--r-- 1 root root 1405 Oct 29 09:46 blacklist
-rw-r--r-- 1 root root 18 Oct 29 13:34 eth1394
-rw-r--r-- 1 root root 15 Oct 29 14:49 irda
-rw-r--r-- 1 root root 20 Oct 29 16:10 irtty_sir
-rw-r--r-- 1 root root 18 Oct 29 16:10 sir_dev
-rw-r--r-- 1 root root 19 Oct 29 16:10 nsc_ircc
-rw-r--r-- 1 root root 1405 Oct 29 09:46 blacklist.conf
-rw-r--r-- 1 root root 18 Oct 29 13:34 eth1394.conf
-rw-r--r-- 1 root root 15 Oct 29 14:49 irda.conf
-rw-r--r-- 1 root root 20 Oct 29 16:10 irtty_sir.conf
-rw-r--r-- 1 root root 18 Oct 29 16:10 sir_dev.conf
-rw-r--r-- 1 root root 19 Oct 29 16:10 nsc_ircc.conf
Line 31: Line 31:
-rw-r--r-- 1 root root 15 Oct 29 16:24 ipv6 -rw-r--r-- 1 root root 15 Oct 29 16:24 ipv6.conf
Line 33: Line 33:
root@host:/etc/modprobe.d# cat eth1394 irda irtty_sir sir_dev nsc_ircc ipv6 root@host:/etc/modprobe.d# cat eth1394.conf irda.conf irtty_sir.conf sir_dev.conf nsc_ircc.conf ipv6.conf
Line 50: Line 50:
##CategoryKernel

KernelModuleBlacklisting

Disable automatic loading of kernel driver modules in etch.*

Warnings:

  1. Do not use /etc/modprobe.d/blacklist.conf as, as can be seen in the comment of the header: naming modules there ...does not affect autoloading of modules by the kernel.

  2. (Re)move /etc/modprobe.conf, if present, as it supersedes anything in /etc/modprobe.d/*(unless you add include /etc/modprobe.d).

Howto:

  1. Create a file '/etc/modprobe.d/<modulename>.conf' containing 'blacklist <modulename>'.

  2. run 'depmod -ae' as root

  3. Recreate your initrd with 'update-initramfs -u'

Examples:

root@host:/etc/modprobe.d# ls -altr
total 72
-rw-r--r--  1 root root   363 Sep 24 19:57 pnp-hotplug
-rw-r--r--  1 root root   284 Sep 24 19:57 display_class
drwxr-xr-x  2 root root    16 Oct 28 21:38 arch
lrwxrwxrwx  1 root root     9 Oct 28 21:38 arch-aliases -> arch/i386
-rw-r--r--  1 root root  1405 Oct 29 09:46 blacklist.conf
-rw-r--r--  1 root root    18 Oct 29 13:34 eth1394.conf
-rw-r--r--  1 root root    15 Oct 29 14:49 irda.conf
-rw-r--r--  1 root root    20 Oct 29 16:10 irtty_sir.conf
-rw-r--r--  1 root root    18 Oct 29 16:10 sir_dev.conf
-rw-r--r--  1 root root    19 Oct 29 16:10 nsc_ircc.conf
-rw-r--r--  1 root root  4360 Oct 29 16:21 aliases
drwxr-xr-x  3 root root  4096 Oct 29 16:24 .
-rw-r--r--  1 root root    15 Oct 29 16:24 ipv6.conf
drwxr-xr-x 47 root root 12288 Oct 29 16:25 ..
root@host:/etc/modprobe.d# cat eth1394.conf irda.conf irtty_sir.conf sir_dev.conf nsc_ircc.conf ipv6.conf
blacklist eth1394
blacklist irda
blacklist irtty_sir
blacklist sir_dev
blacklist nsc_ircc
blacklist ipv6

Addendum: Sometimes you've got to disable more modules to get the one you want: irda is such an example. In the above, irtty_sir, sir_dev and nsc_ircc all had to be disabled in order to disable irda. If you suspect something like that, run lsmod and find the modules that are using the one you want to disable.

Thanks to xingu and liable on irc #debian.

And thanks to -- ?BrendaButler for the suggestion - Should blacklisting be moved to another page? It's not part of udev.

*This procedure does not prevent another process from requesting a module addition during boot or runtime. Ex. - shorewall.


CategoryKernel