Guides Linux 2.6: Compiling and Installing Page 2

Linux 2.6: Compiling and Installing Page 2




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.

Latest Posts

How to Convert a Physical Computer to a Virtual Machine

Many organizations are implementing virtualization technology into their networks to convert physical computers to virtual machines (VM). This helps reduce overall physical hardware costs,...

HPE ProLiant DL380 Gen10: Rack Server Overview and Insight

The HPE ProLiant DL380 series has consistently been a market leader in the server space. The Gen10 released in 2017 further increased HPE's market...

Best Server Management Software & Tools 2021

Finding the best server management software tools for your organization can have a major impact on the success of your business operations. Manually handling...

IBM AS/400: Lasting the Test of Time

Some server operating systems (OS) were built to survive the test of time – the IBM AS/400 is one such system.  The AS/400 (Application System/400)...

What is Disaster Recovery?

The modern organization's heavy dependence on using data to drive their business has made having a Disaster Recovery (DR) plan in place a necessity....

Related Stories