1.\" $NetBSD: sgivol.8,v 1.10 2017/02/17 22:30:28 christos Exp $ 2.\" 3.\" Copyright (c) 2006 Stephen M. Rumble 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. The name of the author may not be used to endorse or promote products 12.\" derived from this software without specific prior written permission. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" 25.Dd February 17, 2017 26.Dt SGIVOL 8 sgimips 27.Os 28.Sh NAME 29.Nm /usr/mdec/sgivol 30.Nd configure SGI Volume Header 31.Sh SYNOPSIS 32.Nm 33.Op Fl fq 34.Ar device 35.Nm 36.Op Fl fq 37.Fl i 38.Op Fl h Ar vhsize 39.Ar device 40.Nm 41.Op Fl fq 42.Fl r 43.Ar vhfilename 44.Ar diskfilename 45.Ar device 46.Nm 47.Op Fl fq 48.Fl w 49.Ar vhfilename 50.Ar diskfilename 51.Ar device 52.Nm 53.Op Fl fq 54.Fl d 55.Ar vhfilename 56.Ar device 57.Nm 58.Op Fl fq 59.Fl m 60.Ar vhfilename 61.Ar vhfilename 62.Ar device 63.Nm 64.Op Fl fq 65.Fl p 66.Ar partno 67.Ar partfirst 68.Ar partblocks 69.Ar parttype 70.Ar device 71.Sh DESCRIPTION 72The 73.Nm 74program prepares an SGI Volume Header to be used to boot 75.Nx . 76The 77.Tn SGI 78PROM is able to load executables within the header, which in turn are used 79to load the kernel from another file system. 80.Sh OPTIONS 81The following options are available: 82.Bl -tag -width 123456 83.It Fl f 84Force the operation. 85Do not ask the user before proceeding. 86.It Fl h 87Set the size of the newly initialized volume header in blocks. 88One block is 512 bytes. 89The default volume header size is 3135 blocks (1.53MB). 90.It Fl q 91Suppress output. 92.El 93.Sh PARTITION TYPES 94The numerical partition types for the volume header include: 95.Bd -unfilled -offset indent 96 0: Volume Header 97 1: Replicated Tracks 98 2: Replicated Sectors 99 3: Raw 100 4: BSD4.2 file system 101 5: SysV file system 102 6: Entire Volume (all disk blocks) 103 7: EFS 104 8: Logical Volume 105 9: Raw Logical Volume 106 10: XFS 107 11: XFS Log 108 12: XLV Volume 109 13: XVM Volume 110.Ed 111.Sh EXAMPLES 112To display the existing volume header and partition table on disk 113.Dq sd0 : 114.Dl Ic sgivol sd0 115.Pp 116To initialize a new volume header 42 512-byte blocks large on disk 117.Dq sd0 : 118.Dl Ic sgivol -i -h 42 sd0 119.Pp 120To copy a file 121.Pa boot 122from the volume header to local file 123.Pa /tmp/boot 124on disk 125.Dq sd0 : 126.Dl Ic sgivol -r boot /tmp/boot sd0 127.Pp 128To copy a local file 129.Pa /usr/mdec/ip2xboot 130to the volume header as 131.Pa boot 132on disk 133.Dq sd0 : 134.Dl Ic sgivol -w boot /usr/mdec/ip2xboot sd0 135.Pp 136To delete the existing file 137.Pa boot 138from the volume header on disk 139.Dq sd0 : 140.Dl Ic sgivol -d boot sd0 141.Pp 142To move (rename) an existing file 143.Pa file1 144to 145.Pa file2 146in the volume header on disk 147.Dq sd0 : 148.Dl Ic sgivol -m file1 file2 sd0 149.Pp 150To change partition 0 to type 4 (BSD4.2) beginning at block offset 3200 151and continue for 28000 blocks on disk 152.Dq sd0 : 153.Dl Ic sgivol -p 0 3200 28000 4 sd0 154.Sh SEE ALSO 155.Xr sgimips/boot 8 156