Originally Published: Wednesday, 14 February 2001 Author: Katharine McCoy and Brian Richardson
Published to: interact_articles_live/Live! Page: 1/1 - [Std View]

New Linux Kernel Introduced

The "2.4: A Kernel Odyssey" presentation at LinuxWorld 2001 New York was an overview of the 2.4.0 kernel and its various features. This live presentation by Brian Richardson introduced the audience to the new Linux kernel by stepping through the kernel configuration process.

Outside, it was a cold and rainy day. Inside, though, the convention center was bustling with warm bodies and even warmer servers. Tucked away in the .org pavilion was the Linux.com booth. The staff was rushing around, making sure all of the final details were ready, to the theme of "2001: A Space Odyssey."

The "2.4: A Kernel Odyssey" presentation at LinuxWorld 2001 New York was an overview of the 2.4.0 kernel and its various features. This live presentation by Brian Richardson introduced the audience to the new Linux kernel by stepping through the kernel configuration process.

This Linux.com Live! presentation demonstrated how to upgrade an existing Linux system to use the 2.4 kernel. Our demonstration machine was a VA Linux workstation (PIII 850 MHz, 384 MB RAM, 20 GB IDE disk) running Storm Linux ('Hail' version 2.06).

Sit back, relax, and enjoy this retelling of Linux.com's epic kernel presentation.

Before an unsuspecting victim was selected from the audience, Brian explained a few things that you have to do to prepare for recompiling your kernel. One of the most important things to do is check to see exactly what type of hardware you have on your computer. When you configure the kernel for your system, you have to be able to tell it what hardware you have on your system, so that it knows how to communicate with your specific system. Take a look at all of the files in /proc. This will have all of the information about your system, just make sure you know how to interpret it. Also, you can find out exactly what you have if you keep all of the paperwork that companies send you with your computer or with the different components. If you have any other questions about preparing your computer for a recompile, take a look at Brian Richardson's article Before downloading the kernel source code, it is also a good idea to upgrade modutils. The modutils package contains utilities used to load modules for the Linux kernel. Since the 2.4 kernel changed the location of some modules, certain devices may not work unless a newer version is installed. This software can be downloaded from rpmfind, freshmeat, or kernel.org.

Downloading the Kernel
Once you have finished preparing for the recompile, you will need to download the kernel source code. There are two places you can go for this. You can go to the Linux Kernel Archives or you can go to one of the mirrors of this site. You will need to download either linux-2.4.x.tar.gz or linux-2.4.x.tar.bz2. For our demonstration, we downloaded linux-2.4.0.tar.gz and for the rest of this event we will refer to this file.

Note: The kernel is distribution independent. It does not matter which distribution you are running on your computer, you will need the same kernel for all of them.

For the sake of time constraints, we completed all of these above tasks before the event. As soon as Brian finished going through these events, we asked the audience for a volunteer. A few people hesitantly raised their hands, unsure of what they were volunteering for. Our volunteer had never actually compiled a kernel before, the perfect victim for our plans. The participant sat down in front of the computer and began the kernel configuration process.

Prepping for the New Kernel
One of the most important things that you must remember when you are preparing to compile the kernel is that you must be root on your system. If you are not currently root, then type in su and the system will prompt you for the root password. Once you are root, type in cd /usr/src. This will move you to the source directory. You will then need to copy linux-2.4.0.tar.gz into this directory. When this is copied, look at the contents of this directory. Make sure there are no symbolic links called 'linux'. If there are, remove them by typing rm /usr/src/linux.

Unpacking the Kernel
Once the symbolic link is removed, we then needed to unpack the kernel source. When it is downloaded, it is packed into a tarball. For Windows users, this is the same thing as zipping a file. In order to unpack the kernel source, type tar xvzf linux-2.4.0.tar.gz. This will unpack the kernel source into the directory you are in, so make sure that you are in the /usr/src directory. This creates the directory /usr/src/linux, which contains the 2.4.0 kernel source tree.

The /usr/src/linux directory should be renamed to refer to the kernel version; type mv /usr/src/linux /usr/src/linux-2.4.0. This keeps the kernel source organized, in case you keep more than one version available. Now create a symbolic link to the 2.4.0 kernel tree. In order to create the symbolic link, type ln -s /usr/src/linux-2.4.0 /usr/src/linux. You will now need to change to the new directory; type cd /usr/src/linux.

Running Config You are now in the new directory. Now comes the long, but necessary process of configuring the kernel. You will need to run one of the configuration tools so that the computer knows what parts of the kernel to compile, what to keep as modules or what to not worry about. There are three different configuration tools that a user can run.

Once xconfig is started, the kernel options are presented as a series of menus. We will list all of these categories in italics. If you don't know what something does, click on the help button. This will explain the option. If you are still stumped, read the last line of the help description ... this will usually tell you if you need the option or not.

Every kernel option has one of three selectable states:

Note: If an option is 'greyed out', it is dependent on another options which has been turned off.

Once you have gotten through all of these options, you will be returned to the main menu. Please click 'Save & Exit' ... that's 'Save & Exit', not just 'Exit'. If you exit without saving, you will have lost all of the information that you had and you'll have to go through the process of running the config tool all over again.

Compiling the Kernel
We finally got through the whole xconfig tool. Since we still had an audience, we figured we were doing something right. We had also gotten to the really important part. It was time to compile the kernel. Before we actually compiled it, though, we needed to quickly modify LILO so that if something went wrong, we could still boot into the stable version that was still in the computer.

In order to do this, we had our victim ... er, volunteer change to the /boot directory. We then found the symbolic link 'vmlinuz.' Our older kernel version was 2.2.15, so we created a link from /boot/vmlinuz-2.2.15 to stable (ln-s vmlinuz-2.2.15 stable). Once this link is created, you will need to edit /etc/lilo.conf using your preferred text editor. You will create a new set of instructions, to create /boot/stable as well as the /boot/linux. Save the changes, exit the editor and then type 'lilo' to reconfigure the boot loader.

Don't worry folks ... almost finished. It is now time to type the commands that will compile the kernel on your system. You have a couple choices in how you type these commands. You can either type them one at a time, or you can put them together, separating each part with just a space. Listed below are both ways of doing this.

make dep
make clean
make install
make modules
make modules_install


make dep clean install modules modules_install

Note: you can also create a boot floppy using the make bzfloppy command

After these commands finished running their course, we were done (kernel compile time is dependent on system speed ... this took about 7 minutes on our computer). The computer was rebooted and 'linux' was selected from lilo at boot.

The 2.4.0 kernel compile was a success! The demonstration machine booted straight to Linux ... we were even able to use the USB keyboard. Thanks to our willing victim and the help of our audience members (and remote audience on IRC), we were able to get through the entire compiling process.

Out presentation had the support of a trained presenter and several hard-core Linux geeks. But you don't need an entire Linux convention to compile a kernel. If you ever run into any kernel problems and can not find the solution on your own, there are channels that you can go to on IRC that have people who can help. Both #kernelnewbies and #linuxhelp on irc.openprojects.net are good places to go searching for help. Even if they can not answer your question directly, these folks will be able to give you a web page to that will help.