zfsboot
is typically installed using
dd(1).
To install
zfsboot
on the
ada0
drive:
dd if=/boot/zfsboot of=/dev/ada0 count=1
dd if=/boot/zfsboot of=/dev/ada0 iseek=1 oseek=1024
If the drive is currently in use, the GEOM safety will prevent writes
and must be disabled before running the above commands:
sysctl kern.geom.debugflags=0x10
zfsboot
can also be installed in an MBR slice:
gpart create -s mbr ada0
gpart add -t freebsd ada0
gpart bootcode -b /boot/boot0 ada0
gpart set -a active -i 1 ada0
dd if=/dev/zero of=/dev/ada0s1 count=2
dd if=/boot/zfsboot of=/dev/ada0s1 count=1
dd if=/boot/zfsboot of=/dev/ada0s1 iseek=1 oseek=1024
Note that commands to create and populate a pool are not shown
in the example above.