zfsbootcfg
—
specify zfsboot options for the next boot
zfsbootcfg |
[-n name]
[-k key]
[-p ] [-t
type] [-v
value] [-z
pool] |
zfsbootcfg
is used to set
boot.config(5)-style
options to be used by
zfsboot(8),
gptzfsboot(8)
or
loader(8)
the next time the machine is booted. Once
zfsboot(8)
or
gptzfsboot(8)
or
loader(8)
reads the information, it is deleted. If booting fails, the machine
automatically reverts to the previous boot configuration. The information is
stored in a special boot environment area of a ZFS pool.
If used without arguments, zfsbootcfg
will
output the current boot configuration, if set.
The following options are supported by
zfsbootcfg
:
-k
key
- Define key for ⟨key, value⟩ pair.
-n
name
- Update nvlist name.
-p
- Print all information stored in ZFS pool bootenv area.
-t
type
- Set type of value used in ⟨key, value⟩
pair. Currently supported types are:
- DATA_TYPE_BYTE
-
- DATA_TYPE_INT8
-
- DATA_TYPE_UINT8
-
- DATA_TYPE_INT16
-
- DATA_TYPE_UINT16
-
- DATA_TYPE_INT32
-
- DATA_TYPE_UINT32
-
- DATA_TYPE_INT64
-
- DATA_TYPE_UINT64
-
- DATA_TYPE_BOOLEAN_VALUE
-
- DATA_TYPE_STRING
-
If not specified, the default is
DATA_TYPE_STRING.
-v
value
- Define value for ⟨key, value⟩ pair.
-z
pool
- Operate on pool.
Try to boot to a new boot environment without changing the
bootfs
property of a pool:
zfsbootcfg
"zfs:tank/ROOT/newbe:"
To clear the boot options:
zfsbootcfg ""
zfsbootcfg
appeared in FreeBSD
11.1.