How to Building and Installing a Custom Kernel version 3

In some cases you might want to compile your own kernel that suits your needs better than the standard kernel that comes with your distribution. I will describe how to do this on a Debian like machine , ( ubuntu family) in only 10 easy step!

1) To compile a kernel in “the Debian way”, you need some packages like fakeroot, and a few others which are probably already installed

apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential udev

2) go in the right directory in accordig to FSSTND standard (Filesystem standard)

cd /usr/src/

yuo can go in other dirctory but isn’t the best chois

3) download the latest kernel version from


please check on the latest version in this tutorial i use 3.0.3

4) extract it in a sub folder and enter in the folder


tar xjf linux-3.0.3.tar.bz2
cd linux-3.0.3


5) clear all

make clean && make mrproper && make-kpkg clean

the command “make clean” will remove all the object and kernel object files (ending in .o and .ko) and a few other things; “make mrproper” will do everything “make clean” does, plus remove your config file, the dependency files, and everything else that make config creates.
and finally the command “make-kpkg clean” Cleans the kernel source directory of all files created by tar get build, and runs a make distclean.

6) will use the settings of the kernel in use (the .config) and pass the new

cp /boot/config-`uname -r` ./.config

7) Loads the settings you just saved

make menuconfig

is one of tools,that can configure the Linux kernel source, a necessary early step needed to compile the source code. make menuconfig, with a convenient menu user-interface, allows the user to choose the features of the Linux kernel (and other options) that will be compiled. In this case we use it to load the “old configuration”
follow the screenshot

enter in this menu

confirm the load

save and exit

8 ) buid

fakeroot make deb-pkg

Note that to be useful the name of the package must conform to the Debian naming convention: linux-image-< version >-< abi >-< flavor >.this command can take a lot of time !!

9 ) if make instruction is finisch whit success can install all [ image – header -firmware ]

dpkg -i ../linux-*

10 ) reboot the system to load new kernel

after system starting can check the new version whit

uname -a



  1. John doe

    Great tutorial, will try!
    Could you kindly add an example for ” linux-image—” so I get a visual on what’s a good name?


Lascia una risposta

L'indirizzo email non verrà pubblicato.