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