| @@ -1,390 +1,389 @@ | | | @@ -1,390 +1,389 @@ |
1 | .\" $NetBSD: init.8,v 1.61 2019/09/01 18:51:27 sevan Exp $ | | 1 | .\" $NetBSD: init.8,v 1.62 2019/09/01 19:13:18 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1980, 1991, 1993 | | 3 | .\" Copyright (c) 1980, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to Berkeley by | | 6 | .\" This code is derived from software contributed to Berkeley by |
7 | .\" Donn Seeley at Berkeley Software Design, Inc. | | 7 | .\" Donn Seeley at Berkeley Software Design, Inc. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
15 | .\" notice, this list of conditions and the following disclaimer in the | | 15 | .\" notice, this list of conditions and the following disclaimer in the |
16 | .\" documentation and/or other materials provided with the distribution. | | 16 | .\" documentation and/or other materials provided with the distribution. |
17 | .\" 3. Neither the name of the University nor the names of its contributors | | 17 | .\" 3. Neither the name of the University nor the names of its contributors |
18 | .\" may be used to endorse or promote products derived from this software | | 18 | .\" may be used to endorse or promote products derived from this software |
19 | .\" without specific prior written permission. | | 19 | .\" without specific prior written permission. |
20 | .\" | | 20 | .\" |
21 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | | 21 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
31 | .\" SUCH DAMAGE. | | 31 | .\" SUCH DAMAGE. |
32 | .\" | | 32 | .\" |
33 | .\" @(#)init.8 8.6 (Berkeley) 5/26/95 | | 33 | .\" @(#)init.8 8.6 (Berkeley) 5/26/95 |
34 | .\" | | 34 | .\" |
35 | .Dd September 1, 2019 | | 35 | .Dd September 1, 2019 |
36 | .Dt INIT 8 | | 36 | .Dt INIT 8 |
37 | .Os | | 37 | .Os |
38 | .Sh NAME | | 38 | .Sh NAME |
39 | .Nm init | | 39 | .Nm init |
40 | .Nd process control initialization | | 40 | .Nd process control initialization |
41 | .Sh SYNOPSIS | | 41 | .Sh SYNOPSIS |
42 | .Nm | | 42 | .Nm |
43 | .Op Fl s | | 43 | .Op Fl s |
44 | .Sh DESCRIPTION | | 44 | .Sh DESCRIPTION |
45 | The | | 45 | The |
46 | .Nm | | 46 | .Nm |
47 | program is the last stage of the boot process. | | 47 | program is the last stage of the boot process. |
48 | It normally begins multi-user operation. | | 48 | It normally begins multi-user operation. |
49 | .Pp | | 49 | .Pp |
50 | .Nm | | 50 | .Nm |
51 | is executed automatically by the kernel, | | 51 | is executed automatically by the kernel, |
52 | after the kernel has initialised all devices | | 52 | after the kernel has initialised all devices |
53 | and mounted the root file system. | | 53 | and mounted the root file system. |
54 | The kernel may try multiple possible paths for | | 54 | The kernel may try multiple possible paths for |
55 | .Nm , | | 55 | .Nm , |
56 | including | | 56 | including |
57 | .Pa /sbin/init , | | 57 | .Pa /sbin/init , |
58 | .Pa /sbin/oinit , | | 58 | .Pa /sbin/oinit , |
59 | .Pa /sbin/init.bak , | | 59 | .Pa /sbin/init.bak , |
60 | and | | 60 | and |
61 | .Pa /rescue/init . | | 61 | .Pa /rescue/init . |
62 | .Pp | | 62 | .Pp |
63 | The following table describes the state machine used by | | 63 | The following table describes the state machine used by |
64 | .Nm : | | 64 | .Nm : |
65 | .Bl -enum | | 65 | .Bl -enum |
66 | .It | | 66 | .It |
67 | Single user shell. | | 67 | Single user shell. |
68 | If the kernel is booted in single user mode (see | | 68 | If the kernel is booted in single user mode (see |
69 | .Xr boothowto 9 ) , | | 69 | .Xr boothowto 9 ) , |
70 | then the kernel will pass the | | 70 | then the kernel will pass the |
71 | .Fl s | | 71 | .Fl s |
72 | option to | | 72 | option to |
73 | .Nm | | 73 | .Nm |
74 | to prevent the system from going multi-user and | | 74 | to prevent the system from going multi-user and |
75 | to instead execute a single user shell without starting the normal | | 75 | to instead execute a single user shell without starting the normal |
76 | daemons. | | 76 | daemons. |
77 | If the kernel is in a secure mode, | | 77 | If the kernel is in a secure mode, |
78 | .Nm | | 78 | .Nm |
79 | will downgrade it to securelevel 0 (insecure mode). | | 79 | will downgrade it to securelevel 0 (insecure mode). |
80 | The system is then quiescent for maintenance work and may | | 80 | The system is then quiescent for maintenance work and may |
81 | later be made to go to state 2 (multi-user) by exiting the single-user | | 81 | later be made to go to state 2 (multi-user) by exiting the single-user |
82 | shell (with ^D). | | 82 | shell (with ^D). |
83 | .It | | 83 | .It |
84 | Multi-user boot (default operation). | | 84 | Multi-user boot (default operation). |
85 | Executes | | 85 | Executes |
86 | .Pa /etc/rc | | 86 | .Pa /etc/rc |
87 | (see | | 87 | (see |
88 | .Xr rc 8 ) . | | 88 | .Xr rc 8 ) . |
89 | If this was the first state entered (as opposed to entering here after | | 89 | If this was the first state entered (as opposed to entering here after |
90 | state 1), then | | 90 | state 1), then |
91 | .Pa /etc/rc | | 91 | .Pa /etc/rc |
92 | will be invoked with its first argument being | | 92 | will be invoked with its first argument being |
93 | .Sq autoboot . | | 93 | .Sq autoboot . |
94 | If | | 94 | If |
95 | .Pa /etc/rc | | 95 | .Pa /etc/rc |
96 | exits with a non-zero (error) exit code, commence single user | | 96 | exits with a non-zero (error) exit code, commence single user |
97 | operation by giving the super-user a shell on the console by going | | 97 | operation by giving the super-user a shell on the console by going |
98 | to state 1 (single user). | | 98 | to state 1 (single user). |
99 | Otherwise, proceed to state 3. | | 99 | Otherwise, proceed to state 3. |
100 | .Pp | | 100 | .Pp |
101 | If value of the | | 101 | If value of the |
102 | .Dq init.root | | 102 | .Dq init.root |
103 | sysctl node is not equal to | | 103 | sysctl node is not equal to |
104 | .Pa / | | 104 | .Pa / |
105 | at this point, the | | 105 | at this point, the |
106 | .Pa /etc/rc | | 106 | .Pa /etc/rc |
107 | process will be run inside a | | 107 | process will be run inside a |
108 | .Xr chroot 2 | | 108 | .Xr chroot 2 |
109 | indicated by sysctl with the same error handling as above. | | 109 | indicated by sysctl with the same error handling as above. |
110 | .Pp | | 110 | .Pp |
111 | If the administrator has not set the security level to \-1 | | 111 | If the administrator has not set the security level to \-1 |
112 | to indicate that the kernel should not run multiuser in secure | | 112 | to indicate that the kernel should not run multiuser in secure |
113 | mode, and the | | 113 | mode, and the |
114 | .Pa /etc/rc | | 114 | .Pa /etc/rc |
115 | script has not set a higher level of security | | 115 | script has not set a higher level of security |
116 | than level 1, then | | 116 | than level 1, then |
117 | .Nm | | 117 | .Nm |
118 | will put the kernel into securelevel mode 1. | | 118 | will put the kernel into securelevel mode 1. |
119 | See | | 119 | See |
120 | .Xr rc.conf 5 | | 120 | .Xr rc.conf 5 |
121 | and | | 121 | and |
122 | .Xr secmodel_securelevel 9 | | 122 | .Xr secmodel_securelevel 9 |
123 | for more information. | | 123 | for more information. |
124 | .It | | 124 | .It |
125 | Set up ttys as specified in | | 125 | Set up ttys as specified in |
126 | .Xr ttys 5 . | | 126 | .Xr ttys 5 . |
127 | See below for more information. | | 127 | See below for more information. |
128 | On completion, continue to state 4. | | 128 | On completion, continue to state 4. |
129 | If we did chroot in state 2, each | | 129 | If we did chroot in state 2, each |
130 | .Xr getty 8 | | 130 | .Xr getty 8 |
131 | process will be run in the same | | 131 | process will be run in the same |
132 | .Xr chroot 2 | | 132 | .Xr chroot 2 |
133 | path as in 2 (that is, the value of | | 133 | path as in 2 (that is, the value of |
134 | .Dq init.root | | 134 | .Dq init.root |
135 | sysctl is not re-read). | | 135 | sysctl is not re-read). |
136 | .It | | 136 | .It |
137 | Multi-user operation. | | 137 | Multi-user operation. |
138 | Depending upon the signal received, change state appropriately; | | 138 | Depending upon the signal received, change state appropriately; |
139 | on | | 139 | on |
140 | .Dv SIGTERM , | | 140 | .Dv SIGTERM , |
141 | go to state 7; | | 141 | go to state 7; |
142 | on | | 142 | on |
143 | .Dv SIGHUP , | | 143 | .Dv SIGHUP , |
144 | go to state 5; | | 144 | go to state 5; |
145 | on | | 145 | on |
146 | .Dv SIGTSTP , | | 146 | .Dv SIGTSTP , |
147 | go to state 6. | | 147 | go to state 6. |
148 | .It | | 148 | .It |
149 | Clean-up mode; re-read | | 149 | Clean-up mode; re-read |
150 | .Xr ttys 5 , | | 150 | .Xr ttys 5 , |
151 | killing off the controlling processes on lines that are now | | 151 | killing off the controlling processes on lines that are now |
152 | .Sq off , | | 152 | .Sq off , |
153 | and starting processes that are newly | | 153 | and starting processes that are newly |
154 | .Sq on . | | 154 | .Sq on . |
155 | On completion, go to state 4. | | 155 | On completion, go to state 4. |
156 | .It | | 156 | .It |
157 | .Sq Boring | | 157 | .Sq Boring |
158 | mode; no new sessions. | | 158 | mode; no new sessions. |
159 | Signals as per state 4. | | 159 | Signals as per state 4. |
160 | .It | | 160 | .It |
161 | Shutdown mode. | | 161 | Shutdown mode. |
162 | Send | | 162 | Send |
163 | .Dv SIGHUP | | 163 | .Dv SIGHUP |
164 | to all controlling processes, reap the processes for 30 seconds, | | 164 | to all controlling processes, reap the processes for 30 seconds, |
165 | and then go to state 1 (single user); warning if not all the processes died. | | 165 | and then go to state 1 (single user); warning if not all the processes died. |
166 | .El | | 166 | .El |
167 | .Pp | | 167 | .Pp |
168 | If the | | 168 | If the |
169 | .Sq console | | 169 | .Sq console |
170 | entry in the | | 170 | entry in the |
171 | .Xr ttys 5 | | 171 | .Xr ttys 5 |
172 | file is marked | | 172 | file is marked |
173 | .Dq insecure , | | 173 | .Dq insecure , |
174 | then | | 174 | then |
175 | .Nm | | 175 | .Nm |
176 | will require that the superuser password be | | 176 | will require that the superuser password be |
177 | entered before the system will start a single-user shell. | | 177 | entered before the system will start a single-user shell. |
178 | The password check is skipped if the | | 178 | The password check is skipped if the |
179 | .Sq console | | 179 | .Sq console |
180 | is marked as | | 180 | is marked as |
181 | .Dq secure . | | 181 | .Dq secure . |
182 | .Pp | | 182 | .Pp |
183 | It should be noted that while | | 183 | It should be noted that while |
184 | .Nm | | 184 | .Nm |
185 | has the ability to start multi-user operation inside a | | 185 | has the ability to start multi-user operation inside a |
186 | .Xr chroot 2 | | 186 | .Xr chroot 2 |
187 | environment, the | | 187 | environment, the |
188 | .Nm | | 188 | .Nm |
189 | process itself will always run in the | | 189 | process itself will always run in the |
190 | .Dq original root directory . | | 190 | .Dq original root directory . |
191 | This also implies that single-user mode is always started in the original | | 191 | This also implies that single-user mode is always started in the original |
192 | root, giving the possibility to create multi-user sessions in different | | 192 | root, giving the possibility to create multi-user sessions in different |
193 | root directories over time. | | 193 | root directories over time. |
194 | The | | 194 | The |
195 | .Dq init.root | | 195 | .Dq init.root |
196 | sysctl node is fabricated by | | 196 | sysctl node is fabricated by |
197 | .Nm | | 197 | .Nm |
198 | at startup and re-created any time it is found to be missing. | | 198 | at startup and re-created any time it is found to be missing. |
199 | Type of the node is string capable of holding full pathname, and | | 199 | Type of the node is string capable of holding full pathname, and |
200 | is only accessible by the superuser (unless explicitly destroyed | | 200 | is only accessible by the superuser (unless explicitly destroyed |
201 | and re-created with different specification). | | 201 | and re-created with different specification). |
202 | .Pp | | 202 | .Pp |
203 | In multi-user operation, | | 203 | In multi-user operation, |
204 | .Nm | | 204 | .Nm |
205 | maintains | | 205 | maintains |
206 | processes for the terminal ports found in the file | | 206 | processes for the terminal ports found in the file |
207 | .Xr ttys 5 . | | 207 | .Xr ttys 5 . |
208 | .Nm | | 208 | .Nm |
209 | reads this file, and executes the command found in the second field. | | 209 | reads this file, and executes the command found in the second field. |
210 | This command is usually | | 210 | This command is usually |
211 | .Xr getty 8 ; | | 211 | .Xr getty 8 ; |
212 | it opens and initializes the tty line and executes the | | 212 | it opens and initializes the tty line and executes the |
213 | .Xr login 1 | | 213 | .Xr login 1 |
214 | program. | | 214 | program. |
215 | The | | 215 | The |
216 | .Xr login 1 | | 216 | .Xr login 1 |
217 | program, when a valid user logs in, executes a shell for that user. | | 217 | program, when a valid user logs in, executes a shell for that user. |
218 | When this shell dies, either because the user logged out or an | | 218 | When this shell dies, either because the user logged out or an |
219 | abnormal termination occurred (a signal), the | | 219 | abnormal termination occurred (a signal), the |
220 | .Nm | | 220 | .Nm |
221 | program wakes up, deletes the user from the | | 221 | program wakes up, deletes the user from the |
222 | .Xr utmp 5 | | 222 | .Xr utmp 5 |
223 | and | | 223 | and |
224 | .Xr utmpx 5 | | 224 | .Xr utmpx 5 |
225 | files of current users and records the logout in the | | 225 | files of current users and records the logout in the |
226 | .Xr wtmp 5 | | 226 | .Xr wtmp 5 |
227 | and | | 227 | and |
228 | .Xr wtmpx 5 | | 228 | .Xr wtmpx 5 |
229 | files. | | 229 | files. |
230 | The cycle is | | 230 | The cycle is |
231 | then restarted by | | 231 | then restarted by |
232 | .Nm | | 232 | .Nm |
233 | executing a new | | 233 | executing a new |
234 | .Xr getty 8 | | 234 | .Xr getty 8 |
235 | for the line. | | 235 | for the line. |
236 | .Pp | | 236 | .Pp |
237 | Line status (on, off, secure, getty, or window information) | | 237 | Line status (on, off, secure, getty, or window information) |
238 | may be changed in the | | 238 | may be changed in the |
239 | .Xr ttys 5 | | 239 | .Xr ttys 5 |
240 | file without a reboot by sending the signal | | 240 | file without a reboot by sending the signal |
241 | .Dv SIGHUP | | 241 | .Dv SIGHUP |
242 | to | | 242 | to |
243 | .Nm | | 243 | .Nm |
244 | with the command | | 244 | with the command |
245 | .Dq Li "kill \-s HUP 1" . | | 245 | .Dq Li "kill \-s HUP 1" . |
246 | This is referenced in the table above as state 5. | | 246 | This is referenced in the table above as state 5. |
247 | On receipt of this signal, | | 247 | On receipt of this signal, |
248 | .Nm | | 248 | .Nm |
249 | re-reads the | | 249 | re-reads the |
250 | .Xr ttys 5 | | 250 | .Xr ttys 5 |
251 | file. | | 251 | file. |
252 | When a line is turned off in | | 252 | When a line is turned off in |
253 | .Xr ttys 5 , | | 253 | .Xr ttys 5 , |
254 | .Nm | | 254 | .Nm |
255 | will send a | | 255 | will send a |
256 | .Dv SIGHUP | | 256 | .Dv SIGHUP |
257 | signal to the controlling process | | 257 | signal to the controlling process |
258 | for the session associated with the line. | | 258 | for the session associated with the line. |
259 | For any lines that were previously turned off in the | | 259 | For any lines that were previously turned off in the |
260 | .Xr ttys 5 | | 260 | .Xr ttys 5 |
261 | file and are now on, | | 261 | file and are now on, |
262 | .Nm | | 262 | .Nm |
263 | executes a new | | 263 | executes a new |
264 | .Xr getty 8 | | 264 | .Xr getty 8 |
265 | to enable a new login. | | 265 | to enable a new login. |
266 | If the getty or window field for a line is changed, | | 266 | If the getty or window field for a line is changed, |
267 | the change takes effect at the end of the current | | 267 | the change takes effect at the end of the current |
268 | login session (e.g., the next time | | 268 | login session (e.g., the next time |
269 | .Nm | | 269 | .Nm |
270 | starts a process on the line). | | 270 | starts a process on the line). |
271 | If a line is commented out or deleted from | | 271 | If a line is commented out or deleted from |
272 | .Xr ttys 5 , | | 272 | .Xr ttys 5 , |
273 | .Nm | | 273 | .Nm |
274 | will not do anything at all to that line. | | 274 | will not do anything at all to that line. |
275 | However, it will complain that the relationship between lines | | 275 | However, it will complain that the relationship between lines |
276 | in the | | 276 | in the |
277 | .Xr ttys 5 | | 277 | .Xr ttys 5 |
278 | file and records in the | | 278 | file and records in the |
279 | .Xr utmp 5 | | 279 | .Xr utmp 5 |
280 | file is out of sync, | | 280 | file is out of sync, |
281 | so this practice is not recommended. | | 281 | so this practice is not recommended. |
282 | .Pp | | 282 | .Pp |
283 | .Nm | | 283 | .Nm |
284 | will terminate multi-user operations and resume single-user mode | | 284 | will terminate multi-user operations and resume single-user mode |
285 | if sent a terminate | | 285 | if sent a terminate |
286 | .Pq Dv TERM | | 286 | .Pq Dv TERM |
287 | signal, for example, | | 287 | signal, for example, |
288 | .Dq Li "kill \-s TERM 1" . | | 288 | .Dq Li "kill \-s TERM 1" . |
289 | If there are processes outstanding that are deadlocked (because of | | 289 | If there are processes outstanding that are deadlocked (because of |
290 | hardware or software failure), | | 290 | hardware or software failure), |
291 | .Nm | | 291 | .Nm |
292 | will not wait for them all to die (which might take forever), but | | 292 | will not wait for them all to die (which might take forever), but |
293 | will time out after 30 seconds and print a warning message. | | 293 | will time out after 30 seconds and print a warning message. |
294 | .Pp | | 294 | .Pp |
295 | .Nm | | 295 | .Nm |
296 | will cease creating new | | 296 | will cease creating new |
297 | .Xr getty 8 Ns 's | | 297 | .Xr getty 8 Ns 's |
298 | and allow the system to slowly die away, if it is sent a terminal stop | | 298 | and allow the system to slowly die away, if it is sent a terminal stop |
299 | .Pq Dv TSTP | | 299 | .Pq Dv TSTP |
300 | signal, i.e., | | 300 | signal, i.e., |
301 | .Dq Li "kill \-s TSTP 1" . | | 301 | .Dq Li "kill \-s TSTP 1" . |
302 | A later hangup will resume full | | 302 | A later hangup will resume full |
303 | multi-user operations, or a terminate will start a single user shell. | | 303 | multi-user operations, or a terminate will start a single user shell. |
304 | This hook is used by | | 304 | This hook is used by |
305 | .Xr reboot 8 | | 305 | .Xr reboot 8 |
306 | and | | 306 | and |
307 | .Xr halt 8 . | | 307 | .Xr halt 8 . |
308 | .Pp | | 308 | .Pp |
309 | The role of | | 309 | The role of |
310 | .Nm | | 310 | .Nm |
311 | is so critical that if it dies, the system will reboot itself | | 311 | is so critical that if it dies, the system will reboot itself |
312 | automatically. | | 312 | automatically. |
313 | If, at bootstrap time, the | | 313 | If, at bootstrap time, the |
314 | .Nm | | 314 | .Nm |
315 | process cannot be located, or exits during its initialisation, | | 315 | process cannot be located, or exits during its initialisation, |
316 | the system will panic with the message | | 316 | the system will panic with the message |
317 | .Dq panic: init died (signal %d, exit %d) . | | 317 | .Dq panic: init died (signal %d, exit %d) . |
318 | .Pp | | 318 | .Pp |
319 | If | | 319 | If |
320 | .Pa /dev/console | | 320 | .Pa /dev/console |
321 | does not exist, | | 321 | does not exist, |
322 | .Nm | | 322 | .Nm |
323 | will cd to | | 323 | will cd to |
324 | .Pa /dev | | 324 | .Pa /dev |
325 | and run | | 325 | and run |
326 | .Dq Li "MAKEDEV -MM init" . | | 326 | .Dq Li "MAKEDEV -MM init" . |
327 | .Xr MAKEDEV 8 | | 327 | .Xr MAKEDEV 8 |
328 | will use | | 328 | will use |
329 | .Xr mount_tmpfs 8 | | 329 | .Xr mount_tmpfs 8 |
330 | or | | 330 | or |
331 | .Xr mount_mfs 8 | | 331 | .Xr mount_mfs 8 |
332 | to create a memory file system mounted over | | 332 | to create a memory file system mounted over |
333 | .Pa /dev | | 333 | .Pa /dev |
334 | that contains the standard devices considered necessary to boot the system. | | 334 | that contains the standard devices considered necessary to boot the system. |
335 | .Sh FILES | | 335 | .Sh FILES |
336 | .Bl -tag -width /var/log/wtmp{,x} -compact | | 336 | .Bl -tag -width /var/log/wtmp{,x} -compact |
337 | .It Pa /dev/console | | 337 | .It Pa /dev/console |
338 | System console device. | | 338 | System console device. |
339 | .It Pa /dev/tty* | | 339 | .It Pa /dev/tty* |
340 | Terminal ports found in | | 340 | Terminal ports found in |
341 | .Xr ttys 5 . | | 341 | .Xr ttys 5 . |
342 | .It Pa /var/run/utmp{,x} | | 342 | .It Pa /var/run/utmp{,x} |
343 | Record of current users on the system. | | 343 | Record of current users on the system. |
344 | .It Pa /var/log/wtmp{,x} | | 344 | .It Pa /var/log/wtmp{,x} |
345 | Record of all logins and logouts. | | 345 | Record of all logins and logouts. |
346 | .It Pa /etc/ttys | | 346 | .It Pa /etc/ttys |
347 | The terminal initialization information file. | | 347 | The terminal initialization information file. |
348 | .It Pa /etc/rc | | 348 | .It Pa /etc/rc |
349 | System startup commands. | | 349 | System startup commands. |
350 | .El | | 350 | .El |
351 | .Sh DIAGNOSTICS | | 351 | .Sh DIAGNOSTICS |
352 | .Bl -diag | | 352 | .Bl -diag |
353 | .It "getty repeating too quickly on port %s, sleeping" | | 353 | .It "getty repeating too quickly on port %s, sleeping" |
354 | A process being started to service a line is exiting quickly | | 354 | A process being started to service a line is exiting quickly |
355 | each time it is started. | | 355 | each time it is started. |
356 | This is often caused by a ringing or noisy terminal line. | | 356 | This is often caused by a ringing or noisy terminal line. |
357 | .Em "Init will sleep for 10 seconds" , | | 357 | .Em "Init will sleep for 10 seconds" , |
358 | .Em "then continue trying to start the process" . | | 358 | .Em "then continue trying to start the process" . |
359 | .Pp | | | |
360 | .It "some processes would not die; ps axl advised." | | 359 | .It "some processes would not die; ps axl advised." |
361 | A process is hung and could not be killed when the system was | | 360 | A process is hung and could not be killed when the system was |
362 | shutting down. | | 361 | shutting down. |
363 | This condition is usually caused by a process that is stuck in a | | 362 | This condition is usually caused by a process that is stuck in a |
364 | device driver because of a persistent device error condition. | | 363 | device driver because of a persistent device error condition. |
365 | .El | | 364 | .El |
366 | .Sh SEE ALSO | | 365 | .Sh SEE ALSO |
367 | .Xr config 1 , | | 366 | .Xr config 1 , |
368 | .Xr kill 1 , | | 367 | .Xr kill 1 , |
369 | .Xr login 1 , | | 368 | .Xr login 1 , |
370 | .Xr sh 1 , | | 369 | .Xr sh 1 , |
371 | .Xr options 4 , | | 370 | .Xr options 4 , |
372 | .Xr ttys 5 , | | 371 | .Xr ttys 5 , |
373 | .Xr getty 8 , | | 372 | .Xr getty 8 , |
374 | .Xr halt 8 , | | 373 | .Xr halt 8 , |
375 | .Xr MAKEDEV 8 , | | 374 | .Xr MAKEDEV 8 , |
376 | .Xr MAKEDEV.local 8 , | | 375 | .Xr MAKEDEV.local 8 , |
377 | .Xr mount_mfs 8 , | | 376 | .Xr mount_mfs 8 , |
378 | .Xr mount_tmpfs 8 , | | 377 | .Xr mount_tmpfs 8 , |
379 | .Xr rc 8 , | | 378 | .Xr rc 8 , |
380 | .Xr reboot 8 , | | 379 | .Xr reboot 8 , |
381 | .Xr rescue 8 , | | 380 | .Xr rescue 8 , |
382 | .Xr shutdown 8 , | | 381 | .Xr shutdown 8 , |
383 | .Xr sysctl 8 , | | 382 | .Xr sysctl 8 , |
384 | .Xr secmodel_bsd44 9 , | | 383 | .Xr secmodel_bsd44 9 , |
385 | .Xr secmodel_securelevel 9 | | 384 | .Xr secmodel_securelevel 9 |
386 | .Sh HISTORY | | 385 | .Sh HISTORY |
387 | An | | 386 | An |
388 | .Nm | | 387 | .Nm |
389 | command appeared in | | 388 | command appeared in |
390 | .At v1 . | | 389 | .At v1 . |