Kernel configuration

From LFScript
Revision as of 20:32, 31 January 2012 by Marcel (talk | contribs)

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 is an ncurses based text user interface, which allows easy selection of the features you like to include in your kernel.

make menuconfig

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

Important things to include

Saving your configuration

Using your configuration with LFScript