SHARE
Facebook X Pinterest WhatsApp

Linux 2.6: Compiling and Installing Page 2

Written By
thumbnail Carla Schroder
Carla Schroder
Sep 1, 2020
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



Download and Unpack Your Shiny New Kernel Sources

Get the latest stable 2.6 kernel from The Linux Kernel Archives. Click on the “F” to get the complete kernel source. It’s a 32 MB download, and it unpacks to 172MB. Download and unpack it somewhere in your /home directory. The traditional way is create ~/src, and unpack it in there:

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

Be sure to review the Documents directory. There are bales of good information in there. README gives installation instructions. Next, it’s a good idea to make printouts of your hardware information, you will need it. Make a hard copy of /etc/fstab, and print out the output of lscpi:

$ lspci | lpr

and dmesg:

$ dmesg | lpr

If the margins are too small, use lpr -o page-left=72 -o page-right=72 to set them at one inch.

Check your /usr/src directory for a .config file. There won’t be one if you’ve never compiled a kernel on the system. If it does exist, make a backup copy, because it’s going to be overwritten. Then run

$ make mrproper

This resets the source directory to a pristine state, giving our new kernel a clean start.

Configuration

First, find ../linux-2.6.3/Makefile and edit it. At the very beginning are these lines:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 3
EXTRAVERSION =
NAME=Feisty Dunnart

Yes, the 2.6.3 kernel is really named Feisty Dunnart. What we want to do here is give EXTRAVERSION a unique value, so we can quickly identify this kernel. This can be anything, even -shiny-new-test-kernel, and after it’s all built and installed, the kernel name will look like this:

$ uname -r
2.6.3-shiny-new-test-kernel

We’re almost there. If you can’t wait for the next installment and want to leap ahead, keep in mind that almost all of the steps in building a kernel can, and should, be done as an ordinary, unprivileged user. Only two steps require root privileges: running make modules_install and editing the boot loader.

Resources
2.6.2 aka “Feisty Dunnart” release announcement
The Kernel-HOWTO

This article was originally published on CrossNodes.

thumbnail Carla Schroder

Carla Schroder is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
6 Best Linux Virtualization Software for 2024
What Is a Network Policy Server (NPS)? | Essential Guide
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.