Penguin

Some notes regarding the modules system for Linux.

Stopping a module from being loaded during boot

First you will need to determine how the module is being loaded.

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).

HotPlug

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.

localhost:# cat /etc/hotplug/blacklist.d/ieee1394
ohci1394
eth1394
ieee1394
sbp2

discover(8)?

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.

localhost:# cat /etc/discover-autoskip.conf
skip ohci1394
skip eth1394
skip ieee1394
skip sbp2

modprobe(8)

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

localhost:# cat /etc/modprobe.d/blacklist
blacklist ieee1394
blacklist ohci1395
blacklist eth1394
blacklist sbp2

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).

localhost:# cat /etc/modprobe.d/ieee1394
install ieee1394 /bin/true
install ohci1394 /bin/true
install eth1394 /bin/true
install sbp2 /bin/true

What on earth does that kernel module do?

Try this script. It parses the Kconfig files (displayed when using make menuconfig) in the kernel source tree.

#!/bin/sh
find -name 'Kconfig' -type f -exec awk 'BEGIN{RS="\nconfig|\nsource"} /'"$1"'/' {} \;

Save it as kconfig-info and invoke it from the top of the kernel source tree along the lines of "kconfig-info usbcore".


CategoryKernel