From owner-svn-doc-all@FreeBSD.ORG Sun Jan 13 06:11:31 2013 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9CE27A67; Sun, 13 Jan 2013 06:11:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 846148BE; Sun, 13 Jan 2013 06:11:31 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0D6BVZt031854; Sun, 13 Jan 2013 06:11:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0D6BVNb031853; Sun, 13 Jan 2013 06:11:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201301130611.r0D6BVNb031853@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 Jan 2013 06:11:31 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r40602 - head/en_US.ISO8859-1/books/faq X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2013 06:11:31 -0000 Author: eadler Date: Sun Jan 13 06:11:30 2013 New Revision: 40602 URL: http://svnweb.freebsd.org/changeset/doc/40602 Log: Update and expand on the why-kernel-big question in the handbook. PR: docs/174244 Submitted by: Bas Smeelen Approved by: bcr (mentor) Modified: head/en_US.ISO8859-1/books/faq/book.xml Modified: head/en_US.ISO8859-1/books/faq/book.xml ============================================================================== --- head/en_US.ISO8859-1/books/faq/book.xml Sun Jan 13 06:09:00 2013 (r40601) +++ head/en_US.ISO8859-1/books/faq/book.xml Sun Jan 13 06:11:30 2013 (r40602) @@ -3297,17 +3297,27 @@ kern.timecounter.hardware: TSC -> i82 - Chances are, you compiled your kernel in debug - mode. Kernels built in debug mode contain many - symbols that are used for debugging, thus greatly increasing - the size of the kernel. Note that there will be little or - no performance decrease from running a debug kernel, and it - is useful to keep one around in case of a system - panic. - - However, if you are running low on disk space, or you - simply do not want to run a debug kernel, make sure that - both of the following are true: + GENERIC kernels shipped with &os; and later are compiled + in debug mode. Kernels built in debug mode + contain many symbols in separate files that are used for + debugging, thus greatly increasing the size of + /boot/kernel/ + Note that there will be little or no performance loss + from running a debug kernel, and it is useful to keep one around + in case of a system panic. + + However, if you are running low on disk space, there are + different options to reduce the size of /boot/kernel/. + + If you do not want the symbol files to be installed, + make sure you have the following line present in /etc/src.conf: + + WITHOUT_KERNEL_SYMBOLS=yes + + For more information see &man.src.conf.5 + + If you do not want to build a debug kernel, make + sure that both of the following are true: @@ -3325,9 +3335,32 @@ kern.timecounter.hardware: TSC -> i82 Either of the above settings will cause your kernel to be built in debug mode. As long as you make sure you follow - the steps above, you can build your kernel normally, and you - should notice a fairly large size decrease; most kernels - tend to be around 1.5 MB to 2 MB. + the steps above, you can build your kernel normally + + If you want only the modules you use to be built + and installed, make sure you have a line like below in + /etc/make.conf: + + MODULES_OVERRIDE= accf_http ipfw + + Replace accf_httpd ipfw with a list + of modules you need. Only these modules will be built. This + does not only reduce the size of the kernel directory but + also decreases the amount of time needed to build your kernel. + For more information see + /usr/share/examples/etc/make.conf + + + You can also remove unneeded devices from your kernel + to further reduce the size. See + for more information. + + To put any of these options into effect you will have + to build and install + your new kernel. + + Most kernels (/boot/kernel/kernel) + tend to be around 12 MB to 16 MB.