From owner-freebsd-doc@FreeBSD.ORG Thu Dec 6 21:36:35 2012 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26C97BFD for ; Thu, 6 Dec 2012 21:36:35 +0000 (UTC) (envelope-from b.smeelen@ose.nl) Received: from mail.ose.nl (mail.ose.nl [212.178.134.164]) by mx1.freebsd.org (Postfix) with ESMTP id 7AFC98FC14 for ; Thu, 6 Dec 2012 21:36:33 +0000 (UTC) X-Footer: b3NlLm5s Received: from localhost ([127.0.0.1]) by mail.ose.nl (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for freebsd-doc@freebsd.org; Thu, 6 Dec 2012 22:36:26 +0100 Message-ID: <50C10FDA.7040003@ose.nl> Date: Thu, 06 Dec 2012 22:36:26 +0100 From: Bas Smeelen User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-doc@freebsd.org Subject: Re: docs/174244: [patch] faq: why-kernel-big References: <201212062022.qB6KMg6a034410@red.freebsd.org> In-Reply-To: <201212062022.qB6KMg6a034410@red.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 21:36:35 -0000 Delete: for more information. (after reading Writing style) Changed patch below. 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 + + 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.