To many of you in the opinion has given some problem to the installation of the Kernel precompiled with the patch of 200 lines in their machines, this is to be expected, so it is always better to have a kernel directly compiled on our machine than on a third-party machine, so that it takes the correct architecture of our machine and the general configuration of the hardware.
That’s why here I teach the most daring, how to compile your kernel (184.108.40.206) in Ubuntu (tested in Ubuntu 10.10) With the 200 line patch included in the. Remember that you have to do this process at your own risk, it requires a lot of packages to download and a fairly long build time.
To get started, the first thing we need to do is install the dependencies needed to compile the kernel by running the following line on the terminal:
sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge kernel-package
We now run the next line in the terminal, which is needed to compile the kernel (from Intrepid)
sudo apt-get build-dep linux
We end this first step with the installation of other packages needed for compilation
sudo apt-get install libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev
To continue with the kernel installation process, we need to download the source of the latest stable Kernel (220.127.116.11) and the patch Mike Galbraith and place them within our personal directory.
We create a directory for compiling the kernel, place ourselves in it and download the kernel sources from kernel.org:
mkdir kernel-18.104.22.168 cd kernel-22.214.171.124 wget http://kernel.org/pub/linux/kernel/v2.6/linux-126.96.36.199.tar.gz
Now we create a new text file and copy the code found in Mike Galbraith’s post or we can download it from MediaFire, save and close the file:
Now let’s unzip the kernel we just downloaded from kernel.org:
tar xzvf linux-188.8.131.52.tar.gz cd linux-184.108.40.206 patch -p1 < ~/autogroup.patch
At this point everything must go well and without errors, in case of any error you must restart the process.
We will then load the current kernel configuration, so that the new Kernel takes the configuration directly from our system and we have no problem compiling it. However, if you have enough knowledge you can customize the kernel configuration to get a system more tailored to your needs, you can do it.
If you don’t know what you’re doing, you better not manually modify the kernel settings.
We copy the configuration by running the following command in the terminal and then run
so that all the modules loaded in our system run and we make sure that all our hardware is recognized.
cp -vi /boot/config-`uname -r` .config make localmodconfig
At this point the compilation process will ask you several things about the modules, keep accepting all the questions you are asked by pressing Enter until the configuration process is complete.
We continue compiling the kernel by running the following line in the terminal to open the kernel configuration menu:
cp /boot/config-$(uname -r) .config && yes "" | make oldconfig make menuconfig
We can now choose the patches we want to enable in our Kernel, as we are interested in the 200 line patch.
To do this, navigate to the kernel configuration menu that appears, until
and look for the named line
Automatic process group scheduling
, We enable it by pressing the space bar on our keyboard, we position ourselves on the option
using the arrow keys on the keyboard and press the key Enter from our keyboard to exit menu
Now let’s navigate to the menu
and we entered by pressing the key Enter, We look for the option
Compile the kernel with debug info
and deselect it by pressing the space bar on our keyboard, again we go to the option
and we press Enter to exit main menu.
We have already finished the kernel configuration, so we just have to go back to
in the main menu and press Enter to finish the kernel configuration. We accept when you ask us if we want to save the changes made to the kernel configuration by pressing Enter on the Yes option.
Now yes, let’s compile the kernel by running the following line in the terminal:
fakeroot make-kpkg --initrd --append-to-version=-20101209 kernel-image kernel-headers
Please note that the compilation process may vary depending on your hardware
This will generate two .deb packages inside the kernel-220.127.116.11 directory, which we will use to install the new Kernel on our Ubuntu allowing them to be crawled by Synaptic and easily uninstallable.
We come to the final part of this tutorial, where we will install and test the proper functioning of the new Kernel we just installed.
To install the two .deb packages we just generated we need to run the following command in the terminal:
cd .. sudo dpkg -i *.deb
If all went well, we restarted our machine and on the list Grub, We selected the new Kernel (18.104.22.168) and pressed Enter to start the system.
Once we are back on the desktop, we will verify that the 200-line patch is properly applied and working by running the following line on a terminal:
cat /usr/src/linux-headers-22.214.171.124-20101219/.config | grep -i AUTOGROUP
And you have to give us back a line like this:
If so, we have our system running with the kernel 126.96.36.199 and the “Automatic process group scheduling” activated.
We can now stress Ubuntu to the maximum …
This manual comes to you thanks to the effort of FRANCOBEP.