Friday, May 25, 2012

FreeBSD: Load Kernel Module at Runtime

Q. How do I load a kernel module at runtime from a shell prompt under FreeBSD UNIX operating systems?

A. You need to use the kldload utility loads file.ko into the kernel using the kernel linker. /boot/kernel directory containing loadable modules. Modules must have an extension of .ko. The kldload utility exits 0 on success, and >0 if an error occurs.

Load module called foo

Type the command as follows:
# kldload foo
To list loaded module use kldstat:
# kldstat
Some modules such as pf, ipfw, ipf, etc. may be automatically loaded at boot time when the corresponding rc.conf statement is used.

No comments:

Post a Comment