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