1.\" Copyright (c) 2016 Andriy Gapon 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.Dd July 22, 2020 26.Dt ZFSBOOTCFG 8 27.Os 28.Sh NAME 29.Nm zfsbootcfg 30.Nd "specify zfsboot options for the next boot" 31.Sh SYNOPSIS 32.Nm 33.Ao Ar options Ac 34.Nm 35.Op Fl n Ar name 36.Op Fl k Ar key 37.Op Fl p 38.Op Fl t Ar type 39.Op Fl v Ar value 40.Op Fl z Ar pool 41.Nm 42.Sh DESCRIPTION 43.Nm 44is used to set 45.Xr boot.config 5 Ns -style 46options to be used by 47.Xr zfsboot 8 , 48.Xr gptzfsboot 8 49or 50.Xr loader 8 51the next time the machine is booted. 52Once 53.Xr zfsboot 8 54or 55.Xr gptzfsboot 8 56or 57.Xr loader 8 58reads the information, it is deleted. 59If booting fails, the machine automatically reverts to the previous 60boot configuration. 61The information is stored in a special boot environment area of a ZFS pool. 62.Pp 63If used without arguments, 64.Nm 65will output the current boot configuration, if set. 66.Pp 67The following options are supported by 68.Nm : 69.Bl -tag -width indent 70.It Fl k Ar key 71Define key for 72.Ao key , value Ac 73pair. 74.It Fl n Ar name 75Update nvlist 76.Ar name . 77.It Fl p 78Print all information stored in ZFS pool bootenv area. 79.It Fl t Ar type 80Set type of 81.Ar value 82used in 83.Ao key , value Ac 84pair. 85Currently supported types are: 86.Bl -tag -width indent -compact 87.It Ar DATA_TYPE_BYTE 88.It Ar DATA_TYPE_INT8 89.It Ar DATA_TYPE_UINT8 90.It Ar DATA_TYPE_INT16 91.It Ar DATA_TYPE_UINT16 92.It Ar DATA_TYPE_INT32 93.It Ar DATA_TYPE_UINT32 94.It Ar DATA_TYPE_INT64 95.It Ar DATA_TYPE_UINT64 96.It Ar DATA_TYPE_BOOLEAN_VALUE 97.It Ar DATA_TYPE_STRING 98.El 99.Pp 100If not specified, the default is 101.Ar DATA_TYPE_STRING . 102.It Fl v Ar value 103Define value for 104.Ao key , value Ac 105pair. 106.It Fl z Ar pool 107Operate on 108.Ar pool . 109.El 110.Sh ENVIRONMENT 111.Bl -tag -width vfs.root.mountfrom -compact 112.It Ev vfs.root.mountfrom 113The 114.Xr kenv 1 115variable that identifies a pool for which the options are written. 116.El 117.Sh EXAMPLES 118Try to boot to a new 119.Em boot environment 120without changing the 121.Cm bootfs 122property of a pool: 123.Pp 124.Dl "zfsbootcfg ""zfs:tank/ROOT/newbe:"" 125.Pp 126To clear the boot options: 127.Pp 128.Dl "zfsbootcfg """" 129.Sh SEE ALSO 130.Xr boot.config 5 , 131.Xr bectl 8 , 132.Xr gptzfsboot 8 , 133.Xr loader 8 , 134.Xr zfsboot 8 135.Sh HISTORY 136.Nm 137appeared in 138.Fx 11.1 . 139.Sh AUTHORS 140This manual page was written by 141.An Andriy Gapon Aq Mt avg@FreeBSD.org . 142