pages tagged bootBitPipelinehttp://www.bitpipeline.eu/tags/boot/BitPipelineikiwiki2013-02-23T13:58:14ZBooting faster without kernel moduleshttp://www.bitpipeline.eu/Blog/20130223-GenkernelFasterBoot/2013-02-23T13:58:14Z2013-02-23T13:58:14Z
<p>I use <code>genkernel</code> (<a href="http://www.gentoo.org/doc/en/genkernel.xml">docs</a> <a href="http://wiki.gentoo.org/wiki/Genkernel">wiki</a>) to automate the process of compiling the Linux kernel and building and installing a <a href="http://en.gentoo-wiki.com/wiki/Initramfs"><code>initramfs</code></a> to be loaded as a <code>ramdisk</code>. It works fine.</p>
<p>There was just one pet peeve with it: when booting the <code>ramdisk</code> it would always look for all the modules of hardware storage and file systems and try to load them. This is a safe procedure as it make sure that the computer will boot with everything working.</p>
<p>So while looking at the options available at the configuration file <code>/etc/genkernel.conf</code> I came across one that looked promising:</p>
<pre><code># Don't copy any modules to the ramdisk
RAMDISKMODULES="0"
</code></pre>
<p>Whenever I configure a new kernel I always tailor it for the target host and include all the needed hardware support that it needs to successfully boot in the kernel instead of as a module. This means that the kernel image might be a bit bigger than if everything was a module, but it's faster to boot.</p>
<p>I gave it a shot and created a new initramfs without any modules and...</p>
<p>... it works great. The boot is a faster and afterwards the kernel space is not "polluted" with modules that are not in use at the moment (such as jfs, xfs and RAID modules).</p>