Strict Standards: Declaration of RSS::DoAction() should be compatible with CMSModule::DoAction($name, $id, $params, $returnid = '') in /home/xandaorg/public_html/modules/RSS/RSS.module.php on line 114

Strict Standards: Non-static method PageInfoOperations::LoadPageInfoByContentAlias() should not be called statically in /home/xandaorg/public_html/index.php on line 154

Warning: Cannot modify header information - headers already sent by (output started at /home/xandaorg/public_html/modules/RSS/RSS.module.php:114) in /home/xandaorg/public_html/index.php on line 299
Xanda - /dev/project - Compiling Linux kernel 2.6

Compiling customer kernel has its own advantages and disadvantages. However newbies find it difficult to compile kernel. Compiling kernel needs to understand few things and then just type couple of commands and you are done. This step by step howto covers compiling Linux kernel version 2.6

Get Latest Linux kernel code

Visit http://kernel.org/ and download the latest source code. File name would be linux-w.x.yy.z.tar.bz2, where w.x.yy.z is actual version number. For example file linux-2.6.13.2.tar.bz2 represents 2.6.13.2 kernel version. Use wget command:

$ cd /tmp
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-w.x.yy.z.tar.bz2

Note replace w.x.yy.z with actual version number.

Extract tar (.tar.bz3) file with following command:

# tar -xjvf linux-2.6.13.2.tar.bz2 -C /usr/src
# cd /usr/src

Configure kernel

Before you configure kernel make sure you have development tools (gcc compilers) are installed on your system.

Once you are sure that you got all compilers and tools, you can start kernel configuration by typing the following command:

$ make menuconfig

You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.

Compile kernel

Start compiling to create a compressed kernel image:

$ make
Start compiling to kernel modules:

$ make modules

Install kernel modules (become a root user, use su command):

$ su -

# make modules_install

Install kernel

So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.

# make install

It will install three files into /boot directory as well as modification to your kernel grub configuration file:

System.map-2.6.13.2
config-2.6.13.2
vmlinuz-2.6.13.2

Create an initrd image:

# cd /boot
# mkinitrd -o initrd.img-2.6.13.2 2.6.13.2

initrd images contains device driver which needed to load rest of the operating system later on. Not all computer requires initrd, but it is safe to create one.

Modify Grub configuration file - /boot/grub/menu.lst:

# vi /boot/grub/menu.lst

title           Debian GNU/Linux, kernel 2.6.13.2 Default

root (hd0,0)

kernel /boot/vmlinuz root=/dev/hdb1 ro

initrd /boot/initrd.img-2.6.13.2

savedefault

boot

Remember to setup correct root=/dev/hdXX device. Save the file. If you think editing and writing all lines by hand is too much for you then try out update-grub command to update the lines for each kernel in /boot/grub/menu.lst file. Just type command:

# update-grub

Reboot computer and boot into your new kernel.