Understanding Kernel Modules

To be able to work with a device, you need a driver for the device. On Linux, device drivers are implemented as part of the kernel. On all modern Linux systems, kernels are modular. This means the core of the operating system is in the kernel file itself, but lots of drivers that aren't needed by default are loaded as modules. The benefit of this modularity is increased efficiency. If a driver is needed, its module is loaded, and if it isn't needed, it isn't loaded. It's as simple as that.

For you as an administrator, module management is an important task. On SUSE Linux Enterprise Server, modules are installed in the directory /lib/modules/suname -r\As you can see, command substitution is used in this directory name: the command uname -r gives the correct version of the current kernel, so by using this command in the directory path, you can be sure always to refer to the right path where kernel modules can be found; for example, /lib/modules/ Under this directory, you can find a directory structure where all modules are stored in an organized way, according to the type of module. You can recognize the kernel modules in this directory structure by their filenames because all kernel modules have the extension .ko.

You as an administrator should be aware of how modules are loaded. On a default installation, you don't really have to think about it. On installation, all your hardware is detected automatically, and the required modules are added to the start-up procedure of your computer automatically. So ordinarily you don't need to do anything. However, sometimes you'll need to tune the load process of modules.

In the following sections, you will learn about the most current methods to load kernel modules:

• While booting

• Automatically

Was this article helpful?

0 0

Post a comment