next up previous contents
Next: 7.5 Compiling the Kernel Up: 7. Building a New Previous: 7.3 Loadable Kernel Modules   Contents

7.4 Configuring for the compile

Once you chosen your kernel source, next step is to configure for your compile. This is just a simple outline of the steps. It will not include a discussion of the various options to configuring the kernel, those documents already exist, on your system. See the Kernel-HOWTO on your system, for more detailed information. It's usually located in the HOWTO directory at /usr/doc/HOWTO. You must be in the top level kernel source directory /usr/src/linux and you must be logged in as root, to compile a kernel. Again you have some choices.

make config
You can answer questions in sequence from the command line by using the command
root@localhost # make config
One by one, you will be asked a series of questions to determine the options for options to prepare the configuration file /usr/src/linux/.config . The drawback to make config is that if you make a wrong choice you will have to start over. You can't go back with make config

make menuconfig
This is a curses based program, similar to the graphical programs used to set up Red Hat Linux. To begin simply:
root@localhost # make menuconfig
This is a pretty straightfoward configuration interface, that allows you to go forward and backward through the configuration questions, until you have everything just right for your system. You can even run make menuconfig in a virtual console.

make xconfig
This is an X based program for setting up you configuration file, before compiling your kernel.
There is a small trick for running make xconfig, if like me, you don't run X as root. Open an xterm and su - to become root. If you run are running the default bash shell export DISPLAY=0:0 to allow you to run X applications as root while, logged into X as a regular user.
Of course you will still have to cd /usr/src/linux so you are in the right directory, then make xconfig will start the X interface to configure the kernel.


next up previous contents
Next: 7.5 Compiling the Kernel Up: 7. Building a New Previous: 7.3 Loadable Kernel Modules   Contents