Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Dec 2012 23:42:13 +0100
From:      Bas Smeelen <b.smeelen@ose.nl>
To:        freebsd-doc@freebsd.org
Subject:   Re: docs/174244: [patch] faq: why-kernel-big
Message-ID:  <50C11F45.3010907@ose.nl>
In-Reply-To: <50C10FDA.7040003@ose.nl>
References:  <201212062022.qB6KMg6a034410@red.freebsd.org> <50C10FDA.7040003@ose.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
add some <filename> tags

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>
+
+        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 +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&nbsp;MB to 2&nbsp;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&nbsp;MB to 16&nbsp;MB.</para>
      </answer>
     </qandaentry>






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50C11F45.3010907>