3 ms·
How come some config goes in /etc/sysctl.conf, and some goes in /boot/loader.conf? Is there a systematic way to know what config goes in a syctl-style file, an
by twic 6y ago
How come some config goes in /etc/sysctl.conf, and some goes in /boot/loader.conf?
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)?
I have never used FreeBSD, but i am excited to see that there are only four (?) config interfaces used in these instructions!
- cperciva 6y agoThe things in /boot/loader.conf are things which are needed early in the boot process -- typically for driver initialization. /etc/sysctl.conf is processed later, as part of the (userland) boot.
- 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
- cperciva 6y agoI have never used FreeBSD, but i am excited to see that there are only four (?) config interfaces used in these instructions! That sounds about right, depending on how you count "copy this sample configuration file into place". FreeBSD has the concept that /etc/rc.conf is a "master configuration file", not just for turning features on and off but also for setting command line options. More complex daemons -- e.g. devd and crond -- have their own configuration files as well, but in most cases they also have configuration directories allowing you to add configuration by creating new files rather than editing an existing one.
- nix23 6y ago>a syctl-style file, and what goes in a rc-style file? sysctl.conf controls the system example: kern.randompid=1 Booting the system (modules driver etc)loader.conf: fuse_load="YES" << mind the _load Start Services after loader and sysctl (rc.conf): hald_enable="YES" << mind the _enable