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