Listing kernel models.

Polytropon freebsd at edvax.de
Wed Mar 19 19:58:40 UTC 2014


On Mon, 17 Mar 2014 15:32:18 -0400, R. Clayton wrote:
> How do I list the modules available in the (10.0 release generic,
> in my case)
> kernel?  In linux I'd use the lsmod command.

On FreeBSD you can use the "kldstat" command.

Use "kldstat -v" for more verbosity. In the section
"kernel... Contains modules:" you can see which are
already included in the kernel. Additionally loaded
modules will be listed afterwards.

You can find the documentation in "man kldstat".



> In freebsd does "ls /boot/kernel"
> do the trick?

This command will list the modules that have been
built (usually along with the kernel) and can be loaded.



> Is it the case that /boot/kernel/*ko are included as modules?

If you want to find out which components are included
in the kernel itself, see /usr/src/sys/i386/conf/GENERIC
resp. /usr/src/sys/amd64/conf/GENERIC, which is the
configuration file from which the kernel has been built.
Examining "kldstat -v" will reflect this.



> In particular, I'm trying figure out if the instructions given in 
> 
>   www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html
> 
> to put
> 
>   if_ath_load="YES"
>   wlan_wep_load="YES"
>   wlan_ccmp_load="YES"
>   wlan_tkip_load="YES"
> 
> in /boot/loader.conf are redundant.

If you have a setting in /boot/loader.conf to load a module
which is already present in the kernel, the module will not
be loaded (for obvious reasons). You only can load modules
which are not present in the kernel. Again, consult the
GENERIC configuration file to see which of them are already
part of the kernel.

The instructions in the handbook are correct if you're
running the GENERIC kernel. If you have a custom kernel
which already contains those modules, as defined in the
appropriate configuration file, those settings are not
needed. If you still have them in /boot/loader.conf,
they won't cause problems (as explained).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list