1.\" 2.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3.\" 4.\" Copyright (c) 2018 Mateusz Piotrowski <0mp@FreeBSD.org> 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.\" $FreeBSD$ 28.Dd October 30, 2020 29.Dt BEINSTALL.SH 8 30.Os 31.Sh NAME 32.Nm beinstall.sh 33.Nd "install a boot environment using the current FreeBSD source tree" 34.Sh SYNOPSIS 35.Nm 36.Op Ar options Ar ... 37.Sh DESCRIPTION 38.Nm 39installs a boot environment using the current 40.Fx 41source tree. 42.Nm 43also automatically performs 44.Pa /etc 45updates 46(using either 47.Xr etcupdate 8 48or 49.Xr mergemaster 8 ) 50and 51package updates using 52.Xr pkg-upgrade 8 53automatically in the new boot environment sandbox. 54.Pp 55Upon successful completion, the system will be ready to boot into the new boot 56environment. 57Upon failure, the target boot environment will be destroyed. 58In all cases, the running system is left untouched 59and a reboot into a partially updated system 60(due to install or hardware failure) cannot happen. 61Additionally, the full installation process requires 62only one reboot as it is performed 63in a new boot environment. 64.Pp 65.Nm 66requires a fully built world and kernel. 67It also requires 68.Xr pkg 8 , 69which is not present in the base system and has to be installed manually. 70.Pp 71The 72.Ar options 73provided to 74.Nm 75are world and kernel flags like 76.Ev KERNCONF 77as described in 78.Xr build 7 . 79.Sh ENVIRONMENT 80User modifiable variables. 81Set these in the environment if desired: 82.Bl -tag -width indent 83.It Ev BE_UTILITY Pq default: Dq Li "bectl" 84Utility to manage ZFS boot environments. 85This can be either 86.Xr bectl 8 87from the base system or 88.Xr beadm 1 89from ports (sysutils/beadm). 90.It Ev CONFIG_UPDATER Pq default: Dq Li "etcupdate" 91Config updater: 92.Xr etcupdate 8 93and 94.Xr mergemaster 8 95are supported. 96Set to an empty string to skip. 97.It Ev ETCUPDATE_FLAGS Pq default: Dq Li "-F" 98Flags for 99.Xr etcupdate 8 100if used. 101.It Ev MERGEMASTER_FLAGS Pq default: Dq Li "-iFU" 102Flags for 103.Xr mergemaster 8 104if used. 105.It Ev NO_PKG_UPGRADE Pq default: Dq Li "" 106If not empty, 107.Dq Li pkg upgrade 108will be skipped. 109.El 110.Sh FILES 111.Bl -tag -width indent 112.It Sy src/ Ns Pa tools/build/beinstall.sh 113Place where 114.Nm 115lives in the src tree. 116.El 117.Sh SEE ALSO 118.Xr build 7 , 119.Xr development 7 , 120.Xr bectl 8 , 121.Xr etcupdate 8 , 122.Xr mergemaster 8 , 123.Xr pkg 8 124.Sh HISTORY 125.Nm 126is inspired by and similar in function to 127Solaris/illumos-style upgrades. 128.Pp 129The 130.Nm 131manual page first appeared in 132.Fx 12.0 . 133.Sh AUTHORS 134The 135.Nm 136script was implemented by 137.An Will Andrews Aq Mt will@FreeBSD.org . 138This manual page was written by 139.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . 140