Where to keep your modules and how to configure them ==================================================== This text describes the strategy Debian GNU/Linux uses for locating kernel modules, and handling the configuration for modules. Copyright 1996,1999,2000 W.Akkerman 1. Configuration The Linux module utilities use one configuration file for all their configuration. This makes it hard for packages to dynamically add information about their own modules. To fix this Debian GNU/Linux now uses update-modules. update-modules attempts to fix this by generating the configuration file from separate files which are located in /etc/modutils. All files in that directory are assembled together to form /etc/conf.modules. There is also a special subdirectory (/etc/modutils/arch) which contains information for special architectures. For m68k we also support subarchitectures to differentiate atari, amiga and mac system. At runtime update-modules determines the architecture and selects which file it must use. There are two types of file you can put in /etc/modutils: normal files and executable files. Normal files contain standard modules configuration information, as described in the manpage for modprobe. Executable files are executed and their output is used as extra configuration information. 2. Different types of modules The first thing to notice is that we have to kinds of modules: - modules that are specific to one kernel version. These modules are included with the kernel source and evolve along with the kernel. - somewhat more `general' version. These modules are not updated with every new kernel. However, since the module-kernel interface or kernel internals mature over time they do need to be changed on occasion. 3. Where do we keep module-directories? In order to make use of these two module type we use two locations for storing them. The current filesystem standard (latest revision 1.2) only states that kernel loadable modules should be in /lib/modules but leaves us free otherwise. Following kernel development every Linux system uses /lib/modules/`uname -r`/ (where `uname -r` gives the current kernel revision) for normal modules. This gives /lib/modules/2.0.23, /lib/modules/2.1.3, etcetera. As said before, some modules do not have to be updated with each new kernel. They can remain the same for a while series of kernels. To support this we use one module-directory for a whole version. This gives /lib/modules/2.0, /lib/modules/2.1, etcetera. Here is a sample directory structure: /lib/modules -- Main directory for modules | +-2.0 -- modules for 2.0.xx kernels +-2.0.20 -- modules specific for kernel 2.0.20 +-2.0.23 -- modules specific for kernel 2.0.23 +-2.1 -- modules for 2.1.xx kernels +-2.1.3 -- modules specific for kernel 2.1.3 +-2.1.5 -- modules specific for kernel 2.1.5