Book: LPI Linux Certification in a NutshellSection: Chapter 24. Exam 102 Highlighter's Index 24.3 Kernel 24.3.1 Objective 1: Manage Kernel Modules at Runtime -
The Linux kernel is modular, and device driver software is inserted into the running kernel as needed. -
Module files are objects, stored under /lib/modules. -
Kernel modules can be managed using: - lsmod
-
List modules. - insmod
-
Insert a module into the kernel. - rmmod
-
Remove a module from the kernel. - modinfo
-
Get information about a module. - modprobe
-
Insert modules along with their prerequisites. 24.3.2 Objective 2: Reconfigure, Build, and Install a Custom Kernel and Modules -
To build a kernel, you need the compiler, assembler, linker, make, kernel source, and kernel headers. -
These are typical kernel compilation steps, done in /usr/src/linux: -
Make a configuration using make oldconfig (existing setup), make config (basic interactive text program), make menuconfig (interactive text menu program), or make xconfig (graphical program). Each method creates the .config file containing kernel options. -
Modify EXTRAVERSION in Makefile, if desired. -
Build dependencies using make dep. -
Clean old results with make clean. -
Create the kernel with make bzImage. -
Create modules with make modules. -
Install the modules with make modules_install. -
Copy the new image to /boot. -
Update /etc/lilo.conf for the new image. -
Update the boot loader by running the lilo command. | | |