summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/Install.1
blob: 13c26f8cbb538bc8a207a7e3593d0442cbd2d484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
.\"
.\" Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
.\" Use is subject to license terms.
.\"
.\" CDDL HEADER START
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License, Version 1.0 only
.\" (the "License").  You may not use this file except in compliance
.\" with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\" CDDL HEADER END
.\"
.\" ident	"%Z%%M%	%I%	%E% SMI"
.\"
.TH Install 1 "5 Nov 2004"
.SH NAME
Install \- install a kernel from an ON workspace
.SH SYNOPSIS
.TP 8n
.B Install
.RB [ " \-w "
.IR workspace " ]"
.RB [ " \-s "
.IR "source dir" " ]"
.br
.RB [ " \-k  "
.IR "kernel arch" " ]"
.RB "[ " \-n " | " \-t|T
.IR target " ]"
.br
.RB [ " \-u|m|a " ]
.RB [ " \-v|V|q " ]
.RB [ " \-c|p " ]
.br
.RB [ " \-l "
.IR "library file" " ]"
.RB [ " \-L " ]
.RB [ " \-3 " ]
.RB [ " \-6 " ]
.RB [ " \-K " ]
.br
.RB [ " \-P " ]
.RB [ " \-o "
{
.BR obj " | "
.B debug
}
]
.RB [ " \-d "
.IR "work dir" " ]"
.br
.RB [ " \-D "
.IR "library dir" " ]"
.RB [ " \-G "
.IB glomname " ]"
.RB [ " \-x|X " ]
.RI [ " module ... " ]
.LP
or
.LP
.BR "Install \-R " "[ options ]"
.SH DESCRIPTION
.LP
.B Install
is a utility which simplifies the process of installing a 5.0 system.
.B Install
goes into a built ON workspace (or any kernel source tree),
looks at the Makefiles,
and figures out how to construct the /kernel and /usr/kernel directories.
It then creates a tarfile
.RB "(see " tar "(1))"
containing /kernel, /usr/kernel, and a few related /etc files.  If a
.I target ([user@]machine:/dir)
is specified, the tarfile is either copied to
.IR machine:/dir " (-T) or untarred on " "machine" " in " "/dir" " (-t),"
using the remote user id
.IR user ,
if specified.
With no options,
.B Install
creates a sun4c system from files in the current workspace (as indicated
by $SRC) and places the tarfile in /tmp/Install.username/Install.sun4c.tar.

.SH OPTIONS
.TP 20n
.BI "-w" " ws"
Install the system built in the ON workspace
.I ws.  ws
must be a built ON workspace \(em
.B Install
will not automatically invoke
.BR make "(1).  If " \-w " is not specified, " Install " uses the current
workspace (as indicated by $CODEMGR_WS).  If there is no current workspace,
.B Install
checks to see if you are in an appropriate source directory, e.g. uts/sun4c;
if so,
.B Install
takes files from there.  Otherwise,
.B Install
looks for files under $SRC/uts.
.TP
.BI "-s" " source directory"
where to look for files [default: $SRC/uts].
.TP
.BI "-k" " kernel arch"
the type of kernel to install.  The default is sun4c; however, if you invoke
.B Install
from $SRC/uts/sun4z,
.B Install
assumes you want a sun4z kernel.
.TP
.B "-n"
No target; just create the tarfile in
/tmp/Install.username/Install.sun4c.tar [default].
.BR "-n" " implies " "-p" .
.TP
.BI "-t" " target"
Install the system on
.I target ([user@]machine:/dir).
This means that kernel/unix is copied to
.I machine:/dir/kernel/unix,
etc.
.IR /dir " is typically either " / " or " /mnt.
.BR "-t" " implies " "-c" .
The default remote user id is the same as the local one ($LOGNAME).
.TP
.BI "-T" " target"
Copy the tarfile to
.I target ([user@]machine:/dir).
This creates the file
.I /dir/Install.tar
on
.I machine.
To finish the install, log on to
.I machine
as root, and type
.RB `` "cd /; tar xvf /dir/Install.tar" "''."
.BR "-T" " implies " "-c" .
.TP
.B "-u"
Install unix only.
.TP
.B "-m"
Install modules only.
.TP
.B "-a"
Install unix and all modules [default].
.TP
.B "-v"
Verbose mode.
.TP
.B "-V"
REALLY verbose mode.  Useful mainly for debugging.
.TP
.B "-q"
Quiet mode [default].  Only fatal messages are printed.
.TP
.B "-c"
Clean up.  After a successful install, delete the files created in
/tmp/Install.username.  This is the default behavior if a
.I target
is specified with
.BR "-t" " or " "-T" .
.TP
.B "-p"
Preserve temp files.  This is the default behavior when no
.I target
is specified
.RB ( "-n" ).
.TP
.B "-R"
Recover from a failed
.BR Install .
This is not required, it's just faster than restarting.
A typical scenario is for
.B Install
to run smoothly right up to the very end, but then die with
"Permission denied" when it tries to rsh/rcp to the target machine.
At this point, you log on to the target machine, diddle the permissions,
log off, and type
.RB `` "Install -R" "''."
.B Install
will only have to retry the rsh/rcp,
rather than rebuild the tarfile from scratch.
.TP
.BI "-d" " temp directory"
specifies where
.B Install
should create its temp files [default: /tmp/Install.username].  This is
useful if you have limited space in /tmp (\fBInstall\fR needs about 4MB).
The suffix "Install.username" is always appended.
.TP
.B "-L"
add a system to your library.  This allows you to build a personal
collection of installable systems from various environments and for
various architectures.  When you type
.RB `` "Install -w /ws/ws_name -k arch -L" "'', " Install
creates a tarfile called
.I ws_name.arch.tar
in your library directory (~/LibInstall by default).
.BR "-L" " implies " "-c" .
.TP
.BI "-l" " library file"
Installs the system contained in
.I library file.
You may omit the ``.tar'' suffix.  For example,
.RB `` "Install -l my_ws.sun4c -t machine:/" ''
installs a system you previously built with
.B "-L"
(from sun4c files in my_ws) on 
.IR machine:/ .
This is equivalent to typing
.RB `` "rsh machine '(cd /; tar xvf -)' <~/LibInstall/my_ws.sun4c.tar" '',
but it's easier to remember.
.TP
.BI "-D" " lib directory"
specifies the library directory [default: $HOME/LibInstall].
.TP
.BI "-G " glomname
gloms /kernel and /usr/kernel together into a single /kernel directory.
Useful for development work, e.g. use "Install -G good [...]" to create a
"/kernel.good".
.TP
.B "-x"
includes various auxiliary files along with the kernel.  Currently,
these include /etc/minor_perm, /etc/driver_aliases, /etc/name_to_sysnum,
and /etc/name_to_major.
.B "-x"
is the default.
.TP
.B "-X"
opposite of
.BR "-x" :
.I do not
include auxiliary files.
.TP
.B "-P"
update /etc/path_to_inst -- generally not advisable.
.TP
.BR "-o " "{ \fBobj\fP | \fBdebug\fP }"
object directory. The default is "debug".
.TP
.B \-3
32-bit modules only
.TP
.B \-6
64-bit modules only
.TP
.B \-K
Do not include kmdb misc module or dmods
.TP
.B "-h"
Help.  Prints a brief summary of
.BR Install "'s"
options.
.LP
If you are in a directory like $SRC/uts/sun4z when you invoke
.BR Install ,
it will infer that you want to install a sun4z system
from the current workspace.
.LP
If you supply a list of modules, it overrides any of the
.B "-uma"
options.  You only need to specify the basename of the
module(s), e.g. ``\fBInstall ufs nfs le\fR''.
``\fBInstall unix\fR'' is equivalent to ``\fBInstall -u\fR'', and
``\fBInstall modules\fR'' is equivalent to ``\fBInstall -m\fR''.
.LP
You can customize
.B Install
by creating a .Installrc file in your home directory.  .Installrc
should consist of a list of command-line-style options, e.g:
.LP
.B
	-w /ws/foo
.br
.B
	-t labmachine:/mnt -pv
.LP
.B Install
processes default options first, then .Installrc
options, then command-line options.  In the case of
conflicting options (e.g. \fB-uma\fR), the last one wins.
.LP
In order to use the most convenient form of
.BR Install " (``" "Install -t machine:/" "''),"
you will need to do the following on the target machine:
.LP
.br
	(1) add your machine name to the /etc/hosts.equiv file
.br
	(2) add your username to the /etc/{passwd,shadow} files
.br
	(3) chown -R yourself /kernel /usr/kernel
.br
	(4) chmod -R u+w /kernel /usr/kernel
.SH "ENVIRONMENT"
.LP
You can set the following variables in your environment:
.LP
INSTALL_RC [default: $HOME/.Installrc]
.IP
file containing default options for \fBInstall\fR
.LP
INSTALL_STATE [default: $HOME/.Install.state]
.IP
where \fBInstall\fR keeps its state information
.LP
INSTALL_DIR [default: /tmp/Install.username]
.IP
where \fBInstall\fR does its work.  This can be overridden on
the command line with \fB\-d\fR.
.LP
INSTALL_LIB [default: $HOME/LibInstall]
.IP
where \fBInstall\fR gets/puts library files.  This can be overridden on
the command line with \fB\-D\fR.
.LP
INSTALL_CP [default: cp -p]
.IP
the command to copy files locally
.LP
INSTALL_RCP [default: rcp -p]
.IP
the command to copy files remotely
.bp
.SH "EXAMPLES"
.LP
.B
Install -w /ws/blort -t machine:/
.IP
.RI "installs the system built in workspace " /ws/blort " on " machine:/
.LP
.B
Install -w /ws/blort -T machine:/tmp
.br
.B
rsh machine -l root "cd /; tar xvf /tmp/Install.tar"
.IP
is an equivalent way to do the previous example
.LP
.B Install
.IP
makes a tarfile containing a sun4c kernel,
and places it in /tmp/Install.username/Install.sun4c.tar.  However, if you
are in one of the arch directories (e.g. $SRC/uts/sun4m) when you invoke
.BR Install ,
you will get a tarfile for that architecture instead.
.LP
.B
Install -k sun4m -w /ws/on493 -t mpbox:/ ufs
.IP
installs a new sun4m ufs module from workspace /ws/on493 on mpbox:/
.SH "FILES"
$HOME/.Installrc, $HOME/.Install.state
.SH "SEE ALSO"
.BR tar "(1), " rsh "(1), " rcp "(1)"
.SH "BUGS"
.B Install
may break periodically as the kernel Makefile structure changes.
I will provide frequent updates to compensate.
.LP
.BR tar "(1) and " rsh "(1)"
do not have particularly useful exit codes.  To compensate,
.B Install
feeds stderr through grep -v and throws away error messages which it
considers harmless.  If there's anything left,
.B Install
assumes it is fatal.  It's a hack, but it works.