Date: Thu, 6 Dec 2012 20:22:42 GMT From: Bas Smeelen <b.smeelen@ose.nl> To: freebsd-gnats-submit@FreeBSD.org Subject: docs/174244: [patch] faq: why-kernel-big Message-ID: <201212062022.qB6KMg6a034410@red.freebsd.org> Resent-Message-ID: <201212062030.qB6KU1Zr061551@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 @@ </question> <answer> - <para>Chances are, you compiled your kernel in <emphasis>debug - mode</emphasis>. 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.</para> + <para>GENERIC kernels shipped with &os; 7.x and later are compiled + in <emphasis>debug mode</emphasis>. 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.</para> - <para>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:</para> + <para>However, if you are running low on disk space, there are + different options to reduce the size of /boot/kernel/.</para> + <para>- If you do not want the symbol files to be installed, + make sure you have the following line present in /etc/src.conf: + + <programlisting>WITHOUT_KERNEL_SYMBOLS=yes</programlisting> + + For more information see &man.src.conf.5</para> + + <para>- If you simply do not want to build a debug kernel, make + sure that both of the following are true:</para> + <itemizedlist> <listitem> <para>You do not have a line in your kernel configuration @@ -4142,9 +4151,30 @@ <para>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.</para> + the steps above, you can build your kernel normally</para> + + <para>- 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:</para> + + <programlisting>MODULES_OVERRIDE= accf_http ipfw</programlisting> + + <para>Replace <emphasis>accf_httpd ipfw</emphasis> 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 + </para> + + <para>- You can also remove unneeded devices from your kernel + to further reduce the size. See <xref linkend="make-kernel" + remap="another section"/>for more information.</para> + + <para>To put any of these options into effect you will have + to build and install your new kernel.</para> + + <para>Most kernels (/boot/kernel/kernel) + tend to be around 12 MB to 16 MB.</para> </answer> </qandaentry> >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212062022.qB6KMg6a034410>