Load the given module into the kernel
insmod command is used to load a given module into the kernel. Many functions in Linux are implemented as modules, and the kernel is loaded when needed. This can make the kernel more streamlined, thereby improving efficiency and maintaining greater flexibility. Such loadable modules are usually device drivers.
insmod(options)(parameters)
-f: Do not check whether the current kernel version is consistent with the kernel version when the module was compiled, and force the module to be loaded;
-k: Set the module to be automatically uninstalled;
-m: Output module loading information;
-o<module name>: Specify the name of the module, you can use the file name of the module file;
-p: Test whether the module can load the kernel correctly;
-s: Record all information in the system log file;
-v: Display detailed information during execution;
-x: Do not export external symbols of the module;
-X: Export all external symbols of the module, this is the default setting.
Kernel module: Specify the kernel module file to be loaded.
Load the RAID1 array level module as follows:
[root@localhost boot]# insmod /lib/modules/2.6.
18-8.el5/kernel/drivers/md/raid1.ko
[root@localhost boot]# lsmod | grep raid1
raid1 25153 0
From the above display results, we can know that the RAID1 module has been loaded successfully. Only when using the insmod command to load a module, you need to use an absolute path to load it, and dependencies cannot be automatically resolved when loading.