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 www.kernel.org

wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.3.tar.bz2

please check on kernel.org 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
Schermata Terminale1 How to Building and Installing a Custom Kernel version 3

confirm the load
Schermata Terminale2 How to Building and Installing a Custom Kernel version 3

save and exit
Schermata Terminale4 How to Building and Installing a Custom Kernel version 3

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


.

share save 120 16 How to Building and Installing a Custom Kernel version 3

3 comments:

  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?

    -JD

  2. https://twitter.com/mackay530

    When you have an structured strategy, arranging your activities properly according to your existing home and work life,
    you can expect to steer clear of mayhem, rushed days, as well as unexpected occurrences.
    In fact, it is best for you long-term health to find a diet that gets
    you the maximum nutrients for the minimum calories.

    I’ve had a customer of mine decide to give up his long
    time love of chocolate, and decide to just focus on calorie counting, minor exercise, and portion sizing.

Lascia un Commento

L'indirizzo email non verrà pubblicato.

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>