Showing posts with label Kernel. Show all posts
Showing posts with label Kernel. Show all posts

How To Compile Linux Kernel On Ubuntu

linux OS

This time I will share about how to upgrade our ubuntu kernel. Incidentally, I also recently upgraded my ubuntu 11:10 kernel from 3.0.0 to 3.3.7. Actually there are several ways you can do:

  1. With the command sudo "apt-get dist-upgrade" on our terminals , < === this is done while online .
  2. Using the debian package , click here to find out how. < ==== Complicated for those who do not want to compile .
  3. Compiling our own kernel download, this one method that I will discuss at this time

Okay, we just started .
First we check first the latest kernel that has been stable at kernel.org . When I check its, the latest stable version immediately wrote is 3.3.7.
Next, still in the preparation stage perform the following steps :
Make sure we have updated GCC , done with the command
$ Sudo apt-get install gcc
Install ncurses development package
$ Sudo apt-get install libncurses5-dev
Then update the system
$ Sudo apt-get update && sudo apt-get upgrade
The second step :
Extract the kernel that we downloaded earlier to the folder /usr/src .
$ Sudo tar -xvf linux-3.3.7.tar.bz2 -C /usr/src/
Now we go into the folder .
$ cd /usr/src/linux-3.3.7/
$ sudo make menuconfig

The above command is used to configure the Linux kernel . After you run the command , you will get a pop up with a list of the menu and you can choose which items to a new configuration . If you are familiar with the configuration menu only check the ext4 file system and check if it ticked / selected or not . If not , select and save the configuration . See screen shot below for menuconfig .

compile kernel

 If you've completed and save, now compiling the kernel:
$ sudo make
 For installation command:
$ sudo make install modules_install
Now check the files in the folder / boot / if already there :

  • System.map-3.3.7
  • vmlinuz-3.3.7
  • initrd.img-3.3.7
  • config-3.3.7

If you can not find the file initrd.img-3.3.7 then you just need to make it .
$ Sudo update-initramfs -u -k 3.3.7

then restart your computer , then check with the command "uname -r".
kernel uname

How to Upgrade Ubuntu 12.04 Kernel With Debian Package

Ubuntu latest kernel has been released, it's time to upgraded our kernel. First downloaded the latest kernel in kernel.ubuntu.com. What we need is:
  1. linux-headers
  2. linux-headers-generic
  3. linux-image-generic
If you are using 32bit system, what you need is:
If you are using 64bit system, what you need is:
After The download completed, open the terminal and cd into directory that you have the new kernel and than use command “dpkg -i kernel-name”. 
  • for linux-headers


$ sudo dpkg -i linux-headers-3.2.0-030200_3.2.0-030200.201201042035_all.deb


  • for linux-headers-generic
$ sudo dpkg -i linux-headers-3.2.0-030200-generic_3.2.0-030200.201201042035_i386.deb

  • for linux-image-generic

$ sudo dpkg -i linux-image-3.2.0-030200-generic_3.2.0-030200.201201042035_i386.deb

If you got somes error, try to install module-init-tools 3.13 first, klik to download the module. And try again to install the kernel. After done rebbot your computer and you can check the new kernel with command “uname -r“.

oke thanks, keep learning and go OpenSource.