NetBSD/sbin/bim/bim.8

145 lines
4.3 KiB
Groff

.\" $NetBSD: bim.8,v 1.10 2003/02/25 10:34:51 wiz Exp $
.\"
.\" Copyright 1997 Piermont Information Systems Inc.
.\" All rights reserved.
.\"
.\" Written by Philip A. Nelson for Piermont Information Systems Inc.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed for the NetBSD Project by
.\" Piermont Information Systems Inc.
.\" 4. The name of Piermont Information Systems Inc. may not be used to endorse
.\" or promote products derived from this software without specific prior
.\" written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 16, 1997
.Os
.Dt BIM 8 pc532
.Sh NAME
.Nm bim
.Nd pc532 boot image manager
.Sh SYNOPSIS
bim
.Op Fl y
.Op Fl c Ar command
.Op Ar device
.Sh DESCRIPTION
The pc532 has available an autoboot ROM monitor.
This ROM monitor understands the
.Bx
disklabel and expects a boot image directory following the disklabel.
Also, it expects an image partition for the storage of bootable images.
The image directory and the image partition is managed by
.Nm .
The
.Ar device
is the raw disk partition that includes the disklabel.
The default value of
.Ar device
is
.Pa /dev/rsd0c .
.Nm
directly accesses both the disklabel and the image partition directly
from the raw disk device.
It does not open the device corresponding to the boot partition.
.Pp
The
.Fl y
argument assumes a yes response to any questions
.Nm
would normally ask the user.
It is mainly useful for scripting.
.Pp
The
.Cm -c command
argument allows
.Nm
to execute commands given via the command line.
This allows
.Nm
to be used from scripts.
The
.Cm -c command
argument may be repeated up to 20 times.
The commands will be executed in the order given.
.Sh DISK INITIALIZATION
.Nm
is typically used as part of the initial setup on a disk.
The disk must be partitioned by using
.Xr disklabel 8 ,
making sure there is a boot boot partition.
This boot partition is often just after the disklabel.
It must not include the disklabel.
If
.Nm
does not detect a boot image directory,
it asks if the user wants one created.
From there, the operation of
.Nm
is completely command driven.
The command interpreter is
.Sh COMMANDS
.Nm
supports the following commands.
There is on-line documentation for all commands.
.Pp
.Bl -tag -width "partitions"
.It add
Adds an executable file to the image partition.
.It delete
Deletes an image from the image partition.
.It default
Sets the default image boot.
.It exit
Exit
.Nm .
.It header
Print a small section of the disklabel.
.It help
Print help.
.It images
Print the image partition table.
.It init
Initialize the image partition and associated partition table.
.It partitions
Print the disklabel.
.It quit
Terminate
.Nm .
.It ?
Print help.
.El
.Pp
For the details on these commands, ask for help from
.Nm .
.Sh SEE ALSO
.Xr disklabel 8
.Sh AUTHORS
Bruce Culbertson wrote the basic command interpreter for the pc532
ROM monitor.
Philip A. Nelson took the command interpreter, modified
it to be a more generic command interpreter and added the
.Nm
specific code.