6.52. Kmod-16

The Kmod package contains libraries and utilities for loading kernel modules

Approximate build time: 0.1 SBU
Required disk space: 34 MB

6.52.1. Installation of Kmod

Prepare Kmod for compilation:

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

The meaning of the configure options:

--with-xz, --with-zlib

These options enable Kmod to handle compressed kernel modules.


This option prevents the man pages from being built, as they rely on libxslt, which isn't available in the chroot environment.


This option ensures different library related files are placed in the correct directories.

Compile the package:


To test the results, issue:

make check

Install the package, man pages, and create symlinks for compatibility with Module-Init-Tools (the package that previously handled Linux kernel modules). Also make sure that all libraries are in the correct directory:

make install
make -C man install

for target in depmod insmod modinfo modprobe rmmod; do
  ln -sv ../bin/kmod /sbin/$target

ln -sv kmod /bin/lsmod

6.52.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), and rmmod (link to kmod)
Installed libraries: libkmod.so

Short Descriptions


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


Installs a loadable module in the running kernel


Loads and unloads kernel modules


Lists currently loaded modules


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


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


Unloads modules from the running kernel


This library is used by other programs to load and unload kernel modules