loader.conf examples

Robert Watson rwatson at freebsd.org
Sun Jan 23 09:41:34 PST 2005


On Sun, 23 Jan 2005, Jason C. Wells wrote:

> --On Sunday, January 23, 2005 7:22 AM -0500 Matt Herzog <msh at blisses.org> 
> wrote:
> 
> > I'm confused about how and why modules are built and (seemingly
> > loaded without my having specified any to load) when I have not
> > told my kernel conf file to build anything as a module. As a former
> > NetBSD user, I had expected a monolitic kernel . . .
> 
> You can still run a monolithic kernel as I do.  You can also use
> NO_MODULES as a make option to prevent the build and installation of
> modules.  See also MODULES_OVERRIDE is /sys/conf/NOTES. 
> 
> If you never specified a module to load, then no modules should be
> loaded. (Ref kldstat)  Maybe the default behavior has changed.  I
> wouldn't know though since I don't use the default behavior. 

Modules will sometimes be auto-loaded on demand -- typically this occurs
in the following sorts of situations:

- Modules will be auto-loaded of another module that depends on the module
  is loaded.
- acpi.ko will be auto-loaded during the boot process if ACPI is enabled.
- The kernel will auto-load modules necessary to mount a requested file
  system if the necessary modules are not already present.
- If certain features are enabled in rc.conf, the modules will be loaded
  to support them if not already present in the kernel, including modules
  for various ABI compatibility layers (linux, etc), firewalls,
  ATM-related network pieces, NFS, and some MAC modules.
- The ppp(8) command will auto-load modules to support PPPoE if required.

The user process requested loading of modules is blocked if the
securelevel is > 0.  Likewise for the auto-loading of modules relating to
file system mounts.  The loader will still load modules during the early
boot process before the securelevel is available for inspection, however.

Robert N M Watson




More information about the freebsd-stable mailing list