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:
Determine the name of the kernel module:
The kernel module should be a file with a .ko
extension, located in one of the directories listed in the /etc/rc.conf
file.
For example, if the kernel module is located in the /boot/kernel
directory, its name would be /boot/kernel/module.ko
.
Load the kernel module:
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
This will load the kernel module into the kernel.
Verify that the kernel module was loaded:
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.
Unload the kernel module:
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