---
name: "zfsbootcfg"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/zfsbootcfg"
---

# zfsbootcfg(8)

specify zfsboot options for the next boot

## NAME

**zfsbootcfg** – specify zfsboot options for the next boot

## SYNOPSIS

**zfsbootcfg** ⟨*options*⟩

**zfsbootcfg** \[**-n** *name*\] \[**-k** *key*\] \[**-p**\] \[**-t** *type*\] \[**-v** *value*\] \[**-z** *pool*\]

**zfsbootcfg**

## DESCRIPTION

**zfsbootcfg** is used to set [boot.config(5)](/boot.config/5.md)-style options to be used by [gptzfsboot(8)](/gptzfsboot/8.md) or [loader(8)](/loader/8.md) the next time the machine is booted. Once [gptzfsboot(8)](/gptzfsboot/8.md) or [loader(8)](/loader/8.md) 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*.

## ENVIRONMENT

- vfs.root.mountfrom

  The [kenv(1)](/kenv/1.md) variable that identifies a pool for which the options are written.

## EXAMPLES

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 ""
```

## SEE ALSO

[boot.config(5)](/boot.config/5.md), [bectl(8)](/bectl/8.md), [gptzfsboot(8)](/gptzfsboot/8.md), [loader(8)](/loader/8.md)

## HISTORY

**zfsbootcfg** appeared in FreeBSD 11.1.

## AUTHORS

This manual page was written by Andriy Gapon ⟨*avg@FreeBSD.org*⟩.
