|Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/View__44___load__44___or_unload_a_kernel_module.html.
View, load, or unload a kernel module
Undertand the difference between a statically compiled kernel and one that uses loadable kernel modules. Be able to view, load and unload kernel modules on each BSD system but should be aware that kernel modules are discouraged on NetBSD and OpenBSD systems.
TODO: Are they really discouraged? Where documented?
Kernel modules provide extra functionality that a system administrator can add to their running kernel. Common examples include audio device drivers, network interfaces, RAID and other hardware drivers, extra filesystems support, packet filtering, binary compatibility support for other operating systems (like Linux), and console screen savers. In most cases, this extra functionality or hardware support can be configured and then built in to your monolithic kernel. But using kernel modules may be more convenient.
On FreeBSD and DragonFly, the kernel module filenames have an
On FreeBSD, the default kernel modules are located at
TODO: list a few common modules TODO: show how to find modules
FreeBSD and DragonFly use
The following is an example of runninng
The "refs" column shows the number of modules referenced by the kernel object. TODO: The "address" column shows the load address of (the pointer to) the kernel object. The "size" is the size in hexadecimal.
In the above examples, "ecc" is for AMD64 ECC memory controller, "acpi" is for ACPI power management, and "null" provides the mount_null filesystem support.
TODO: explain why the kernel listed
TODO: should this mention -v? maybe not for BSDA?
kldstat(8), kldload(8), kldunload(8), and loader.conf(5); modstat(8), modload(8), modunload(8), and lkm.conf(5)