]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/kldconfig/kldconfig.8
kern: cpuset: allow jails to modify child jails' roots
[FreeBSD/FreeBSD.git] / sbin / kldconfig / kldconfig.8
1 .\"
2 .\" Copyright (c) 2001 Peter Pentchev
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd September 29, 2020
29 .Dt KLDCONFIG 8
30 .Os
31 .Sh NAME
32 .Nm kldconfig
33 .Nd display or modify the kernel module search path
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl dfimnUv
37 .Op Fl S Ar sysctlname
38 .Op Ar path ...
39 .Nm
40 .Fl r
41 .Sh DESCRIPTION
42 The
43 .Nm
44 utility
45 displays or modifies the search path used by the kernel when loading modules
46 using the
47 .Xr kldload 8
48 utility or the
49 .Xr kldload 2
50 syscall.
51 .Pp
52 The following options are available:
53 .Bl -tag -width indent
54 .It Fl d
55 Remove the specified paths from the module search path.
56 .It Fl f
57 Do not fail if a path specified for adding is already present in the search
58 path, or if a path specified for removing is not present in the search path.
59 This may be useful in startup/shutdown scripts for adding a path to
60 a file system which is still not mounted, or in shutdown scripts for
61 unconditionally removing a path that may have been added during startup.
62 .It Fl i
63 Add the specified paths to the beginning of the search path, not to the end.
64 This option can only be used when adding paths.
65 .It Fl m
66 Instead of replacing the module search path with the set of paths
67 specified,
68 .Dq merge
69 in the new entries.
70 .It Fl n
71 Do not actually change the module search path.
72 .It Fl r
73 Display the current search path.
74 This option cannot be used if any paths are also specified.
75 .It Fl S Ar sysctlname
76 Specify the sysctl name to use instead of the default
77 .Va kern.module_path .
78 .It Fl U
79 .Dq Unique-ify
80 the current search path - if any of the directories is repeated one
81 or more times, only the first occurrence remains.
82 This option implies
83 .Fl m .
84 .It Fl v
85 Verbose output: display the new module search path.
86 If the path has been changed, and the
87 .Fl v
88 flag is specified more than once, the old path is displayed as well.
89 .El
90 .Sh FILES
91 .Bl -tag -width indent
92 .It Pa /boot/kernel , /boot/modules , /modules
93 The default module search path used by the kernel.
94 .El
95 .Sh EXIT STATUS
96 .Ex -std
97 .Sh EXAMPLES
98 Show the module search path
99 .Bd -literal -offset indent
100 $ kldconfig -r
101 /boot/kernel;/boot/modules;/boot/dtb;/boot/dtb/overlays
102 .Ed
103 .Pp
104 Try to delete the
105 .Pa /boot
106 directory from the search path.
107 The command will fail:
108 .Bd -literal -offset indent
109 $ kldconfig -d /boot
110 kldconfig: not in module search path: /boot
111 $ echo $?
112 1
113 .Ed
114 .Pp
115 Same as above but forcing the operation.
116 This time the command will succeed:
117 .Bd -literal -offset indent
118 $ kldconfig -d -f /boot
119 $ echo $?
120 0
121 .Ed
122 .Pp
123 Add the
124 .Pa /boot
125 directory to the beginning of the search path and display extra verbose output:
126 .Bd -literal -offset indent
127 $ kldconfig -i -m -vv /boot
128 /boot/kernel;/boot/modules -> /boot;/boot/kernel;/boot/modules
129 .Ed
130 .Pp
131 Without
132 .Fl m
133 the
134 .Fl i
135 flag will overwrite the contents of the search path list:
136 .Bd -literal -offset indent
137 $ kldconfig -i -vv /boot
138 /boot;/boot/kernel;/boot/modules;/boot/dtb;/boot/dtb/overlays -> /boot
139 .Ed
140 .Pp
141 Same as above but using
142 .Fl n
143 to simulate the operation without actually doing it:
144 .Bd -literal -offset indent
145 $ kldconfig -i -n -vv /boot
146 /boot;/boot/kernel;/boot/modules;/boot/dtb;/boot/dtb/overlays -> /boot
147 .Ed
148 .Pp
149 Add directories to the search path removing duplicates.
150 Note the need of
151 .Fl f
152 to force the operation in case any of the directories is already in the
153 search path.
154 The
155 .Pa /boot/kernel
156 directory will be added once:
157 .Bd -literal -offset indent
158 $ kldconfig -f -U /boot/kernel /boot/kernel /boot/modules /boot/dtb /boot/dtb/overlays
159 .Ed
160 .Sh SEE ALSO
161 .Xr kldload 2 ,
162 .Xr kldload 8 ,
163 .Xr kldxref 8 ,
164 .Xr sysctl 8
165 .Sh HISTORY
166 The
167 .Nm
168 utility first appeared in
169 .Fx 4.4 .
170 .Sh AUTHORS
171 .An Peter Pentchev Aq Mt roam@FreeBSD.org