GuidesLinux 2.6: Go Configure

Linux 2.6: Go Configure

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.




When we last talked about Linux 2.6 Kernel we left off at giving our new 2.6 kernel a unique name, so we can tell it apart from our other kernels. In this third, and final, salute to the new kernel, we’ll get into the gnarly part — configuration (and we’ll also cover patching kernels, so you’ll know how to keep your new kernels up-to-date).

Configuration is the most tedious, time-consuming part of the process. Howerver, it’s extremely important, so don’t gloss over it. If you leave things out, you’ll have to go through all this again.

Now you may think of yourself an old Linux pro, but the steps for building a 2.6 kernel are different than 2.4, so pay attention.
We wrap up our series on the Linux 2.6 Kernel with a dive into the gnarly act of configuration and take a peek at patching the new kernel.

Before we leap into the fun stuff, we need to review a couple of items from Part 1 of our trilogy. Remember the command for unpacking the compressed kernel archive:

$ bzcat linux-2.6.3.tar.bz2 | tar -xvf –

Yes, this is the olden way, as a kind reader pointed out. Use it if you have an elderly tar that does not support bzip2 archives. Modern editions of tar support bzip2 directly. The modern way:

$ tar xvjf linux-2.6.3.tar.bz2

Part 1 says to use gcc 2.95.3. I have received reports of using gcc versions up to 3.3 successfully. Your mileage may vary.

The Steps So Far

  1. Obtain kernel source code, and download it into ~/src
  2. Make sure gcc, GNU make, binutils, util-linux, and module-init-tools are up-to-date
  3. Make hard copies of dmesg, lscpi, and lsusb
  4. Backup any existing .config file (there may not be one)
  5. Run make mrproper to restore the source directory to a pristine state
  6. Edit ../linux-2.6.3/Makefile to give the new kernel a unique name, like EXTRAVERSION =new-name

module-init-tools replaces modutils in the 2.6 kernel. You can have both on your system. And, in addition to being well-armed with printouts of lscpi and dmesg, it is also wise to capture lsusb:

$ lsusb -v | lpr

lsusb is part of usbutils.

Configuration
This is the most tedious, time-consuming part. Howerver, it’s extremely important, so don’t gloss over it. If you leave things out, you’ll have to go through all this again. It is tempting to recycle your 2.4 .config, and run make oldconfig, but don’t. The 2.4 and 2.6 kernels are quite different; this is asking for trouble.

>> Configure From Scratch

This article was originally published on CrossNodes.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories