summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-27 18:02:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-27 18:02:17 +0000
commit2b07721d7e217659539fd6eda089e0d73d621524 (patch)
treeba7bac57aa919c5fb7e3929fcbc180a9094e1cf1 /sys
parentdefa5d7c4844b9dd2ae34d2db3a1f1891e97b8d1 (diff)
simple man page for sgivol
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sgi/stand/Makefile6
-rw-r--r--sys/arch/sgi/stand/sgivol/Makefile10
-rw-r--r--sys/arch/sgi/stand/sgivol/sgivol.8119
3 files changed, 131 insertions, 4 deletions
diff --git a/sys/arch/sgi/stand/Makefile b/sys/arch/sgi/stand/Makefile
index fccce846c6e..beff27ac1b8 100644
--- a/sys/arch/sgi/stand/Makefile
+++ b/sys/arch/sgi/stand/Makefile
@@ -1,7 +1,9 @@
-# $OpenBSD: Makefile,v 1.3 2004/08/23 14:33:34 deraadt Exp $
+# $OpenBSD: Makefile,v 1.4 2005/04/27 18:02:16 deraadt Exp $
+
+SUBDIR= sgivol
.if ${MACHINE} == "sgi"
-SUBDIR= libsa libkern libz boot sgivol
+SUBDIR+= libsa libkern libz boot
.endif
.include <bsd.subdir.mk>
diff --git a/sys/arch/sgi/stand/sgivol/Makefile b/sys/arch/sgi/stand/sgivol/Makefile
index 05afcd34060..e6fc37cdbf3 100644
--- a/sys/arch/sgi/stand/sgivol/Makefile
+++ b/sys/arch/sgi/stand/sgivol/Makefile
@@ -1,10 +1,16 @@
-# $OpenBSD: Makefile,v 1.2 2004/08/25 18:19:35 pefo Exp $
+# $OpenBSD: Makefile,v 1.3 2005/04/27 18:02:16 deraadt Exp $
# $NetBSD: Makefile,v 1.5 2002/12/13 02:36:37 lukem Exp $
-NOMAN= # defined
+MAN= sgivol.8
+MANSUBDIR=sgi
+.if ${MACHINE} == "sgi"
PROG= sgivol
LDADD+= -lutil
LDSTATIC=-static
+.else
+NOPROG=
+.endif
+
.include <bsd.prog.mk>
diff --git a/sys/arch/sgi/stand/sgivol/sgivol.8 b/sys/arch/sgi/stand/sgivol/sgivol.8
new file mode 100644
index 00000000000..5f3316ceeb2
--- /dev/null
+++ b/sys/arch/sgi/stand/sgivol/sgivol.8
@@ -0,0 +1,119 @@
+.\" $OpenBSD: sgivol.8,v 1.1 2005/04/27 18:02:16 deraadt Exp $
+.\"
+.\" Copyright (c) 2005 Theo de Raadt
+.\" All rights reserved.
+.\"
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE REGENTS OR CONTRIBUTORS 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 April 27, 2005
+.Dt sgivol 8 sgi
+.Os
+.Sh NAME
+.Nm sgivol
+.Nd installs a volume header on disk
+.Sh SYNOPSIS
+.Nm sgivol
+.Op Fl qf
+.Op Fl i
+.Op Fl h Ar vhsize
+.Ar disk
+.Nm sgivol
+.Op Fl qf
+.Op Fl r Ar vhfilename Ar diskfilename
+.Ar disk
+.Nm sgivol
+.Op Fl qf
+.Op Fl w Ar vhfilename Ar diskfilename
+.Ar disk
+.Nm sgivol
+.Op Fl qf
+.Op Fl d Ar vhfilename
+.Ar disk
+.Sh DESCRIPTION
+.Nm
+is used to initialize, and then add or remove programs from the
+SGI disk volume header.
+.Pp
+The SGI volume header is a disklabel-like structure located at the
+start of a disk.
+It is typically 3135 (512-byte) blocks in size, and can store a
+variety of files inside it, typically boot programs.
+.Pp
+The options are as follows:
+.Bl -tag -width flag_opt
+.It Fl q
+Be quiet about various diagnostic issues.
+.It Fl f
+Force.
+Do not ask yes/no questions.
+.It Fl i
+Initialize a volume header on the supplied device.
+.It Fl h Ar vhsize
+Choose an alternate volume header size, in (512-byte) disk blocks.
+The default is 3135 blocks.
+.It Fl r Ar vhfilename Ar diskfilename
+Locate the file
+.Ar diskfilename
+in the storage space of the volume header, and copy it to the
+standard file
+.Ar vhfilename Ns .
+.It Fl w Ar vhfilename Ar diskfilename
+Copy the standard file
+.Ar vhfilename
+to the filesystem storage space in the volume header, placing
+it there with the name
+.Ar diskfilename Ns .
+.It Fl d Ar vhfilename
+Delete the file
+.Ar vhfilename
+from the filesystem storage space in the volume header.
+.It Ar disk
+The name of the disk containing the partition in which the second-stage
+boot program resides and the first-stage boot program is to be installed.
+This can either be specified in short form (e.g.,
+.Sq sd0
+or as the explicit device node, such as
+.Pa /dev/rsd0c .
+.Pp
+Note that you must be in single-user mode or have your kernel in
+insecure mode (see the
+.Xr sysctl 8
+.Va kern.securelevel
+variable or
+.Pa /etc/rc.securelevel )
+to enable access to the raw partition of a mounted disk.
+.El
+.Pp
+If no special flags are supplied,
+.Nm
+will display the current volume header information.
+.Sh EXAMPLES
+The typical use is
+.Bd -literal -offset indent
+# /usr/mdec/sgivol -f -i sd0
+# /usr/mdec/sgivol -f -w boot /usr/mdec/boot sd0
+.Ed
+.Pp
+.Sh SEE ALSO
+.Xr disklabel 8 ,
+.Xr init 8