1*3af2acdcSchristos.\" $NetBSD: sgivol.8,v 1.10 2017/02/17 22:30:28 christos Exp $ 2c916a07bSrumble.\" 3c916a07bSrumble.\" Copyright (c) 2006 Stephen M. Rumble 4c916a07bSrumble.\" All rights reserved. 5c916a07bSrumble.\" 6c916a07bSrumble.\" Redistribution and use in source and binary forms, with or without 7c916a07bSrumble.\" modification, are permitted provided that the following conditions 8c916a07bSrumble.\" are met: 9c916a07bSrumble.\" 1. Redistributions of source code must retain the above copyright 10c916a07bSrumble.\" notice, this list of conditions and the following disclaimer. 11c916a07bSrumble.\" 2. The name of the author may not be used to endorse or promote products 12c916a07bSrumble.\" derived from this software without specific prior written permission. 13c916a07bSrumble.\" 14c916a07bSrumble.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15c916a07bSrumble.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16c916a07bSrumble.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17c916a07bSrumble.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18c916a07bSrumble.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19c916a07bSrumble.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20c916a07bSrumble.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21c916a07bSrumble.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22c916a07bSrumble.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23c916a07bSrumble.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24c916a07bSrumble.\" 25*3af2acdcSchristos.Dd February 17, 2017 2643148f18Sreed.Dt SGIVOL 8 sgimips 27c916a07bSrumble.Os 28c916a07bSrumble.Sh NAME 29c916a07bSrumble.Nm /usr/mdec/sgivol 30c916a07bSrumble.Nd configure SGI Volume Header 31c916a07bSrumble.Sh SYNOPSIS 32c916a07bSrumble.Nm 33183497f4Swiz.Op Fl fq 34c916a07bSrumble.Ar device 35c916a07bSrumble.Nm 36183497f4Swiz.Op Fl fq 37c916a07bSrumble.Fl i 38c916a07bSrumble.Op Fl h Ar vhsize 39c916a07bSrumble.Ar device 40c916a07bSrumble.Nm 41183497f4Swiz.Op Fl fq 42c916a07bSrumble.Fl r 43c916a07bSrumble.Ar vhfilename 44c916a07bSrumble.Ar diskfilename 45c916a07bSrumble.Ar device 46c916a07bSrumble.Nm 47183497f4Swiz.Op Fl fq 48c916a07bSrumble.Fl w 49c916a07bSrumble.Ar vhfilename 50c916a07bSrumble.Ar diskfilename 51c916a07bSrumble.Ar device 52c916a07bSrumble.Nm 53183497f4Swiz.Op Fl fq 54c916a07bSrumble.Fl d 55c916a07bSrumble.Ar vhfilename 56c916a07bSrumble.Ar device 57c916a07bSrumble.Nm 58183497f4Swiz.Op Fl fq 5914ac8bdbSrumble.Fl m 6014ac8bdbSrumble.Ar vhfilename 6114ac8bdbSrumble.Ar vhfilename 6214ac8bdbSrumble.Ar device 6314ac8bdbSrumble.Nm 6414ac8bdbSrumble.Op Fl fq 65c916a07bSrumble.Fl p 66c916a07bSrumble.Ar partno 67c916a07bSrumble.Ar partfirst 68c916a07bSrumble.Ar partblocks 69c916a07bSrumble.Ar parttype 70c916a07bSrumble.Ar device 71c916a07bSrumble.Sh DESCRIPTION 72c916a07bSrumbleThe 73c916a07bSrumble.Nm 74c916a07bSrumbleprogram prepares an SGI Volume Header to be used to boot 75c916a07bSrumble.Nx . 76c916a07bSrumbleThe 77a35cefceSjoerg.Tn SGI 78c916a07bSrumblePROM is able to load executables within the header, which in turn are used 79c916a07bSrumbleto load the kernel from another file system. 80c916a07bSrumble.Sh OPTIONS 81c916a07bSrumbleThe following options are available: 82c916a07bSrumble.Bl -tag -width 123456 83c916a07bSrumble.It Fl f 84183497f4SwizForce the operation. 85183497f4SwizDo not ask the user before proceeding. 86c916a07bSrumble.It Fl h 872a39a221SwizSet the size of the newly initialized volume header in blocks. 88c916a07bSrumbleOne block is 512 bytes. 89c916a07bSrumbleThe default volume header size is 3135 blocks (1.53MB). 90c916a07bSrumble.It Fl q 91c916a07bSrumbleSuppress output. 92c916a07bSrumble.El 93c916a07bSrumble.Sh PARTITION TYPES 94c916a07bSrumbleThe numerical partition types for the volume header include: 95c916a07bSrumble.Bd -unfilled -offset indent 96c916a07bSrumble 0: Volume Header 97ca8778bcSrumble 1: Replicated Tracks 98ca8778bcSrumble 2: Replicated Sectors 99c916a07bSrumble 3: Raw 1002a39a221Swiz 4: BSD4.2 file system 1012a39a221Swiz 5: SysV file system 102ca8778bcSrumble 6: Entire Volume (all disk blocks) 103c916a07bSrumble 7: EFS 104ca8778bcSrumble 8: Logical Volume 105ca8778bcSrumble 9: Raw Logical Volume 106c916a07bSrumble 10: XFS 107c916a07bSrumble 11: XFS Log 108ca8778bcSrumble 12: XLV Volume 109ca8778bcSrumble 13: XVM Volume 110c916a07bSrumble.Ed 111c916a07bSrumble.Sh EXAMPLES 112c916a07bSrumbleTo display the existing volume header and partition table on disk 113183497f4Swiz.Dq sd0 : 114c916a07bSrumble.Dl Ic sgivol sd0 115c916a07bSrumble.Pp 1162a39a221SwizTo initialize a new volume header 42 512-byte blocks large on disk 117183497f4Swiz.Dq sd0 : 118c916a07bSrumble.Dl Ic sgivol -i -h 42 sd0 119c916a07bSrumble.Pp 120c916a07bSrumbleTo copy a file 121183497f4Swiz.Pa boot 122c916a07bSrumblefrom the volume header to local file 123183497f4Swiz.Pa /tmp/boot 124c916a07bSrumbleon disk 125183497f4Swiz.Dq sd0 : 126c916a07bSrumble.Dl Ic sgivol -r boot /tmp/boot sd0 127c916a07bSrumble.Pp 128c916a07bSrumbleTo copy a local file 129183497f4Swiz.Pa /usr/mdec/ip2xboot 130c916a07bSrumbleto the volume header as 131183497f4Swiz.Pa boot 132c916a07bSrumbleon disk 133183497f4Swiz.Dq sd0 : 134c916a07bSrumble.Dl Ic sgivol -w boot /usr/mdec/ip2xboot sd0 135c916a07bSrumble.Pp 136c916a07bSrumbleTo delete the existing file 137183497f4Swiz.Pa boot 138c916a07bSrumblefrom the volume header on disk 139183497f4Swiz.Dq sd0 : 140c916a07bSrumble.Dl Ic sgivol -d boot sd0 141c916a07bSrumble.Pp 14214ac8bdbSrumbleTo move (rename) an existing file 14314ac8bdbSrumble.Pa file1 14414ac8bdbSrumbleto 14514ac8bdbSrumble.Pa file2 14614ac8bdbSrumblein the volume header on disk 14714ac8bdbSrumble.Dq sd0 : 14814ac8bdbSrumble.Dl Ic sgivol -m file1 file2 sd0 14914ac8bdbSrumble.Pp 150c916a07bSrumbleTo change partition 0 to type 4 (BSD4.2) beginning at block offset 3200 151c916a07bSrumbleand continue for 28000 blocks on disk 152183497f4Swiz.Dq sd0 : 153c916a07bSrumble.Dl Ic sgivol -p 0 3200 28000 4 sd0 154c916a07bSrumble.Sh SEE ALSO 155*3af2acdcSchristos.Xr sgimips/boot 8 156