[BACK]Return to installboot.8 CVS log [TXT][DIR] Up to [local] / src / usr.sbin / installboot

File: [local] / src / usr.sbin / installboot / installboot.8 (download)

Revision 1.6, Fri Aug 19 08:27:48 2022 UTC (21 months, 1 week ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.5: +8 -4 lines

Split -p into own synopsis

Platform-dependent preparation of the filesystem required by the boot loader
only ever creates a new fileystem without instaling using any bootstrap files.

To reflect reality, turn
	# installboot -nvp vnd0
	Using / as root
	would install bootstrap on /dev/rvnd0c
	using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
	would newfs 545c9bdf92aa18f9.i

into
	# ./obj/installboot -nvp vnd0
	would newfs 4db2c0e89e0d3268.i

and error out if -p is combined with -r or stages:
	$ man -hl./installboot.8
	installboot [-nv] [-r root] disk [stage1 [stage2]]
	installboot [-nv] -p disk

Feedback OK millert

.\"	$OpenBSD: installboot.8,v 1.6 2022/08/19 08:27:48 kn Exp $
.\"
.\" Copyright (c) 2013, 2014 Joel Sing
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 19 2022 $
.Dt INSTALLBOOT 8
.Os
.Sh NAME
.Nm installboot
.Nd install bootstrap on a disk
.Sh SYNOPSIS
.Nm installboot
.Op Fl nv
.Op Fl r Ar root
.Ar disk
.Op Ar stage1 Op Ar stage2
.Nm
.Op Fl nv
.Fl p
.Ar disk
.Sh DESCRIPTION
.Nm
installs bootstrap on the specified disk.
The exact process used depends on the system architecture, however there is
generally a primary bootstrap (often known as a boot block) and a
secondary bootstrap (often known as a boot loader).
Some architectures only require a single stage bootstrap, which is written to
the beginning of the disk.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl n
Perform a dry run - do not actually write to the disk.
.It Fl p
Prepare filesystem.
This will create a new filesystem on the partition reserved for the
boot loader on architectures that require one.
.It Fl r Ar root
Specify the mount point of the
.Ar root
filesystem to operate on, defaulting to
.Ar / .
.It Fl v
Increase verbosity during operation.
.It Ar disk
Specify the
.Ar disk
to install the bootstrap on.
This may be specified using a full pathname, an abbreviated disk form,
or a disklabel UID.
.It Ar stage1
Specify the file to use for the primary bootstrap.
If not specified, the default for this architecture will be used.
.It Ar stage2
Specify the file to use for the secondary bootstrap.
If not specified, the default for this architecture will be used.
.El
.Sh EXAMPLES
In its most basic form, to install bootstrap on
.Ar disk
sd0, using the default primary and secondary bootstrap files:
.Bd -literal -offset 3n
# installboot sd0
.Ed
.Pp
To install bootstrap on an
.Ox
amd64 machine, using
.Ar /usr/mdec/biosboot
as the primary bootstrap and
.Ar /usr/mdec/boot
as the secondary bootstrap:
.Bd -literal -offset 3n
# installboot -v wd0 /usr/mdec/biosboot /usr/mdec/boot
.Ed
.Sh SEE ALSO
.Xr disklabel 8