Q. How do I Load a Linux kernel module automatically at boot time so that my hardware is automatically recognized during system boot sequence?
A. Linux kernel follows modular kernel design. Loadable Kernel Modules (LKM) are object files that contain code to extend the running kernel, or so-called base kernel. LKM's are typically used to add support for new hardware, filesystems etc.
Loading a kernel module is an essential task. File /etc/modules.conf (or /etc/modules - see a note below for more info) is configuration file for loading kernel modules.
The configuration file consists of a set of lines. All empty lines, and all text on a line after a '#', will be ignored.
This file is used - if new hardware is added after installation and the hardware requires a kernel module, the system must be configured to load the proper kernel module for the new hardware.
For example, if a system included an IDE CD-ROM, the module configuration file contains the following 3 lines:
# vi /etc/modules.conf
Append following lines:
Save and close the file. Reboot the system.
NOTE: If you are using Debian Linux or Ubuntu Linux use file /etc/modules file instead of /etc/modules.conf (which works on Red Hat/Fedora core/Cent OS etc)Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?