docs/174244: [patch] last one faq: why-kernel-big
Bas Smeelen
b.smeelen at ose.nl
Thu Dec 6 23:07:25 UTC 2012
:) another "for information" removed
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,30 @@
</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
+ <filename class="directory">/boot/kernel/</filename>.
+ 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
+ <filename class="directory">/boot/kernel/</filename>.</para>
+ <para>- If you do not want the symbol files to be installed,
+ make sure you have the following line present in <filename>
+ /etc/src.conf</filename>:
+
+ <programlisting>WITHOUT_KERNEL_SYMBOLS=yes</programlisting>
+
+ 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 +4154,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
+ <filename>/etc/make.conf</filename>:</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. See
+ <filename>/usr/share/examples/etc/make.conf</filename>. This
+ does not only reduce the size of the kernel directory but
+ also decreases the amount of time needed to build your kernel.
+ </para>
+
+ <para>- You can also remove unneeded devices from your kernel
+ to further reduce the size. See <xref linkend="make-kernel"
+ remap="another section"/></para>
+
+ <para>To put any of these options into effect you will have
+ to build and install your new kernel.</para>
+
+ <para>Most kernels (<filename>/boot/kernel/kernel</filename>)
+ tend to be around 12 MB to 16 MB.</para>
</answer>
</qandaentry>
More information about the freebsd-doc
mailing list