'\"macro stdmacro
.if n .pH g1a.mkboot @(#)mkboot	40.10 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} mkboot 1M "Essential Utilities" "\&"
.if \nX=1 .ds x} mkboot 1M "Essential Utilities"
.if \nX=2 .ds x} mkboot 1M "" "\&"
.if \nX=3 .ds x} mkboot "" "" "\&"
.TH \*(x}
.SH NAME
\f4mkboot\f1 \- convert an object file to a bootable object file
.SH SYNOPSIS
\f4/usr/sbin/mkboot\f1
[ \f4\-m\f1 \f2master\fP ]
[ \f4\-d\f1 \f2directory\fP ]
\f4\-k\f1 \f2kernel_obj\f1 [\f4\-f\f1 \f2kernel_master\f1 ]
.sp 0.5
\f4/usr/sbin/mkboot\f1
[ \f4\-m\f1 \f2master\fP ]
[ \f4\-d\f1 \f2directory\fP ]
\f2obj_file\f1
.SH DESCRIPTION
The \f4mkboot\f1 command is used to create a new object file from a
previous object file and its associated \f4master\f1 file;  the new object
file can be used by the \f4cunix\f1 program to configure a new bootable
operating system.
.P
Typically, a user makes changes to one or more files in the directory
\f4/etc/master.d\f1 [files in this directory are called \f4master\f1 files,
and are in the format specified in the \f4master\f1(4) manual page].
.P
Then, the user executes a \f4mkboot\f1 command (with appropriate options)
from the \f4/boot\f1 directory;  the \f4/boot\f1 directory is used to hold
all device driver object files that must be configured into the bootable
operating system so that the operating system correctly reflects the
current configuration of the machine.
.P
One \f4mkboot\f1 command must be executed for each \f4master\f1 file changed.
The \f4mkboot\f1 command updates the existing object file in \f4/boot\f1
with the changes made to its associated \f4master\f1 file.
.P
After executing all necessary \f4mkboot\f1 commands, the user then
either configures a new bootable operating system from firmware mode
and reboots the system, or uses the \f4cunix\f1 command to configure a new
bootable operating system at the user level.
.P
The user must specify either the \f4\-k\f1 option with the kernel object
file name (usually \f4KERNEL\fP), or the name of another object file to be
changed (usually a file in \f4/boot\f1).
The object file name used can be a relative or full pathname, and can have
an optional \f4.o\f1 suffix.
.P
If the \f4-k\f1 option is used, the \f4master\f1 file name \f4kernel\f1 is
assumed;  \f4\-f\f1 can be used to specify a \f4master\f1 file other
than \f4kernel\f1 to build the \f2kernel_obj\f1 object.
.P
If \f2obj_file\f1 is specified instead of \f4-k\f1, the named
\f2obj_file\f1 must have an associated file in \f4/etc/master.d\f1;  the
name of the associated \f4master\f1 file is the name of the \f2obj_file\f1
in lowercase letters, without any path prefix or \f4.o\f1 suffix.
.P
If you are making a new object file for the kernel, you must use
the \f4\-k\f1 option to specify the kernel object file;  if you process
a kernel object file without the \f4\-k\f1 option, the resulting object
file will be unusable by \f4cunix\f1 (an
error is returned by \f4cunix\f1 that says that no object was flagged as
the kernel;  this flag is added to the object file
only when \f4\-k\f1 is specified).
.P
The \f4\-m\f1 and \f4\-d\f1 options are used to specify alternate locations
for \f4master\f1 files and object files output by \f4mkboot\f1:
.P
.TP 15
\f4\-m \f2master\fP
This option specifies the directory
containing the \f4master\f1 files to be used for the object file.
The default \f2master\fP directory is \f4/etc/master.d\f1.
.TP
\f4\-d \f2directory\fP
This option specifies the directory to be used for
storing the new object file.
The default output \f2directory\fP is \f4/boot\f1.
.P
To create a new object file, the applicable \f4master\f1 file
is read and the configuration information is extracted.
Then, the old object file is read from the current directory, and
changed to reflect the new configuration information.
The resulting new object file is
written to the output directory specified by the
\f4-d\f1 option or to \f4/boot\f1.
It is given the same name as specified by \f2obj_file\f1 or
\f2kernel_obj\f1, in uppercase letters and without any \f4.o\f1 suffix.
.P
Note that if the output directory is the same as the current working
directory when \f4mkboot\f1 is executed, then the output object file overwrites
the previous object file residing in the directory.
.SH EXAMPLE
\f4mkboot \-m newmaster gentty.o\f1
.PP
This will read the file named
\f4gentty\f1
from the directory
\f4newmaster\f1
for the
\f4gentty\f1
device configuration data,
take the file
\f4gentty.o\f1
from the current directory, and create the object file
\f4/boot/GENTTY\f1 for use in configuring a new operating system.
.P
\f4cd /boot; mkboot \-k KERNEL\f1
.PP
This will read the file named
\f4kernel\f1
from the directory
\f4/etc/master.d\f1
for the new kernel configuration data,
take the file
\f4KERNEL\f1
from the current directory, and create the
\f4/boot/KERNEL\f1
object file.
.P
\f4cd /boot; mkboot sem\f1
.PP
This will read the file named \f4sem\f1 from the
\f4/etc/master.d\f1 directory, take the file \f4SEM\f1 from the current
directory (\f4/boot\f1), and place the output file in \f4/boot/SEM\f1.
.SH DIAGNOSTICS
\f4mkboot FILE\fP	(FILE does not exist)
.sp.5
\f4mkboot: FILE: cannot open: No such file or directory\f1
.sp
\f4mkboot -d dir SEM\fP	(dir does not exist)
.sp.5
\f4mkboot: dir: cannot open: No such file or directory
.br
mkboot: SEM; not processed\fP
.SH SEE ALSO
\f4cunix\fP(1M),
\f4master\fP(4)
.P
\f2System Administrator's Guide\f1

