We can download the required Linux kernel source code from kernel.org
I am downloading the linux-126.96.36.199.tar.bz2 source file.
Now I become the root user by su . Since the downloaded file is in compressed format, we need to extract the contents. Now since it is a source code we need to move the contents to /usr/src directory.
Now I just moved into that directory by cd /usr/src .
Since the source will be searched using the keyword as “linux”, we can create a link to this directory with the name “linux”.
ln -s linux-188.8.131.52/ linux
Now we can just get into this directory by just,
Now I need a configuration file. The configuration file can be seen under /boot as config-2.6.26-2-686
So we can copy that file from /boot to file named config ( NOTE : we must currently be under the “linux” directory )
Since I’ve got the config file for the new kernel, I can now make changes on what modules need to be built-in and what modules shoud be integrated manually by using “modprobe”. To make these modifications, type make menuconfig
Ah..Oh.. I forgot to install the ncurses which brings up the Graphical User Interface used for this purpose.. So let’s first install the ncurses…
apt-get install libncurses5-dev ( if not sure about the package name, just check it using apt-cache search ncurses )
Now let me install the required building libraries to avoid any further issues…
apt-get install build-essentials
Now again try the make menuconfig
Cool… The GUI has appeared…
The changes to be made at this point can be learnt from the documentation provided by Debian.
First we need to check the processor type and its features, Since I’m using an Intel x86 architectured system I need to make the Generic x86 support as built-in by marking as * against it.
Now I need to check the File Systems, so I make both Second extended fs support and Ext3 journaling file system support as built-in by marking * against both of them.
Now since I have made these as built-in, these modules will be effective right from the boot-up… I need not use modprobe for these modules to take effect.
To make these changes to take effect we use the command make
This command reads the .config file from /boot. The .config file is created as a result of menuconfig
make modules_install ( to install the other modules required… ) /lib/modules/184.108.40.206/kernel/
make install ( this will copy the config-220.127.116.11 , System-map-18.104.22.168, vmlinuz-22.214.171.124 to /boot)
mkinitramfs -o initrd.img-126.96.36.199 188.8.131.52 (this will create the initrd.img-184.108.40.206 file in /boot)
edit the /boot/grub/menu.lst file to add the newly created initrd image…
title Debian GNU/Linux, kernel 220.127.116.11
kernel /vmlinuz-18.104.22.168 root=/dev/sda1 ro
reboot the system and try to boot into the new kernel…