How to add zfs support to FreeBSD?

Polytropon freebsd at
Tue Feb 19 00:56:04 UTC 2013

On Mon, 18 Feb 2013 16:57:14 -0500, Fbsd8 wrote:
> Fbsd8 wrote:
> > The handbook does not cover how to add zfs support.
> > 
> > How is it done?
> Let me reword. If zfs is in the base system why does it not show up
> when I look for it this way?
> if config -x $( sysctl -n kern.bootfile ) | grep -q 
> '^[[:space:]]*options[[:space:]]\{1,\}ZFS\>'; then
>    echo "yes zfs is in the kernel"
> fi

Without the ability to check this, I strongly assume that
if you enable ZFS as described in the Handbook, the module
/boot/kernel/zfs.ko (part of the default system) will be
loaded. That's why it won't show up in a sysctl query
aimed at the _kernel_ itself -- because it isn't in the

Also, "sysctl -n kern.bootfile" will return the actual
kernel file, /boot/kernel/kernel, which is a binary. If
the exact config list (from the kernel _configuration_
file) is not plain-text part of that file, grep will not
find the text you're grepping for.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list