Penguin
Annotated edit history of ModuleNotes version 3, including all changes. View license author blame.
Rev Author # Line
1 GerwinVanDeSteeg 1 !!! Some notes regarding the modules system for Linux.
2
3 !!Stopping a module from being loaded during boot
4
5 First you will need to determine how the module is being loaded.
6 * [HotPlug]
7 * [discover(8)]
8 * [modprobe(8)]
9 * Other
10
11 There are a couple of ways to blacklist a module, and depending on the method used to load it depends on where this is configured. (Based upon a Debian system).
12
13 !HotPlug
14
15 The file /etc/hotplug/blacklist, and directory /etc/hotplug/blacklist.d/ contain a list of modules which will not be loaded by the Hotplug system.
16
17 <pre>
18 localhost:~# cat /etc/hotplug/blacklist.d/ieee1394
19 ohci1394
20 eth1394
21 ieee1394
22 sbp2
23 </pre>
24
25 ![discover(8)]
26
27 There are two files for discover where you can blacklist a module, these are /etc/discover.conf and /etc/discover-autoskip.conf. The second one automatically gets included into the first and has the same internal format.
28
29 <pre>
30 localhost:~# cat /etc/discover-autoskip.conf
31 skip ohci1394
32 skip eth1394
33 skip ieee1394
34 skip sbp2
35 </pre>
36
37 ![modprobe(8)]
38
39 There are two ways to blacklist a module using [modprobe(8)] using the [modprobe.conf(5)] system, the first is to use its blacklisting system in /etc/modprobe.d/blacklist
40
41 <pre>
42 localhost:~# cat /etc/modprobe.d/blacklist
43 blacklist ieee1394
44 blacklist ohci1395
45 blacklist eth1394
46 blacklist sbp2
47 </pre>
48
49 The second, more guaranteed method (for stubborn modules) is to use the following instead. Apparently an install primitive is the most powerfull in the config file, and will be used instead of the blacklist (even though they should be the same if not the other way around).
50
51 <pre>
52 localhost:~# cat /etc/modprobe.d/ieee1394
53 install ieee1394 /bin/true
54 install ohci1394 /bin/true
55 install eth1394 /bin/true
56 install sbp2 /bin/true
57 </pre>
2 BenStaz 58
3 AristotlePagaltzis 59 !! What on earth does that kernel module do?
2 BenStaz 60
3 AristotlePagaltzis 61 Try this script. It parses the Kconfig files (displayed when using <tt>make menuconfig</tt>) in the kernel source tree.
2 BenStaz 62
63 <verbatim>
3 AristotlePagaltzis 64 #!/bin/sh
65 find -name 'Kconfig' -type f -exec awk 'BEGIN{RS="\nconfig|\nsource"} /'"$1"'/' {} \;
2 BenStaz 66 </verbatim>
67
3 AristotlePagaltzis 68 Save it as <tt>kconfig-info</tt> and invoke it from the top of the kernel source tree along the lines of "<tt>kconfig-info usbcore</tt>".
1 GerwinVanDeSteeg 69
70 ----
71 CategoryKernel

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach()