xref: /freebsd/usr.sbin/sysconf/sysconf-loader.8 (revision b4a465e566a1850e232b454efe99e05c1ea93f67)
1.\" Copyright (c) 2013-2026 Devin Teske <dteske@FreeBSD.org>
2.\" Copyright (c) 2021-2026 Faraz Vahedi <kfv@FreeBSD.org>
3.\"
4.\" SPDX-License-Identifier: BSD-2-Clause
5.\"
6.Dd August 2, 2026
7.Dt SYSCONF-LOADER 8
8.Os
9.Sh NAME
10.Nm "sysconf loader"
11.Nd configure boot loader directives
12.Sh SYNOPSIS
13.Nm sysconf
14.Cm loader
15.Op Fl AcDeFinNqvVx
16.Op Fl j Ar jail | Fl R Ar dir
17.Op Fl f Ar file
18.Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value
19.Ar ...
20.Nm sysconf
21.Cm loader
22.Op Fl ADeFnNqvV
23.Op Fl f Ar file
24.Fl a
25.Nm sysconf
26.Cm loader
27.Op Fl AaDinNq
28.Fl d
29.Op Ar name ...
30.Nm sysconf
31.Cm loader
32.Op Fl E
33.Fl l | L
34.Sh DESCRIPTION
35The
36.Cm loader
37target of
38.Xr sysconf 8
39reads and modifies
40.Xr loader.conf 5
41configuration.
42Shared assignment syntax and options are documented in
43.Xr sysconf 8 ;
44multi-file write policy in
45.Xr sysconf-targets 8 .
46.Pp
47The file list is not hardcoded:
48just as the boot loader itself hardcodes only
49.Pa /boot/defaults/loader.conf ,
50.Nm sysconf
51names that defaults file and the
52.Va loader_conf_files ,
53.Va loader_conf_dirs ,
54and
55.Va local_loader_conf_files
56directives so that discovery matches the loader
57.Pq see Xr bsdconf_format 3 and Xr loader.conf 5 .
58On a stock system this resolves to
59.Pa /boot/device.hints ,
60.Pa /boot/loader.conf ,
61.Pa /boot/loader.conf.d/*.conf ,
62and
63.Pa /boot/loader.conf.local ,
64in that order;
65when the defaults file is missing,
66that stock list is assumed.
67.Pp
68Values written for this target are always enclosed in quotes
69.Pq quoted or unquoted input is accepted
70with no whitespace around the equals sign,
71as demanded by the boot loader's reader.
72.Pp
73The defaults file
74.Pa /boot/defaults/loader.conf
75.Pq or Ev LOADER_DEFAULTS
76additionally supports
77.Fl d ,
78.Fl D ,
79and
80.Fl A
81.Pq see Xr sysconf-targets 8 .
82Space-separated list directives such as
83.Va kernels
84use
85.Ar name Ns += Ns Ar word
86and
87.Ar name Ns -= Ns Ar word
88as described in
89.Xr sysconf 8 .
90.Sh ENVIRONMENT
91.Bl -tag -width "LOADER_DEFAULTS"
92.It Ev LOADER_DEFAULTS
93Defaults file consulted in place of
94.Pa /boot/defaults/loader.conf
95for file-list discovery and for
96.Fl d ,
97.Fl D ,
98and
99.Fl A
100.Po
101in the vein of
102.Ev RC_DEFAULTS
103in
104.Xr sysrc 8
105.Pc .
106The value is used verbatim
107.Pq not subject to Fl R .
108.El
109.Sh FILES
110.Bl -tag -width "/boot/defaults/loader.conf" -compact
111.It Pa /boot/defaults/loader.conf
112Defaults and the authority on the file list.
113.It Pa /boot/device.hints
114First in the stock
115.Va loader_conf_files
116list.
117.It Pa /boot/loader.conf
118Stock write target.
119.It Pa /boot/loader.conf.d/
120Drop-in directory.
121.It Pa /boot/loader.conf.local
122Site-local overrides,
123sourced last.
124.El
125.Sh EXAMPLES
126.Dl sysconf loader zfs_load
127.Dl sysconf loader zfs_load=\(dqYES\(dq
128.Dl sysconf loader -l
129.Dl sysconf loader -d verbose_loading
130.Dl sysconf loader -Ad
131.Dl sysconf loader -D verbose_loading
132.Dl sysconf loader -aD
133.Dl sysconf loader -A
134.Dl sysconf loader kernels+=kernel_test
135.Dl sysconf loader kernels-=kernel_test
136.Dl sysconf -a loader
137.Dl sysconf loader -f /tmp/loader.conf.new zfs_load=\(dqYES\(dq
138.Sh SEE ALSO
139.Xr bsdconf_format 3 ,
140.Xr loader.conf 5 ,
141.Xr sysconf 8 ,
142.Xr sysconf-targets 8
143.Sh HISTORY
144The
145.Nm sysconf
146utility first appeared in
147.Fx 16.0 .
148.Sh AUTHORS
149.An Devin Teske Aq Mt dteske@FreeBSD.org
150.An Faraz Vahedi Aq Mt kfv@FreeBSD.org
151