Difference between revisions of "Kernel configuration"

From LFScript
Line 44: Line 44:
 
Recent development versions of LFS require you to include support for <code>devtmpfs</code>:
 
Recent development versions of LFS require you to include support for <code>devtmpfs</code>:
  
<pre>Device Drivers --->
+
<pre>Device Drivers --->
   Generic Driver Options --->
+
   Generic Driver Options --->
 
     Maintain a devtmpfs filesystem to mount at /dev</pre>
 
     Maintain a devtmpfs filesystem to mount at /dev</pre>
 +
 +
You should also be sure to include support for the file systems you want to use when you install your system:
 +
 +
<pre>File systems --->
 +
  Second extended fs support
 +
  Ext3 journalling file system support
 +
  The Extended 4 (ext4) filesystem</pre>
 +
 +
If you want to build a Live CD of your system, you also need SquashFS support:
 +
 +
<pre>File systems --->
 +
  Miscellaneous filesystems --->
 +
    SquashFS 4.0 - Squashed file system support --->
 +
      Include support for ZLIB compressed file systems
 +
      Include support for LZO compressed file systems
 +
      Include support for XZ compressed file systems</pre>
 +
 +
=== fsOS Live CD ===
 +
 +
In the <code>fsos</code> folder in LFScript, there is a text file called <code>kernel.features</code>. It contains a complete list of everything selected for the [[fsOS]] Live CD.
  
 
== Saving your configuration ==
 
== Saving your configuration ==
  
 
== Using your configuration with LFScript ==
 
== Using your configuration with LFScript ==

Revision as of 22:48, 31 January 2012

Configuring your kernel is something that is often overlooked by new LFScript users. However, it is very important that you create a configuration file. It often makes the difference between a usable system and one that only gives you a kernel panic.

Downloading the kernel source

LFScript is capable of downloading all source code you need, automatically. The Linux kernel is part of the basic LFS system, which means that the next command will also download the kernel source for you:

./lfscript -BS

All source code is saved to the sources directory.

cd sources

Configuring the kernel

Extract your kernel source, and enter the source directory:

tar xf linux-3.*.tar.bz2
cd linux-3.*

It is recommended that you clean the source tree first:

make mrproper

Next, create a default configuration. This is not strictly necessary, but it gives you a basis to build your own configuration on:

make defconfig

The kernel source comes with a configuration tool included called menuconfig. Menuconfig has an ncurses based text user interface, which allows easy selection of the features you like to include in your kernel.

If your host system does not have the ncurses development package installed, the command may fail. On Ubuntu, for example you may need to run the next command, prior to make menuconfig:

sudo apt-get install ncurses-dev

Then, start the configuration tool:

make menuconfig

You can navigate the menu using the up and down keys, pressing enter to enter a submenu.

To select an option to include in the kernel, press Y. The option should become prefixed with a checked box: [*].

Important things to include

Recent development versions of LFS require you to include support for devtmpfs:

Device Drivers --->
  Generic Driver Options --->
     Maintain a devtmpfs filesystem to mount at /dev

You should also be sure to include support for the file systems you want to use when you install your system:

File systems --->
  Second extended fs support
  Ext3 journalling file system support
  The Extended 4 (ext4) filesystem

If you want to build a Live CD of your system, you also need SquashFS support:

File systems --->
  Miscellaneous filesystems --->
    SquashFS 4.0 - Squashed file system support --->
      Include support for ZLIB compressed file systems
      Include support for LZO compressed file systems
      Include support for XZ compressed file systems

fsOS Live CD

In the fsos folder in LFScript, there is a text file called kernel.features. It contains a complete list of everything selected for the fsOS Live CD.

Saving your configuration

Using your configuration with LFScript