From owner-freebsd-doc@FreeBSD.ORG Thu Dec 6 20:30:01 2012 Return-Path: Delivered-To: freebsd-doc@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 634211A8 for ; Thu, 6 Dec 2012 20:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 376408FC15 for ; Thu, 6 Dec 2012 20:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qB6KU1Cn061552 for ; Thu, 6 Dec 2012 20:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qB6KU1Zr061551; Thu, 6 Dec 2012 20:30:01 GMT (envelope-from gnats) Resent-Date: Thu, 6 Dec 2012 20:30:01 GMT Resent-Message-Id: <201212062030.qB6KU1Zr061551@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bas Smeelen Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4971E51 for ; Thu, 6 Dec 2012 20:22:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CC46B8FC17 for ; Thu, 6 Dec 2012 20:22:42 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB6KMg2k034411 for ; Thu, 6 Dec 2012 20:22:42 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qB6KMg6a034410; Thu, 6 Dec 2012 20:22:42 GMT (envelope-from nobody) Message-Id: <201212062022.qB6KMg6a034410@red.freebsd.org> Date: Thu, 6 Dec 2012 20:22:42 GMT From: Bas Smeelen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: docs/174244: [patch] faq: why-kernel-big X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2012 20:30:01 -0000 >Number: 174244 >Category: docs >Synopsis: [patch] faq: why-kernel-big >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Dec 06 20:30:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Bas Smeelen >Release: 9.1 >Organization: >Environment: >Description: update faq and add more information >How-To-Repeat: >Fix: Index: en_US.ISO8859-1/books/faq/book.xml =================================================================== --- en_US.ISO8859-1/books/faq/book.xml (revision 40284) +++ en_US.ISO8859-1/books/faq/book.xml (working copy) @@ -4114,18 +4114,27 @@ - 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. + GENERIC kernels shipped with &os; 7.x 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 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: + 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 simply do not want to build a debug kernel, make + sure that both of the following are true: + You do not have a line in your kernel configuration @@ -4142,9 +4151,30 @@ 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. >Release-Note: >Audit-Trail: >Unformatted: