10.56. Kmod-24

The Kmod package contains programs for loading, inserting and removing kernel modules for Linux. Kmod replaces the Module-Init-tools package.

10.56.1. Installation of Kmod

Prepare Kmod for compilation:

./configure \
    --prefix=/usr \
    --bindir=/bin \
    --sysconfdir=/etc \
    --with-rootlibdir=/lib \
    --with-zlib \
    --with-xz

The meaning of the configure option:

--with-rootlibdir=/lib

Install location for shared libraries.

--with-zlib --with-xz

This allows the Kmod package to handle zlib and XZ compressed kernel modules.

Compile the package:

make

To test the results, issue:

make check

Install the package:

make install

Create symbolic links for programs that expect Module-Init-Tools:

ln -sfv kmod /bin/lsmod
for tool in depmod insmod modinfo modprobe rmmod; do
    ln -sfv ../bin/kmod /sbin/${tool}
done

10.56.2. Contents of Kmod

Installed programs: depmod (link to kmod), insmod (link to kmod), kmod, lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod), rmmod (link to kmod)

Short Descriptions

depmod

Creates a dependency file based on the symbols it finds in the existing set of modules; this dependency file is used by modprobe to automatically load the required modules

insmod

Installs a loadable module in the running kernel

kmod

Loads and unloads kernel modules

lsmod

Lists currently loaded modules

modinfo

Examines an object file associated with a kernel module and displays any information that it can glean

modprobe

Uses a dependency file, created by depmod, to automatically load relevant modules

rmmod

Unloads modules from the running kernel