# Minimum Modules To Build For Custom ZFS Kernel?



## dave (Mar 3, 2012)

In the handbook for building a custom kernel, it says you can use MODULES_OVERRIDE or WITHOUT_MODULES to build only modules that need building.  Can anyone advise as to what make.conf config to use in order to set KVA_PAGES for use with a custom ZFS kernel on Intel?


----------



## phoenix (Mar 3, 2012)

KVA_PAGES is a kernel config option. You don't put it in /etc/make.conf. You put it in the config file for your custom kernel, then you compile and install the custom kernel.


----------



## dave (Mar 3, 2012)

Perhaps my question was not worded clearly.

I know that KVA_PAGES goes in the kernel conf.  I have done that.  What I am trying ask here is how to minimize the build time for a kernel with no other changes than KVA_PAGES.


----------



## dave (Mar 3, 2012)

Answering my own question with a little help: Since, as you say, KVA_PAGES is a kernel config option, I guess I can put NO_MODULES in make.conf to build only the kernel?  Going to try that.


----------



## phoenix (Mar 3, 2012)

Note: if you do that, you most likely won't be able to load kernel modules from the old kernel. Kernel options tend to propagate through to all the kernels built with that kernel.  While it might seem like a great time-saving shortcut (only compile new kernel based on GENERIC+KVA_PAGES, use modules from GENERIC), if you load module via loader.conf, rc.conf, or the shell, you may end up wasting even more time trying to track down weird incompatibilities.

Nothing wrong with testing the theory, though.


----------



## dave (Mar 3, 2012)

Good to know.  Going to test the theory, since I'm not working on a production machine.


----------

