Now, we take a look at how to install to ZFS using bsdinstall.
### Installation of ZFS in an auto layout As it is described in the manual, to the first half (PREAMBLE), if describe the environment variable _"ZFSBOOT_DISKS"_ instead of _"PARTITIONS"_, ZFS allows you to install to.However, care must be taken of the following two points.
- If you want to automatically install, set environment variable _"nonInteractive"_.
- It needs to be _export_ environment variables _"ZFSBOOT_DISKS"_ and _"nonInteractive"_.
#### First half (PREAMBLE) ```sh export ZFSBOOT_DISKS=ada0 export nonInteractive="YES" DISTRIBUTIONS="base.txz kernel.txz"
### Installation of ZFS in a custom layout Set environment variable _"ZFSBOOT_DATASETS"_, it seems that you can create a ZFS layout freely.For now, we will try to split /, /tmp, /usr, /var.
#### First half (PREAMBLE) ```sh export ZFSBOOT_DISKS=ada0 export ZFSBOOT_DATASETS=" /ROOT mountpoint=none /ROOT/default mountpoint=/
/tmp mountpoint=/tmp,exec=on,setuid=off /usr mountpoint=/usr,canmount=off /var mountpoint=/var,canmount=off
" export nonInteractive="YES” DISTRIBUTIONS="base.txz kernel.txz”