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 28, 2025 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 gptzfsboot 8 48or 49.Xr loader 8 50the next time the machine is booted. 51Once 52.Xr gptzfsboot 8 53or 54.Xr loader 8 55reads the information, it is deleted. 56If booting fails, the machine automatically reverts to the previous 57boot configuration. 58The information is stored in a special boot environment area of a ZFS pool. 59.Pp 60If used without arguments, 61.Nm 62will output the current boot configuration, if set. 63.Pp 64The following options are supported by 65.Nm : 66.Bl -tag -width indent 67.It Fl k Ar key 68Define key for 69.Ao key , value Ac 70pair. 71.It Fl n Ar name 72Update nvlist 73.Ar name . 74.It Fl p 75Print all information stored in ZFS pool bootenv area. 76.It Fl t Ar type 77Set type of 78.Ar value 79used in 80.Ao key , value Ac 81pair. 82Currently supported types are: 83.Bl -tag -width indent -compact 84.It Ar DATA_TYPE_BYTE 85.It Ar DATA_TYPE_INT8 86.It Ar DATA_TYPE_UINT8 87.It Ar DATA_TYPE_INT16 88.It Ar DATA_TYPE_UINT16 89.It Ar DATA_TYPE_INT32 90.It Ar DATA_TYPE_UINT32 91.It Ar DATA_TYPE_INT64 92.It Ar DATA_TYPE_UINT64 93.It Ar DATA_TYPE_BOOLEAN_VALUE 94.It Ar DATA_TYPE_STRING 95.El 96.Pp 97If not specified, the default is 98.Ar DATA_TYPE_STRING . 99.It Fl v Ar value 100Define value for 101.Ao key , value Ac 102pair. 103.It Fl z Ar pool 104Operate on 105.Ar pool . 106.El 107.Sh ENVIRONMENT 108.Bl -tag -width vfs.root.mountfrom -compact 109.It Ev vfs.root.mountfrom 110The 111.Xr kenv 1 112variable that identifies a pool for which the options are written. 113.El 114.Sh EXAMPLES 115Try to boot to a new 116.Em boot environment 117without changing the 118.Cm bootfs 119property of a pool: 120.Pp 121.Dl "zfsbootcfg ""zfs:tank/ROOT/newbe:"" 122.Pp 123To clear the boot options: 124.Pp 125.Dl "zfsbootcfg """" 126.Sh SEE ALSO 127.Xr boot.config 5 , 128.Xr bectl 8 , 129.Xr gptzfsboot 8 , 130.Xr loader 8 131.Sh HISTORY 132.Nm 133appeared in 134.Fx 11.1 . 135.Sh AUTHORS 136This manual page was written by 137.An Andriy Gapon Aq Mt avg@FreeBSD.org . 138