kernel 2.6 compile steps

I decided to compile my own kernel 2.6 compile steps for my centos. Here are the steps I have followed and which worked without any errors.

Goto kernel.org for the list of kernel source available

http://kernel.org/pub/linux/kernel/v2.6/ 

Download the one you like to the directory /usr/src

If you are using wget and by chance you got disconnected and if you wanted to continue from the last point you stopped use the command with -c option

wget -c [kernelsourceurl]

You can also apply the patch which can be downloaded from this Index page of kernel source. Applying patch is little bit tricky, another interesting thing I noticed is the revert function if you have already applied the patch, here are the steps

normally patch comes in bzip or gzip format, use the command bunzip2 or gunzip to extract the patch you can also do without extracting it but lets do it straight. First goto the extracted source directory of the kernel

/usr/src/kernel-2.6

patch -p1 < .../patch-2.6  #this ../patch-2.6 is the exact path of patch file 

and in order revert the patch use the command

patch -R -p1 < ../patch-2.6

Now start the steps for compilation


make menuconfig #select the options you want
make
make_modules
make install      #this will ensure that bzImage is copied, initrd image is made and the grub.conf is edited.

In order to boot the new kernel you need to edit default=0 in grub.conf but since you are unsure that it will work or not you can do a workaround to boot your compiled only once, that means in the next boot if the compiled kernel didn’t comes up you again do a reboot and then the previous kernel will be loaded.

Issue following commands

grub --no-floppy

and at the grub prompt

grub>savedefault --default=0 --once

If the new kernel boots up without any error you can edit the grub.conf to make this new kernel as the default one permanently.

Are you looking to HIRE REMOTE LINUX ENGINEER to solve kernel 2.6 compile steps?

We provide you with professional developers based on your requirements. Our team of Linux developers are experienced in providing lot of useful and exciting ideas to users across the globe at very affordable rate with high quality services for more information visit us www.sparksupport.com

Leave a Reply

Your email address will not be published. Required fields are marked *