summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-01-05 16:02:41 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-01-05 16:02:41 +0000
commitb21d1e4bdd6abb51d3f4e62f9f1bad7914aa84ea (patch)
treedd62974d552a718d787754d3b59fefdee3fecb5b /usr.sbin
parentaf0855cfb092c08728ba40210230d2ef67d3d99f (diff)
Add initial man page for installboot.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/installboot/Makefile9
-rw-r--r--usr.sbin/installboot/installboot.876
2 files changed, 80 insertions, 5 deletions
diff --git a/usr.sbin/installboot/Makefile b/usr.sbin/installboot/Makefile
index 21b97416a6b..4ab5c07334b 100644
--- a/usr.sbin/installboot/Makefile
+++ b/usr.sbin/installboot/Makefile
@@ -1,6 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2013/12/28 14:45:57 jsing Exp $
-
-NOMAN=
+# $OpenBSD: Makefile,v 1.8 2014/01/05 16:02:40 jsing Exp $
.if (${MACHINE} == "amd64" || ${MACHINE} == "hp300" || \
${MACHINE} == "hppa" || ${MACHINE} == "hppa64" || \
@@ -8,6 +6,8 @@ NOMAN=
${MACHINE} == "sparc64" || ${MACHINE} == "vax")
PROG= installboot
+SRCS= installboot.c
+MAN= installboot.8
CPPFLAGS= -I${.CURDIR}
LDADD= -lutil
@@ -15,8 +15,6 @@ DPADD= ${LIBUTIL}
LDSTATIC= -static
-SRCS += installboot.c
-
.include "${.CURDIR}/${MACHINE}/Makefile.inc"
.if !empty(CFLAGS:M-DBOOTSTRAP)
@@ -29,6 +27,7 @@ SRCS += softraid.c
.else
NOPROG=
+NOMAN=
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/installboot/installboot.8 b/usr.sbin/installboot/installboot.8
new file mode 100644
index 00000000000..676b74ee439
--- /dev/null
+++ b/usr.sbin/installboot/installboot.8
@@ -0,0 +1,76 @@
+.\" $OpenBSD: installboot.8,v 1.1 2014/01/05 16:02:40 jsing Exp $
+.\"
+.\" Copyright (c) 2013, 2014 Joel Sing
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: January 5 2014 $
+.Dt INSTALLBOOT 8
+.Os
+.Sh NAME
+.Nm installboot
+.Nd install bootstrap on a disk
+.Sh SYNOPSIS
+.Nm installboot
+.Op Fl nv
+.Ar disk
+.Op Ar stage1 Op Ar stage2
+.Sh DESCRIPTION
+.Nm
+installs bootstrap on the specified disk.
+The exact process used depends on the system architecture, however there is
+generally a primary bootstrap (often known as a boot block) and a
+secondary bootstrap (often known as a boot loader).
+Some architectures only require a single stage bootstrap, which is written to
+the beginning of the disk.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl n
+Perform a dry run - do not actually write any bootstrap to the disk.
+.It Fl v
+Increase verbosity during operation.
+.It Ar disk
+Specify the
+.Ar disk
+to install the bootstrap on.
+This may be specified using a full pathname, an abbreviated disk form,
+or a disklabel UID.
+.It Ar stage1
+Specify the file to use for the primary bootstrap.
+If not specified, the default for this architecture will be used.
+.It Ar stage2
+Specify the file to use for the secondary bootstrap.
+If not specified, the default for this architecture will be used.
+.El
+.Sh EXAMPLES
+In its most basic form, to install bootstrap on
+.Ar disk
+sd0, using the default primary and secondary bootstrap files:
+.Bd -literal -offset 3n
+# installboot sd0
+.Ed
+.Pp
+To install bootstrap on an
+.Ox
+amd64 machine, using
+.Ar /usr/mdec/biosboot
+as the primary bootstrap and
+.Ar /boot
+as the secondary bootstrap:
+.Bd -literal -offset 3n
+# cp /usr/mdec/boot /boot
+# installboot -v wd0 /usr/mdec/biosboot /boot
+.Ed
+.Sh SEE ALSO
+.Xr disklabel 8