This is an old revision of the document!
You have an ad0 disk. Create one slice covering the entire disk:
# fdisk -BI /dev/ad0
Initialize the BSDlabel:
# bsdlabel -wB /dev/ad0s1
Edit your label and create a small (like 256MB-512MB) 'a' partition and use the rest for the 'd' partition:
# bsdlabel -e /dev/ad0s1
The 'd' partition will be used for [“ZFS”]:
# zpool create tank ad0s1d
Create bootdir directory where the boot file system will be mounted:
# mkdir /tank/bootdir # ln -s bootdir/boot /tank/boot
Create a UFS file system on /dev/ad0s1a and copy the /boot/ directory onto it:
# newfs /dev/ad0s1a # mount /dev/ad0s1a /tank/bootdir # cp -Rp /boot /tank/bootdir/
Now don't forget to add zfs_load=“YES” to /tank/boot/loader.conf.
Ok, you also need to tell your loader where your root file system is. You can do it by adding:
vfs.root.mountfrom="zfs:tank"
to /tank/boot/loader.conf or you can create /tank/bootdir/etc/fstab file with one entry only:
tank / zfs rw 0 0
On your [“ZFS”] file system, your /etc/fstab (/tank/etc/fstab) should contains the line above and:
/dev/ad0s1a /bootdir ufs rw 0 0
(and everything else, ie. your swap and other file systems)
At the end, set mount point to 'legacy' so [“ZFS”] won't try to mount it automatically:
# zfs set mountpoint=legacy tank