2 .\" Copyright 2010 Sun Microsystems, Inc. All rights reserved.
3 .\" Use is subject to license terms.
7 .\" The contents of this file are subject to the terms of the
8 .\" Common Development and Distribution License (the "License").
9 .\" You may not use this file except in compliance with the License.
11 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12 .\" or http://www.opensolaris.org/os/licensing.
13 .\" See the License for the specific language governing permissions
14 .\" and limitations under the License.
16 .\" When distributing Covered Code, include this CDDL HEADER in each
17 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18 .\" If applicable, add the following below this CDDL HEADER, with the
19 .\" fields enclosed by brackets "[]" replaced with your own identifying
20 .\" information: Portions Copyright [yyyy] [name of copyright owner]
24 .TH INSTALL 1ONBLD "Jan 14, 2010"
26 Install \- install a kernel from an ON workspace
36 .IR "kernel arch" " ]"
37 .RB "[ " \-n " | " \-t|T
45 .IR "library file" " ]"
61 .IR "library dir" " ]"
64 .RI [ " module ... " ]
68 .BR "Install \-R " "[ options ]"
72 is a utility which simplifies the process of installing a 5.0 system.
74 goes into a built ON workspace (or any kernel source tree),
75 looks at the Makefiles,
76 and figures out how to construct the /kernel and /usr/kernel directories.
77 It then creates a tarfile
78 .RB "(see " tar "(1))"
79 containing /kernel, /usr/kernel, and a few related /etc files. If a
80 .I target ([user@]machine:/dir)
81 is specified, the tarfile is either copied to
82 .IR machine:/dir " (-T) or untarred on " "machine" " in " "/dir" " (-t),"
83 using the remote user id
88 creates a sun4c system from files in the current workspace (as indicated
89 by $SRC) and places the tarfile in /tmp/Install.username/Install.sun4c.tar.
94 Install the system built in the ON workspace
96 must be a built ON workspace \(em
98 will not automatically invoke
100 If \-w is not specified,
103 workspace (as indicated by $CODEMGR_WS). If there is no current workspace,
105 checks to see if you are in an appropriate source directory, e.g. uts/sun4c;
108 takes files from there. Otherwise,
110 looks for files under $SRC/uts.
112 .BI "-s" " source directory"
113 where to look for files [default: $SRC/uts].
115 .BI "-k" " kernel arch"
116 the type of kernel to install. The default is sun4c; however, if you invoke
120 assumes you want a sun4z kernel.
123 No target; just create the tarfile in
124 /tmp/Install.username/Install.sun4c.tar [default].
125 .BR "-n" " implies " "-p" .
128 Install the system on
129 .I target ([user@]machine:/dir).
130 This means that kernel/unix is copied to
131 .I machine:/dir/kernel/unix,
133 .IR /dir " is typically either " / " or " /mnt.
134 .BR "-t" " implies " "-c" .
135 The default remote user id is the same as the local one ($LOGNAME).
139 .I target ([user@]machine:/dir).
140 This creates the file
144 To finish the install, log on to
147 .RB `` "cd /; tar xvf /dir/Install.tar" "''."
148 .BR "-T" " implies " "-c" .
154 Install modules only.
157 Install unix and all modules [default].
163 REALLY verbose mode. Useful mainly for debugging.
166 Quiet mode [default]. Only fatal messages are printed.
169 Clean up. After a successful install, delete the files created in
170 /tmp/Install.username. This is the default behavior if a
173 .BR "-t" " or " "-T" .
176 Preserve temp files. This is the default behavior when no
182 Recover from a failed
184 This is not required, it's just faster than restarting.
185 A typical scenario is for
187 to run smoothly right up to the very end, but then die with
188 "Permission denied" when it tries to rsh/rcp to the target machine.
189 At this point, you log on to the target machine, diddle the permissions,
191 .RB `` "Install -R" "''."
193 will only have to retry the rsh/rcp,
194 rather than rebuild the tarfile from scratch.
196 .BI "-d" " temp directory"
199 should create its temp files [default: /tmp/Install.username]. This is
200 useful if you have limited space in /tmp (\fBInstall\fR can take as
202 The suffix "Install.username" is always appended.
205 add a system to your library. This allows you to build a personal
206 collection of installable systems from various environments and for
207 various architectures. When you type
208 .RB `` "Install -w /ws/ws_name -k arch -L" "'', " Install
209 creates a tarfile called
211 in your library directory (~/LibInstall by default).
212 .BR "-L" " implies " "-c" .
214 .BI "-l" " library file"
215 Installs the system contained in
217 You may omit the ``.tar'' suffix. For example,
218 .RB `` "Install -l my_ws.sun4c -t machine:/" ''
219 installs a system you previously built with
221 (from sun4c files in my_ws) on
223 This is equivalent to typing
224 .RB `` "rsh machine '(cd /; tar xvf -)' <~/LibInstall/my_ws.sun4c.tar" '',
225 but it's easier to remember.
227 .BI "-D" " lib directory"
228 specifies the library directory [default: $HOME/LibInstall].
231 gloms /kernel and /usr/kernel together into a single /kernel directory.
232 Useful for development work, e.g. use "Install -G good [...]" to create a
235 .BR "-o " "{ \fBobj\fP | \fBdebug\fP }"
236 object directory. The default is "debug".
245 Do not include kmdb misc module or dmods
248 Help. Prints a brief summary of
252 If you are in a directory like $SRC/uts/sun4z when you invoke
254 it will infer that you want to install a sun4z system
255 from the current workspace.
257 If you supply a list of modules, it overrides any of the
259 options. You only need to specify the basename of the
260 module(s), e.g. ``\fBInstall ufs nfs le\fR''.
261 ``\fBInstall unix\fR'' is equivalent to ``\fBInstall -u\fR'', and
262 ``\fBInstall modules\fR'' is equivalent to ``\fBInstall -m\fR''.
266 by creating a .Installrc file in your home directory. .Installrc
267 should consist of a list of command-line-style options, e.g:
276 -t labmachine:/mnt -pv
280 processes default options first, then .Installrc
281 options, then command-line options. In the case of
282 conflicting options (e.g. \fB-uma\fR), the last one wins.
284 In order to use the most convenient form of
285 .BR Install " (``" "Install -t machine:/" "''),"
286 you will need to do the following on the target machine:
290 (1) add your machine name to the /etc/hosts.equiv file
294 (2) add your username to the /etc/{passwd,shadow} files
298 (3) chown -R yourself /kernel /usr/kernel
302 (4) chmod -R u+w /kernel /usr/kernel
306 You can set the following variables in your environment:
308 INSTALL_RC [default: $HOME/.Installrc]
310 file containing default options for \fBInstall\fR
312 INSTALL_STATE [default: $HOME/.Install.state]
314 where \fBInstall\fR keeps its state information
316 INSTALL_DIR [default: /tmp/Install.username]
318 where \fBInstall\fR does its work. This can be overridden on
319 the command line with \fB\-d\fR.
321 INSTALL_LIB [default: $HOME/LibInstall]
323 where \fBInstall\fR gets/puts library files. This can be overridden on
324 the command line with \fB\-D\fR.
326 INSTALL_CP [default: cp -p]
328 the command to copy files locally
330 INSTALL_RCP [default: rcp -p]
332 the command to copy files remotely
336 Install -w /ws/blort -t machine:/
338 .RI "installs the system built in workspace " /ws/blort " on " machine:/
341 Install -w /ws/blort -T machine:/tmp
344 rsh machine -l root "cd /; tar xvf /tmp/Install.tar"
346 is an equivalent way to do the previous example
350 makes a tarfile containing a sun4c kernel,
351 and places it in /tmp/Install.username/Install.sun4c.tar. However, if you
352 are in one of the arch directories (e.g. $SRC/uts/sun4m) when you invoke
354 you will get a tarfile for that architecture instead.
357 Install -k sun4m -w /ws/on493 -t mpbox:/ ufs
359 installs a new sun4m ufs module from workspace /ws/on493 on mpbox:/
361 $HOME/.Installrc, $HOME/.Install.state
363 .BR tar "(1), " rsh "(1), " rcp "(1)"
365 .BR tar "(1) and " rsh "(1)"
366 do not have particularly useful exit codes. To compensate,
368 feeds stderr through grep -v and throws away error messages which it
369 considers harmless. If there's anything left,
371 assumes it is fatal. It's a hack, but it works.