2 ms·
> How come some config goes in /etc/sysctl.conf, and some goes in /boot/loader.conf? As cperciva notes, sysctl.conf is read by userland during rc(8) "multiuser
by loeg 6y ago
> How come some config goes in /etc/sysctl.conf, and some goes in /boot/loader.conf?
As cperciva notes, sysctl.conf is read by userland during rc(8) "multiuser" boot. loader.conf is used by the bootloader to set tunables (knobs that can only be changed at boot time), load kernel modules early, and configure other bootloader settings.
Some sysctls are also tunables; for backwards compatibility or in case it is useful for the value to be set during boot before userspace runs.
> Is there a systematic way to know what config goes in a syctl-style file, and what goes in a rc-style file (via sysrc)?
Sure:
loader.conf: https://www.freebsd.org/cgi/man.cgi?query=loader.conf https://www.freebsd.org/cgi/man.cgi?query=loader.conf
rc.conf: https://www.freebsd.org/cgi/man.cgi?query=rc.conf https://www.freebsd.org/cgi/man.cgi?query=rc.conf
sysctl.conf: https://www.freebsd.org/cgi/man.cgi?query=sysctl.conf https://www.freebsd.org/cgi/man.cgi?query=sysctl.conf