FreeBSD 9.1: HowTo Load a Kernel Module

https://w‮tual.ww‬turi.com
FreeBSD 9.1: HowTo Load a Kernel Module

To load a kernel module on a FreeBSD 9.1 system, you can use the kldload command.

Here's an example of how to use kldload to load a kernel module:

  1. Determine the name of the kernel module:

  2. The kernel module should be a file with a .ko extension, located in one of the directories listed in the /etc/rc.conf file.

  3. For example, if the kernel module is located in the /boot/kernel directory, its name would be /boot/kernel/module.ko.

  4. Load the kernel module:

  5. To load the kernel module, run the kldload command with the name of the kernel module as the argument. For example:

kldload /boot/kernel/module.ko
  1. This will load the kernel module into the kernel.

  2. Verify that the kernel module was loaded:

  3. To verify that the kernel module was successfully loaded, you can run the kldstat command. This will list all the currently loaded kernel modules, along with their names and locations.

  4. Unload the kernel module:

  5. To unload the kernel module, run the kldunload command with the name of the kernel module as the argument. For example:

kldunload /boot/kernel/module.ko
  1. This will unload the kernel module from the kernel.
Created Time:2017-10-28 20:40:33  Author:lautturi