Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 237 #263
i
i
i
i
i
i
i
i
9
The Linux Kernel
required for booting the system should be built as modules. This makes
sure the kernel does not become too big to be loaded by the BIOS or a boot
loader. Drivers for ext2, the SCSI drivers on a SCSI-based system, and
similar drivers should be compiled into the kernel. In contrast, items, such
as isofs, msdos, or sound, which are not needed for starting your com-
puter system, should definitely be built as modules.
Kernel modules are located in /lib/modules/<version>/. Version
stands for the current kernel version.
9.4.1 Hardware Detection with the Help of hwinfo
hwinfo can detect the hardware of your system and select the drivers
needed to run this hardware. Get a small introduction to this command
with hwinfo --help. If you, for example, need information about your
SCSI devices, use the command hwinfo --scsi. All this information is
also available in YaST in the hardware information module.
9.4.2 Handling Modules
The following commands are available:
insmod insmod loads the requested module after searching for it in a
subdirectory of /lib/modules/<version>/. It is better, however,
to use modprobe rather than insmod.
rmmod Unloads the requested module. This is only possible if this mod-
ule is no longer needed. For example, the isofs module cannot be
unloaded while a CD is still mounted.
depmod Creates the file modules.dep in /lib/modules/<version>
/ that defines the dependencies of all the modules. This is necessary
to ensure that all dependent modules are loaded with the selected
ones. This file will be built after the system is started if it does not ex-
ist.
modprobe Loads or unloads a given module while taking into account
dependencies of this module. This command is extremely power-
ful and can be used for a lot of things (e.g., probing all modules of a
given type until one is successfully loaded). In contrast to insmod,
modprobe checks /etc/modprobe.conf and therefore is the pre-
ferred method of loading modules. For detailed information about
this topic, refer to the corresponding man page.
237
SUSE LINUX Enterprise Server