1*c770c5a2Skn.\" $OpenBSD: installboot.8,v 1.6 2022/08/19 08:27:48 kn Exp $ 2ea3f2132Sjsing.\" 3ea3f2132Sjsing.\" Copyright (c) 2013, 2014 Joel Sing 4ea3f2132Sjsing.\" 5ea3f2132Sjsing.\" Permission to use, copy, modify, and distribute this software for any 6ea3f2132Sjsing.\" purpose with or without fee is hereby granted, provided that the above 7ea3f2132Sjsing.\" copyright notice and this permission notice appear in all copies. 8ea3f2132Sjsing.\" 9ea3f2132Sjsing.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10ea3f2132Sjsing.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11ea3f2132Sjsing.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12ea3f2132Sjsing.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13ea3f2132Sjsing.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14ea3f2132Sjsing.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15ea3f2132Sjsing.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16ea3f2132Sjsing.\" 17*c770c5a2Skn.Dd $Mdocdate: August 19 2022 $ 18ea3f2132Sjsing.Dt INSTALLBOOT 8 19ea3f2132Sjsing.Os 20ea3f2132Sjsing.Sh NAME 21ea3f2132Sjsing.Nm installboot 22ea3f2132Sjsing.Nd install bootstrap on a disk 23ea3f2132Sjsing.Sh SYNOPSIS 24ea3f2132Sjsing.Nm installboot 25*c770c5a2Skn.Op Fl nv 2646339098Sjsing.Op Fl r Ar root 27ea3f2132Sjsing.Ar disk 28ea3f2132Sjsing.Op Ar stage1 Op Ar stage2 29*c770c5a2Skn.Nm 30*c770c5a2Skn.Op Fl nv 31*c770c5a2Skn.Fl p 32*c770c5a2Skn.Ar disk 33ea3f2132Sjsing.Sh DESCRIPTION 34ea3f2132Sjsing.Nm 35ea3f2132Sjsinginstalls bootstrap on the specified disk. 36ea3f2132SjsingThe exact process used depends on the system architecture, however there is 37ea3f2132Sjsinggenerally a primary bootstrap (often known as a boot block) and a 38ea3f2132Sjsingsecondary bootstrap (often known as a boot loader). 39ea3f2132SjsingSome architectures only require a single stage bootstrap, which is written to 40ea3f2132Sjsingthe beginning of the disk. 41ea3f2132Sjsing.Pp 42ea3f2132SjsingThe options are as follows: 43ea3f2132Sjsing.Bl -tag -width Ds 44ea3f2132Sjsing.It Fl n 45*c770c5a2SknPerform a dry run - do not actually write to the disk. 46c3e1bf61Skettenis.It Fl p 47c3e1bf61SkettenisPrepare filesystem. 48c3e1bf61SkettenisThis will create a new filesystem on the partition reserved for the 49c3e1bf61Skettenisboot loader on architectures that require one. 5046339098Sjsing.It Fl r Ar root 5146339098SjsingSpecify the mount point of the 5246339098Sjsing.Ar root 5346339098Sjsingfilesystem to operate on, defaulting to 5446339098Sjsing.Ar / . 555c083243Sjmc.It Fl v 565c083243SjmcIncrease verbosity during operation. 57ea3f2132Sjsing.It Ar disk 58ea3f2132SjsingSpecify the 59ea3f2132Sjsing.Ar disk 60ea3f2132Sjsingto install the bootstrap on. 61ea3f2132SjsingThis may be specified using a full pathname, an abbreviated disk form, 62ea3f2132Sjsingor a disklabel UID. 63ea3f2132Sjsing.It Ar stage1 64ea3f2132SjsingSpecify the file to use for the primary bootstrap. 65ea3f2132SjsingIf not specified, the default for this architecture will be used. 66ea3f2132Sjsing.It Ar stage2 67ea3f2132SjsingSpecify the file to use for the secondary bootstrap. 68ea3f2132SjsingIf not specified, the default for this architecture will be used. 69ea3f2132Sjsing.El 70ea3f2132Sjsing.Sh EXAMPLES 71ea3f2132SjsingIn its most basic form, to install bootstrap on 72ea3f2132Sjsing.Ar disk 73ea3f2132Sjsingsd0, using the default primary and secondary bootstrap files: 74ea3f2132Sjsing.Bd -literal -offset 3n 75ea3f2132Sjsing# installboot sd0 76ea3f2132Sjsing.Ed 77ea3f2132Sjsing.Pp 78ea3f2132SjsingTo install bootstrap on an 79ea3f2132Sjsing.Ox 80ea3f2132Sjsingamd64 machine, using 81ea3f2132Sjsing.Ar /usr/mdec/biosboot 82ea3f2132Sjsingas the primary bootstrap and 837762a34bSjsing.Ar /usr/mdec/boot 84ea3f2132Sjsingas the secondary bootstrap: 85ea3f2132Sjsing.Bd -literal -offset 3n 867762a34bSjsing# installboot -v wd0 /usr/mdec/biosboot /usr/mdec/boot 87ea3f2132Sjsing.Ed 88ea3f2132Sjsing.Sh SEE ALSO 89ea3f2132Sjsing.Xr disklabel 8 90