1.\" $OpenBSD: installboot.8,v 1.11 2010/03/06 16:16:42 jmc Exp $ 2.\" $NetBSD: installboot.8,v 1.2 1997/04/06 08:41:11 cgd Exp $ 3.\" 4.\" Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. 5.\" Copyright (c) 1995 Paul Kranenburg 6.\" All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. All advertising materials mentioning features or use of this software 17.\" must display the following acknowledgement: 18.\" This product includes software developed by Paul Kranenburg. 19.\" 3. The name of the author may not be used to endorse or promote products 20.\" derived from this software without specific prior written permission 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32.\" 33.Dd $Mdocdate: March 6 2010 $ 34.Dt INSTALLBOOT 8 alpha 35.Os 36.Sh NAME 37.Nm installboot 38.Nd install disk bootstrap software 39.Sh SYNOPSIS 40.Nm installboot 41.Op Fl nv 42.Ar boot 43.Ar bootxx 44.Ar rawdiskdevice 45.Sh DESCRIPTION 46The 47.Nm installboot 48utility prepares a disk for bootstrapping. 49.Pp 50The OpenBSD/alpha disk bootstrap software is split into two parts: 51a small first-stage boot program that is written into the disklabel 52area of a disk 53.Po 54and hence is limited in size to 7680 bytes 55.Pc , 56and a second-stage boot program that resides in the filesystem proper 57.Po 58typically with the name 59.Pa /boot 60.Pc . 61The first-stage boot program is loaded into memory by the SRM console 62software. 63After receiving control of the system, it loads the second-stage boot 64program from a set of filesystem block numbers that have been 65hard-coded into it by 66.Nm installboot . 67The second-stage boot program locates and loads the kernel. 68.Pp 69The second-stage boot program and the prototype code for the 70first-stage boot program can be found in 71.Pa /usr/mdec/boot 72and 73.Pa /usr/mdec/bootxx , 74respectively. 75.Pa /usr/mdec/boot 76may be installed simply by copying it to the root directory of the 77partition you wish to boot from, but after it is installed 78.Nm installboot 79.Em must 80be run. 81.Pp 82The options recognized by 83.Nm installboot 84are as follows: 85.Bl -tag -width flag 86.It Fl n 87Do not actually write anything on the disk. 88.It Fl v 89Verbose mode. 90.El 91.Pp 92The arguments are: 93.Bl -tag -width rawdiskdevice 94.It Ar boot 95The name of the second-stage boot program in the file system 96where the first-stage boot program is to be installed. 97.It Ar bootxx 98The name of the prototype file for the first-stage boot program. 99.It Ar rawdiskdevice 100The name of the device corresponding to the raw whole-disk partition (the 101.Dq raw partition ) 102of the disk on which the first-stage boot program is to be installed. 103.El 104.Sh EXAMPLES 105.Pa boot 106resides in the FFS file system mounted on 107.Pa / 108from 109.Dq sd0a , 110you would install the first-stage boot program on the disk 111(and therefore make the disk bootable) by using the command: 112.Bd -literal -offset indent 113# cp /usr/mdec/boot /boot 114# /usr/mdec/installboot -n -v /boot /usr/mdec/bootxx /dev/rsd0c 115.Ed 116.Pp 117And if the information supplied looks right, run the above without the 118.Fl n 119flag. 120.Sh SEE ALSO 121.Xr disklabel 8 , 122.Xr init 8 , 123.Xr sysctl 8 124.Sh HISTORY 125The alpha 126.Nm 127command first appeared in 128.Nx 1.2 . 129.Sh BUGS 130The OpenBSD/alpha boot blocks can only load kernels from disks' 131.Dq a 132partitions. 133(However, the second-stage boot program may be located on any FFS file system 134partition on the disk.) 135