Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Linux
I am having problem in the compilation of the kernel in ubunto? so please help...
Posted 23-Mar-13 0:51am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

First of all, download the kernel package you like from or from the Ubuntu repositories.
If you want the official kernel patched by the Ubuntu Team, just type:
sudo apt-get install linux-tree
In this case we'll use the latest stable vanilla kernel version available.
For the compile process you'll need the following packages on Ubuntu:
sudo apt-get update
   sudo apt-get install build-essential
   sudo apt-get install kernel-package
   sudo apt-get install gcc
   sudo apt-get install libncurses5
   sudo apt-get install libncurses5-dev
   sudo apt-get install libqt3-mt-dev
Now untar the package:
cd /usr/src
   sudo tar --bzip2 -xvf linux-2.6.12.tar.bz2
Create the following symlink:
sudo ln -s /usr/src/linux-2.6.12 /usr/src/linux
   cd /usr/src/linux
Now you can start customizing your kernel configuration; there two way, the first one is graphical, the second one pseudo-graphical:
sudo make xconfig
sudo make menuconfig
Then, after having finished the customization, we have to start the compile process:
sudo make-kpkg clean
   sudo make-kpkg --append-to-version=-custom kernel_image modules_image
The revision flag is optional and is just useful to edit the kernel name showed through uname -r. You can write whatever you want instead of "-custom".
There's also another interesting and useful flag, that is --initrd. The vanilla kernel is not enable yet to make use of initrd properly, and in fact there's a patch for this. The Ubuntu official kernel is a vanilla kernel patched with some patches among which there's the one for initrd. So, if you are compiling a vanilla kernel, you should take --initrd out; otherwise, if you are compiling a Ubuntu kernel, you can make use of initrd and you probably would that.
Note that now you'll have a .deb package in /usr/src ready to be installed as any other package through a simple double-click.
Grub will be updated automatically.
So, just type:
sudo dpkg -i kernel-image-2.6.12-custom_10.00.Custom_i386.deb

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 23 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100