Merge branch 'vendor/OPENSSL'
[dragonfly.git] / share / doc / smm / 02.config / b.t
1 .\" Copyright (c) 1983, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)b.t 8.1 (Berkeley) 6/8/93
29 .\"
30 .\".ds RH "Device Defaulting Rules
31 .bp
32 .LG
33 .B
34 .ce
35 APPENDIX B. RULES FOR DEFAULTING SYSTEM DEVICES
36 .sp
37 .R
38 .NL
39 .PP
40 When \fIconfig\fP processes a ``config'' rule which does
41 not fully specify the location of the root file system,
42 paging area(s), device for system dumps, and device for
43 argument list processing it applies a set of rules to
44 define those values left unspecified.  The following list
45 of rules are used in defaulting system devices.
46 .IP 1) 3
47 If a root device is not specified, the swap
48 specification must indicate a ``generic'' system is to be built.
49 .IP 2) 3
50 If the root device does not specify a unit number, it
51 defaults to unit 0.
52 .IP 3) 3
53 If the root device does not include a partition specification,
54 it defaults to the ``a'' partition.
55 .IP 4) 3
56 If no swap area is specified, it defaults to the ``b''
57 partition of the root device.
58 .IP 5) 3
59 If no device is specified for processing argument lists, the
60 first swap partition is selected.
61 .IP 6) 3
62 If no device is chosen for system dumps, the first swap
63 partition is selected (see below to find out where dumps are
64 placed within the partition).
65 .PP
66 The following table summarizes the default partitions selected
67 when a device specification is incomplete, e.g. ``hp0''.
68 .DS
69 .TS
70 l l.
71 Type    Partition
72 _
73 root    ``a''
74 swap    ``b''
75 args    ``b''
76 dumps   ``b''
77 .TE
78 .DE
79 .SH
80 Multiple swap/paging areas
81 .PP
82 When multiple swap partitions are specified, the system treats the
83 first specified as a ``primary'' swap area which is always used.
84 The remaining partitions are then interleaved into the paging
85 system at the time a
86 .IR swapon (2)
87 system call is made.  This is normally done at boot time with
88 a call to
89 .IR swapon (8)
90 from the /etc/rc file.
91 .SH
92 System dumps
93 .PP
94 System dumps are automatically taken after a system crash,
95 provided the device driver for the ``dumps'' device supports
96 this.  The dump contains the contents of memory, but not
97 the swap areas.  Normally the dump device is a disk in
98 which case the information is copied to a location at the
99 back of the partition.  The dump is placed in the back of the
100 partition because the primary swap and dump device are commonly
101 the same device and this allows the system to be rebooted without
102 immediately overwriting the saved information.  When a dump has
103 occurred, the system variable \fIdumpsize\fP
104 is set to a non-zero value indicating the size (in bytes) of
105 the dump.  The \fIsavecore\fP\|(8)
106 program then copies the information from the dump partition to
107 a file in a ``crash'' directory and also makes a copy of the
108 system which was running at the time of the crash (usually
109 ``/kernel'').  The offset to the system dump is defined in the
110 system variable \fIdumplo\fP (a sector offset from
111 the front of the dump partition). The
112 .I savecore
113 program operates by reading the contents of \fIdumplo\fP, \fIdumpdev\fP,
114 and \fIdumpmagic\fP from /dev/kmem, then comparing the value
115 of \fIdumpmagic\fP read from /dev/kmem to that located in
116 corresponding location in the dump area of the dump partition.
117 If a match is found,
118 .I savecore
119 assumes a crash occurred and reads \fIdumpsize\fP from the dump area
120 of the dump partition.  This value is then used in copying the
121 system dump.  Refer to
122 \fIsavecore\fP\|(8)
123 for more information about its operation.
124 .PP
125 The value \fIdumplo\fP is calculated to be
126 .DS
127 \fIdumpdev-size\fP \- \fImemsize\fP
128 .DE
129 where \fIdumpdev-size\fP is the size of the disk partition
130 where system dumps are to be placed, and
131 \fImemsize\fP is the size of physical memory.
132 If the disk partition is not large enough to hold a full
133 dump, \fIdumplo\fP is set to 0 (the start of the partition).