Performancing Metrics

Howto Compile and Install Linux Kernel 3.8 / 3.0 in Ubuntu 12.10, 12.04, 11.10, 11.04 and 10.04

Here in this post I will explain how to compile and install Linux Kernel 3.0 and Linux Kernel 3.x in Ubuntu. Linux Kernel 3.8.8 is the latest stable release and you can download it from kernel.org. If you are new to Linux then I strongly recommend you try with Linux Kernel 3.0 and you can later patch it with Linux Kernel 3.8.8. If you don’t like to compile the kernel, then you can directly install the debian packages Click Here.

Fedora users Click Here.

Update: Follow the same steps to compile and install the Linux Kernel 3.8.8 / 3.7 / 3.6 / 3.4 / 3.2 / 3.0.x in your system.

Dependencies

To compile Linux Kernel the following are required to be installed.

  • gcc latest version,
  • ncurses development package and
  • system packages should be up-to date

To install the dependencies run the following commands in terminal and type the password for the user, when prompted.

For gcc

sudo apt-get install gcc

For ncurses development package

sudo apt-get install libncurses5-dev

After installing the above packages then update your system by running the following command

sudo apt-get update && sudo apt-get upgrade

Now download the Linux Kernel 3.0 from kernel.org or by using the below command.

Note:

If you are trying with Linux Kernel 3.8.3 / 3.7 / 3.4.6 / 3.3 / 3.2 / 3.1 / 3.0.x then just replace the name linux-3.0 with linux 3.8.3 / linux-3.7 / linux-3.4.6 / linux-3.3 / linux-3.2 / linux-3.1 / linux-3.0.x in all commands below. 

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

Once the download complete move to the directory where you have downloaded the kernel package “linux-3.0.tar.bz2“. Now extract the tar file to the location “/usr/src/“.

To move to the directory, for example if the downloaded package is in your Downloads directory. Use the below command.

cd Downloads/

To extract the tar file run the following command. Type the password for the user when prompted.

sudo tar -xvf linux-3.0.tar.bz2 -C /usr/src/

Now move to the directory where the extracted file is, or copy and paste the below command in terminal.

cd /usr/src/linux-3.0/

Now you can configure, compile and install Linux Kernel 3.0 in your system. Run the commands one by one and type the password for the user, when prompted.

To Configure

sudo make menuconfig

The above command is used to configure the Linux kernel. Once you execute the command, you will get a pop up window with the list of menus and you can select the items for the new configuration. If your unfamiliar with the configuration just check for the file systems menu and check whether ext4 is chosen or not, if not select it and save the configuration. Check the screen shot below for menuconfig.

If you like to have your existing configuration then run the below command.

sudo make oldconfig

There are other alternate configuration commands are available and you can find them in README file under linux-3.0 directory.

To Compile

sudo make

The above command is used to compile the Linux Kernel. It will take some time to complete it, approximately 40 min to 50 min it depends on your system configuration.

To Install

sudo make modules_install install

The above command will install the Linux Kernel 3.0 into your system. It will create some files under /boot/ directory and it will automatically make a entry in your grub.cfg. Check whether it made correct entry and check for the files it created.

The files under /boot/ directory are,

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

If you unable to find the initrd.img-3.0.0 file then create it. Run the below command to create it.

sudo update-initramfs -u -k 3.0.0

Update

If the above command unable to update / generate the initramfs then run the following command to create new initramfs.

sudo update-initramfs -c -k 3.0.0

Your grub.cfg file should be like the screen shots(example) below if not edit it.

For Linux Kernel 3.0

For Linux Kernel 3.0.1

To modify the grub.cfg under “/boot/grub/” directory. Open the file using below command.

sudo gedit /boot/grub/grub.cfg

After modifying your grub.cfg, update your grub by running the following command.

sudo update-grub

Restart your system by default it will boot in Ubuntu 3.0.0, you can able to see while booting. To check after booting open a terminal and type

Related Posts Plugin for WordPress, Blogger...

  • Pingback: How to Install Linux Kernel 3.0 in Ubuntu 11.04, 10.10 and 10.04 | How Opensource

  • Pingback: How to Install Linux Kernel 3.0.1 in Ubuntu 11.04, 10.10 and 10.04 | How Opensource

  • Pingback: How to Install / Compile Linux Kernel 3.0 in Fedora 15 and 14 | How Opensource

  • Pingback: How to install kernel 3.1-rc1 in Ubuntu 11.04 and Fedora 15 | How Opensource

  • Pingback: [HowTo] Update / Patch latest kernel in ubuntu and fedora | How Opensource

  • Pingback: [HowTo]Install Kernel 3.1-rc2-oneiric in Ubuntu 11.04, 10.10 and 10.4 | How Opensource

  • Pradeep

    Thanks for a detailed explanation. It really worked as mentioned and I have now updated my kernel on Ubuntu 11.04. Thanks again

    • windsigra

      Did not work on kubuntu 11.10. make and install worked with no errors or problems. I done the 3.1.0 and it shows up in grub.cfg as well has 3 files in boot for 3.1.0 but when i reboot and get grub 1.99 list it only shows linux mint and ubuntu kernel 3.0.12 and 3.0.11 but when check grub.cfg it shows all them even 3.1.0 so i cannot boot into the kernel

      • http://www.howopensource.com Manivannan

        Hi Windsigra,

        Which is your default OS, Linux Mint or Ubuntu. If its Linux Mint, then update your grub in Linux Mint.

        • windsigra

          I changed default…and even when i check it with start-up manager it shows 3.1.0 kernel as default…but when boot up linux mint stays default and 3.1.0 kernel dont show only 3.0.0.12 and 3.0.0.11 and linux mint at top

        • windsigra

          I uninstalled grub 1.99 and reinstalled grub which switch it from linuxmint custom back to ubuntu’s i guessing but eitherway it worked perfect and all show up now.

  • Flex

    $ sudo update-initramfs -u -k 3.0.0

    i had to switch -u to -c in debian so probably in ubuntu too

    root@debianvm:/usr/src/linux-3.1# update-initramfs -u -k 3.1.0-rc4
    /boot/initrd.img-3.1.0-rc4 does not exist. Cannot update.

    • http://www.howopensource.com Manivannan

      Hi Flex,
      Yes, If its unable to update the initramfs file then you need to create it using -c.

      $ sudo update-initramfs -c -k 3.1.0-rc4
      • tobaj

        If you build a new kernel you cannot use ‘update-initramfs -u’ as there is no initramfs to update yet. You can only create a new one ‘… -c’ and then update at some point if necessary..

  • priya jain

    thanks alot
    it really works
    hey i am doing my project on uec iand i sometimes get an error “no address associated with hostname”
    i have tried all the ways change dns nameserver to google and manually enter the ip address of web sites
    but manually entering is a bulky process
    could you help me out
    thanku:)

  • hasan

    When I update initfrafms to 3.0.3 i did not any changes to 3.0.3

    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #

    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
    set have_grubenv=true
    load_env
    fi
    set default=”0″
    if [ "${prev_saved_entry}" ]; then
    set saved_entry=”${prev_saved_entry}”
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi

    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry=”${chosen}”
    save_env saved_entry
    fi
    }

    function recordfail {
    set recordfail=1
    if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }

    function load_video {
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    }

    insmod part_msdos
    insmod ext2
    set root=’(/dev/sda,msdos5)’
    search –no-floppy –fs-uuid –set=root e35f5b30-8654-4a9d-9c7f-1189a7394800
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root=’(/dev/sda,msdos5)’
    search –no-floppy –fs-uuid –set=root e35f5b30-8654-4a9d-9c7f-1189a7394800
    set locale_dir=($root)/boot/grub/locale
    set lang=en_US
    insmod gettext
    if [ "${recordfail}" = 1 ]; then
    set timeout=-1
    else
    set timeout=5
    fi
    ### END /etc/grub.d/00_header ###

    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    ### END /etc/grub.d/05_debian_theme ###

    ### BEGIN /etc/grub.d/10_linux ###
    set linux_gfx_mode=text
    export linux_gfx_mode
    if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
    menuentry ‘Ubuntu, with Linux 2.6.38-8-generic’ –class ubuntu –class gnu-linux –class gnu –class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root=’(/dev/sda,msdos5)’
    search –no-floppy –fs-uuid –set=root e35f5b30-8654-4a9d-9c7f-1189a7394800
    linux /boot/vmlinuz-2.6.38-8-generic root=/dev/sda5 ro quiet splash nomodeset
    GRUB_GFXMODE=1280×800
    video=uvesafb:mode_option=1366×768-24,mtrr=3,scroll=ywrap vt.handoff=7
    initrd /boot/initrd.img-2.6.38-8-generic
    }
    menuentry ‘Ubuntu, with Linux 2.6.38-8-generic (recovery mode)’ –class ubuntu –class gnu-linux –class gnu –class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root=’(/dev/sda,msdos5)’
    search –no-floppy –fs-uuid –set=root e35f5b30-8654-4a9d-9c7f-1189a7394800
    echo ‘Loading Linux 2.6.38-8-generic …’
    linux /boot/vmlinuz-2.6.38-8-generic root=/dev/sda5 ro single
    echo ‘Loading initial ramdisk …’
    initrd /boot/initrd.img-2.6.38-8-generic
    }
    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###

    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry “Memory test (memtest86+)” {
    insmod part_msdos
    insmod ext2
    set root=’(/dev/sda,msdos5)’
    search –no-floppy –fs-uuid –set=root e35f5b30-8654-4a9d-9c7f-1189a7394800
    linux16 /boot/memtest86+.bin
    }
    menuentry “Memory test (memtest86+, serial console 115200)” {
    insmod part_msdos
    insmod ext2
    set root=’(/dev/sda,msdos5)’
    search –no-floppy –fs-uuid –set=root e35f5b30-8654-4a9d-9c7f-1189a7394800
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry “Windows 7 (loader) (on /dev/sda2)” –class windows –class os {
    insmod part_msdos
    insmod ntfs
    set root=’(/dev/sda,msdos2)’
    search –no-floppy –fs-uuid –set=root 90984726984709E4
    chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the ‘exec tail’ line above.
    ### END /etc/grub.d/40_custom ###

    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###

  • hasan

    sorry I forget to say when update grub I got this massage:

    hasan@hasan-HP:/usr/src/linux-3.0.3$ sudo update-grub
    Searching for GRUB installation directory … found: /boot/grub
    /etc/default/grub: line 39: unexpected EOF while looking for matching `”‘

    • http://www.howopensource.com Manivannan

      Hi Hasan,

      I think kernel 3.0.3 is not installed in your system. After running the below command what the output your getting?

      $ sudo make modules_install install

      And can you able to find the files (System.map-3.0.3, vmlinuz-3.0.3, initrd.img-3.0.3, config-3.0.3) under /boot directory.

  • hasan

    Hi . When I run this command I found drivers are installing.
    and I create initrd.img-3.0.3 . The other files exist.
    I thinck your right .it is a problem from my system.
    Thanks.

  • Nix

    actually kernel README specifically says to put source in home directory and not in /usr/src: “Do NOT use the /usr/src/linux area! This area has a (usually incomplete) set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be.”

  • Pingback: Ubuntu Natty with 3.1 kernel « random thoughts

  • Ben

    Hi:

    I tried this, but how do I get /usr/lib/firmware/3.0.0 file.

    In my last step sudo updatre initrm, it gives errors saying missing firmware.

    I hope you are still reading the blog!

    • http://www.howopensource.com Manivannan

      Hi Ben,

      I have not yet come across this error, will check it and come back to you soon. Your using Debian OS isn’t it? Check for the updates.

  • Dastagir

    i did according to ur way. I in grub menu i am missing linux-3.0. and in my /etc/defualt/grub there is no grub. and in /boot/ i found grub.cfg, menu.lst and menu.lst~. what should i do

    • http://www.howopensource.com Manivannan

      Hi Dastagir,

      Make a menuentry in your grub.cfg file. The menuentry should be like the screen shots which i have given under “update-initramfs” step.

      • dastagir

        thanks for ur quick reply. Very good guy. But u said if i unable to find initrd.img-3.0.0 in /boot directory. then i should run sudo update-initramfs -u -k 3.0.0. i found them when i ran sudo make modules_install install. so i didn’t run sudo update-initramfs -u -k 3.0.0. Though i found all four things under /boot directory i am still missing grub in /etc/default directory. and one more thing. i wanna do kernel programming. what are the procedures or steps. thanks again. god bless u

      • Dastagir

        thanks Manivanna. It worked. keep going this good work pls

  • gosia

    Great tutorial. Had problems with kernel for the last few days. Its really helpful for beginner. Thank you

    • Erwin

      Hello, according to the dscription, I installed kernel 3.0.4 for ubuntu 11.10
      No problems with startup, but I need to have :

      ubuntu@ubuntu-Aspire-5000:~$ sudo apt-get install linux-headers-`uname -r`
      Paketlisten werden gelesen… Fertig
      Abhängigkeitsbaum wird aufgebaut
      Status-Informationen einlesen… Fertig
      E: Paket linux-headers-3.0.4 kann nicht gefunden werden
      E: Mittels regulärem Ausdruck »linux-headers-3.0.4« konnte kein Paket gefunden werden
      > linux-headers-3.04 is not available :-(

      and I also see only :
      ubuntu@ubuntu-Aspire-5000:~/rtl2832u-new-3.0$ ls /usr/src
      linux-3.0.4 linux-headers-3.0.0-12 linux-headers-3.0.0-12-generic

      any idea ?

    • http://www.howopensource.com Manivannan

      Hi Gosia,

      Thanks and Welcome to HowOpenSource :)

  • Erwin

    I updated the kernel to 3.0.4 in accordance to the description
    But this didn’t solve the problem with the Cinergy T Stick Black.
    I tried to pick up the installtion process again, but now I get

    ubuntu@ubuntu-Aspire-5000:~/rtl2832u-new-3.0$ make
    make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/home/ubuntu/rtl2832u-new-3.0 modules
    make: *** /usr/src/linux-headers-3.0.4: Datei oder Verzeichnis nicht gefunden. Schluss.
    make: *** [default] Fehler 2
    ubuntu@ubuntu-Aspire-5000:~/rtl2832u-new-3.0$

    which is correct because I also see :
    ubuntu@ubuntu-Aspire-5000:~/rtl2832u-new-3.0$ ls /usr/src
    linux-3.0.4 linux-headers-3.0.0-12 linux-headers-3.0.0-12-generic
    > I now tried to get the …headers-3.0.4 files
    >> But the following didn’t help either

    ubuntu@ubuntu-Aspire-5000:~$ sudo apt-get install linux-headers-`uname -r`
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut
    Status-Informationen einlesen… Fertig
    E: Paket linux-headers-3.0.4 kann nicht gefunden werden
    E: Mittels regulärem Ausdruck »linux-headers-3.0.4« konnte kein Paket gefunden werden
    ubuntu@ubuntu-Aspire-5000:~$
    > translates to : NO linux-headers-3.0.4 packets could be found

    How should I proceed now ? Did I miss someting by upgrading to kernel 3.0.4 ?
    How do I get the linux-headers-3.0.4 ?

    • http://www.howopensource.com Manivannan

      Hi Erwin,

      I am not clear about this errors, Here you are building a new kernel, If you just want to update the kernel to new one (3.1/3.0.4) then you can follow this guide http://www.howopensource.com/.

      • http://www.howopensource.com Manivannan

        Or if you want to install the linux-header-3.0.4, you can download it and install the same way from the above link..

        • Erwin

          Thank you very much, it works now for me. I had missed the above link.

  • hey

    DO NOT EDIT /BOOT/GRUB/GRUB.CFG BY HAND. Instead, do:

    grub-mkconfig > /boot/grub/grub.cfg

    as root.

  • DeMus

    Hi,
    Can somebody explain to me if there are differences, and if so which, between installing a pre-compiled kernel and compile one with the above mentioned instructions?
    I have installed kernels before but always the pre-compiled ones. Now I just wonder will it make a difference?
    Who can help me with this question?

    • JAI sATHISH

      Hi,
      There is difference between pre-compiled kernel and customised kernel.

      In Case of customised kernels,
      the kernel can be customised to work for specific hardware and user needs.

      for e.g you don’t want someone to access the NTFS partition on linux machine..

      Then u can uncheck the NTFS support while customising the kernel.

      Then when booted using customised kernel it cannot mount NTFS…

      By this way customised kernels help in adding drivers for printers, Lan ports etc. for the latest ones which are not supported by pre-compiled kernels..

  • rh15c

    fiuuhhh….got problem while running make, am using ubuntu 10.04 kern 2.6.32, want to upgrade to kern 3.0, i found error while running make and can’t solve it, would you please help me? thanks…

    • http://www.howopensource.com Manivannan

      Hi rh15c,

      What error you got while running make?? paste the error here…

  • Pingback: Kernel question

  • bhavin

    Hi,
    I’m using this method to compile kernel 3.1.2 and getting following error.
    Please help me out from this trouble. And let me know what is missing for compiling(for make command).

    Here is error code.

    “samples/hidraw/hid-example.c:49: warning: unused variable

  • Motiur

    Hi, I want to get the option of booting to one of the desired kernels e.g 2.6 or 3.1 during startup , not something default . The steps above directly took me to 3.1.5 without any chance of rebooting to another kernel . Is there a way to attach that option .

    • http://www.howopensource.com Manivannan

      Hi Motiur,

      Modify your grub and make entry for other kernel(2.6), then set timeout=10.

  • kashyap

    I have got the same error as bhavin has got., I am trying to upgrade kernel on a vm machine (Xenserver)

    • http://www.howopensource.com Manivannan

      Hi guys,

      I have not yet tried in vm machines. I will try to check your errors and will get back to you on asap.

  • Julian Melendez

    Your tutorial has been fully followed with GREATTTTTTT !!! Results usin mythbuntu 11.10 v …
    Thanks a lot

  • http://www.linuxkernel51.blogspot.com gvk51

    Hey iam trying to build 2.6.35 in ubuntu 11.10 64 bit, and iam messed up with following errors

    include/linux/irq.h: In function

  • http://www.gamaphoton.blogspot.com tilak

    thanks for the wonderful detailed explanation. this went flawless. i just upgraded my kernel from 3.0.14 to 3.2.1 on ubuntu 11.10

  • Numb

    hi
    i have a problem
    the initrd.img-3.2.9 does not existed
    i do all the job successfully but i can not create it
    help me please
    i use kernel 3.2.9 libre

    • http://www.howopensource.com Manivannan

      Hi Numb,

      Use this command “sudo update-initramfs -c -k 3.2.9″ to create it.

  • paijo

    Thank you very much, it works now for me.

    • sathish

      how i am having ubuntu 11.10 .. for study purpose i want to learn abt kernel compilation. I want to know how to edit the grub that i can able to choose my kernel. Previously i used slackware where i edited lilo to make it work.

  • Bezhan

    Hi,why im trying to use “apt update -grub ” it’s not working in command line
    plz help wt the problem,,,,my linux MINT so i got problem with GRUB n i delete the ubuntu grub 1.9 wanna update MINT grub

  • Pingback: How to compile linux kernel from source. | KernelOops

  • rockalternativo

    I tried to compile 3.3.2 and i got this error :

    OBJCOPY arch/x86/boot/vmlinux.bin
    BUILD arch/x86/boot/bzImage
    Setup is 16800 bytes (padded to 16896 bytes).
    System is 4599 kB
    CRC 569f109b
    Kernel: arch/x86/boot/bzImage is ready (#2)
    Building modules, stage 2.
    MODPOST 3268 modules
    ERROR: “__modver_version_show” [drivers/staging/rts5139/rts5139.ko] undefined!
    WARNING: modpost: Found 4 section mismatch(es).
    To see full details build your kernel with:
    ‘make CONFIG_DEBUG_SECTION_MISMATCH=y’
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

    • lzyerste

      A solution to rts5139 error:
      discard rts5139 module when doing ‘make menuconfig’.

      Device drivers —
      Staging drivers–
      Realtek RTS5139 USB card reader support

  • bucky

    Hi I did kernel upgrade to 3.0.0 but at boot I get error msg saying “MDIO-GPIO” already registered. The system hangs and falls back to command line and no graphics. I’m using ubuntu 10.10. and old kernel 2.6.35.32

  • Roshan

    I get this error

    roshan@roshan-Studio-1558:/usr/src/linux-3.4$ sudo make menuconfig
    [sudo] password for roshan:
    HOSTCC scripts/basic/fixdep
    /bin/sh: 1: gcc: not found
    make[1]: *** [scripts/basic/fixdep] Error 127
    make: *** [scripts_basic] Error 2

    How to correct this ?

  • Confuser

    Thanks
    My linux mint kernel upgraded to 3.3.5
    but when i restart it, I cant use Graphic Interface, it automatically show terminal interface, i had used ctrl+alt+f7 for switch to GUI, but it just showed yellow strip on the screen
    what must i do? please help me..

  • Stefano

    After compiling and installing, the freshly compiled kernel doesn’t seem to find the device (with correct UUID, same as used on precompiled kernels) and the system drops a shell… Any idea?

    TIA,

    Stefano

  • Rupesh KP

    I have installed ubuntu 11.04 on my system.
    After this when I used to give uname -r it showed me kernel version as 2.6.38.

    Now I had downloaded kernel 2.6.34.12 from kernel.org and installed it using the steps above.
    make
    make modules
    make modules_install
    make install

    This created files:
    System.map-2.6.34.12
    vmlinuz-2.6.34.12
    config-2.6.34.12

    In /lib/modules also I can see the new kernel 2.6.34.12 folder.

    Next to create initrd.img I fired:
    update-initramfs -c -k 2.6.34.12

    Then I checked the grub.cfg and it showed me an entry for 2.6.34.12.
    Next I updated grub:
    update-grub

    But after reboot uname -r still shows me the previous version 2.6.38.
    What is the issue and why new kernel version is not installed?

    • http://www.howopensource.com Manivannan

      Hi Rupesh,

      Your current kernel is newest and stable one, May I know why you are trying to downgrade the kernel by compiling the oldest version? you can try the compilation on latest Linux kernel.

  • Samir

    Hi,

    I am done with the installation of the latest kernel. Now I have to install CILK but since on extracting the package it doesn’t contain the configure file I cant make and then install it. Im new to linux so can you please guide me. I know im posting this at the wrong place but im completely stuck.

    • Samir

      I have read the README but couldnt get what is said in it

  • Pingback: difference of "make-kpkg" and "make"(in kernel build)

  • Sandy

    Thanks Mani for such nice and clear steps to build and install the kernel image. I have done it first time on my Ubuntu 12.04 LTS running with 3.2.0.23 and upgraded to 3.4.6 successfully.

    I had only one issue as: __modver_version_show undefined error when building linux kernel 3.0.4 version. And this was resolved just updating the CONFIG_RTS5139=m to CONFIG_RTS5139=n followed by re-compilation.

    After the install command, all the four files above have been successfullly created under /boot/ and I need not had to do it manually.

    Thanks
    Sandy

  • Ashfaq shaikh

    Well I went for compilation of Kernel 3.5.1 for Debian (LMDE) all the steps I followed as per your instructions. Although it took 2 hrs for the entire process it was completed with errors of DKMS Like:
    dkms.conf: Error! No ‘BUILT_MODULE_NAME’ directive specified for record #0.
    > Error! Bad conf file.
    > File:
    > does not represent a valid dkms.conf file.

    Well I went ahead ignoring this, as the four set of files were in place and after update-grub, even the header were in place.
    But.. When I booted, the ‘X” won’t come up! instead the text mode asking me to log in came, and a pop up indicating the X server.xorg need to be in place, even the latest nvidia driver I tried to install via sh command, wont install after the acceptance screen. Help me out I will not sit comfortably unless I boot with this latest kernel !!

    • Shreyas

      Hi Ashfaq,
      What exactly happens after the acceptance screen while installing the Nvidia drivers? Error message ?

  • jiten

    hey i got a error like not have enough space can you tell how it can be solve?

    {standard input}: Assembler messages:
    {standard input}: Fatal error: can’t write net/netfilter/.tmp_xt_TCPMSS.o: No space left on device
    {standard input}: Fatal error: can’t close net/netfilter/.tmp_xt_TCPMSS.o: No space left on device
    make[2]: *** [net/netfilter/xt_TCPMSS.o] Error 1
    make[1]: *** [net/netfilter] Error 2
    make: *** [net] Error 2
    jayesh@ubuntu:/usr/src/linux-3.0$ sudo make modules_install install
    [sudo] password for jayesh:
    cp: cannot stat `/usr/src/linux-3.0/modules.builtin’: No such file or directory
    make: *** [_modinst_] Error 1

  • YOO

    thank you so much
    i succeed the kernel update with this thread, thank you

  • TU YUQIAN

    Thx a lot! It helps me so much

  • crism

    The upgrade worked (with Ubuntu 10.04, to kernel 3.6.2), and my microphone works again, which was my primary goal.

    However, the apt repositories I have now seem obsolete. Any suggestions on how to configure apt to get updates to the kernel, headers, and drivers?

  • http://www.dial2000computing.co.uk John Rose

    I have a Sandy Bridge graphics card. Instead of the boot splash screen, I get a blank screen. Any ideas on how to fix?

  • John Rose

    After installing kernel 3.0 on Ubuntu Lucid, touchpad does not work on Acer V5 laptop. Any ideas?

  • Pingback: Install kernel 3.7 raring in Ubuntu 12.10 | HiepMC.Net

  • Pingback: Howto Install Linux kernel 3.8.8 raring in Ubuntu 12.10 12.04

  • Pingback: Basic Things to do after installing Ubuntu 13.04 Raring Ringtail

  • Shabbir

    will that work for linux kernel 3.2.0 ???

  • abubakar

    Hi thanks for the tutorial, can you tell how to avoid the following error, I encountered it while I ran the command sudo make modules_install install:

    cp: cannot stat `net/irda/irnet/irnet.ko’: No such file or directory
    INSTALL net/key/af_key.ko
    cp: cannot stat `net/key/af_key.ko’: No such file or directory
    INSTALL net/l2tp/l2tp_core.ko
    cp: cannot stat `net/l2tp/l2tp_core.ko’: No such file or directory
    INSTALL net/l2tp/l2tp_debugfs.ko
    cp: cannot stat `net/l2tp/l2tp_debugfs.ko’: No such file or directory
    INSTALL net/l2tp/l2tp_ppp.ko
    cp: cannot stat `net/l2tp/l2tp_ppp.ko’: No such file or directory
    INSTALL net/lapb/lapb.ko
    cp: cannot stat `net/lapb/lapb.ko’: No such file or directory
    INSTALL net/llc/llc.ko
    cp: cannot stat `net/llc/llc.ko’: No such file or directory
    INSTALL net/llc/llc2.ko
    cp: cannot stat `net/llc/llc2.ko’: No such file or directory
    INSTALL net/mac80211/mac80211.ko
    cp: cannot stat `net/mac80211/mac80211.ko’: No such file or directory
    INSTALL net/netfilter/ipset/ip_set.ko
    INSTALL net/netfilter/nf_conntrack_pptp.ko
    cp: cannot stat `net/netfilter/nf_conntrack_pptp.ko’: No such file or directory
    INSTALL net/netfilter/nf_conntrack_proto_dccp.ko
    cp: cannot stat `net/netfilter/nf_conntrack_proto_dccp.ko’: No such file or directory
    INSTALL net/netfilter/xt_addrtype.ko
    cp: cannot stat `net/netfilter/xt_addrtype.ko’: No such file or directory
    INSTALL net/netfilter/xt_cluster.ko
    cp: cannot stat `net/netfilter/xt_cluster.ko’: No such file or directory
    INSTALL net/netfilter/xt_comment.ko
    cp: cannot stat `net/netfilter/xt_u32.ko’: No such file or directory
    INSTALL net/netrom/netrom.ko
    cp: cannot stat `net/netrom/netrom.ko’: No such file or directory
    INSTALL net/nfc/nci/nci.ko
    cp: cannot stat `net/nfc/nci/nci.ko’: No such file or directory
    INSTALL net/nfc/nfc.ko
    cp: cannot stat `net/nfc/nfc.ko’: No such file or directory
    INSTALL net/openvswitch/openvswitch.ko
    cp: cannot stat `net/openvswitch/openvswitch.ko’: No such file or directory
    INSTALL sound/core/seq/snd-seq-dummy.ko
    cp: cannot stat `sound/core/seq/snd-seq-dummy.ko’: No such file or directory
    INSTALL sound/core/seq/snd-seq-midi-emul.ko
    cp: cannot stat `sound/core/seq/snd-seq-midi-emul.ko’: No such file or directory
    INSTALL sound/core/seq/snd-seq-midi-event.ko
    cp: cannot stat `sound/core/seq/snd-seq-midi-event.ko’: No such file or directory
    INSTALL sound/core/seq/snd-seq-midi.ko
    cp: cannot stat `sound/core/seq/snd-seq-midi.ko’: No such file or directory
    INSTALL sound/core/seq/snd-seq-virmidi.ko
    cp: cannot stat `sound/core/seq/snd-seq-virmidi.ko’: No such file or directory
    INSTALL sound/core/seq/snd-seq.ko
    cp: cannot stat `sound/core/seq/snd-seq.ko’: No such file or directory
    INSTALL sound/core/snd-hrtimer.ko
    cp: cannot stat `sound/core/snd-hrtimer.ko’: No such file or directory
    INSTALL sound/core/snd-hwdep.ko
    cp: cannot stat `sound/core/snd-hwdep.ko’: No such file or directory
    INSTALL sound/core/snd-page-alloc.ko
    cp: cannot stat `sound/core/snd-page-alloc.ko’: No such file or directory
    INSTALL sound/core/snd-pcm.ko
    cp: cannot stat `sound/core/snd-pcm.ko’: No such file or directory
    INSTALL sound/core/snd-rawmidi.ko
    cp: cannot stat `sound/core/snd-rawmidi.ko’: No such file or directory
    INSTALL sound/core/snd-timer.ko
    cp: cannot stat `sound/core/snd-timer.ko’: No such file or directory
    INSTALL sound/core/snd.ko
    cp: cannot stat `sound/core/snd.ko’: No such file or directory
    INSTALL sound/drivers/mpu401/snd-mpu401-uart.ko
    cp: cannot stat `sound/drivers/mpu401/snd-mpu401-uart.ko’: No such file or directory
    INSTALL sound/drivers/mpu401/snd-mpu401.ko
    cp: cannot stat `sound/drivers/mpu401/snd-mpu401.ko’: No such file or directory
    INSTALL sound/drivers/opl3/snd-opl3-lib.ko
    cp: cannot stat `sound/drivers/opl3/snd-opl3-lib.ko’: No such file or directory
    INSTALL sound/isa/msnd/snd-msnd-pinnacle.ko
    cp: cannot stat `sound/isa/msnd/snd-msnd-pinnacle.ko’: No such file or directory
    INSTALL sound/isa/opti9xx/snd-miro.ko
    cp: cannot stat `sound/isa/opti9xx/snd-miro.ko’: No such file or directory
    INSTALL sound/isa/opti9xx/snd-opti92x-ad1848.ko
    cp: cannot stat `sound/isa/opti9xx/snd-opti92x-ad1848.ko’: No such file or directory
    INSTALL sound/isa/opti9xx/snd-opti92x-cs4231.ko
    cp: cannot stat `sound/isa/opti9xx/snd-opti92x-cs4231.ko’: No such file or directory
    INSTALL sound/isa/opti9xx/snd-opti93x.ko
    cp: cannot stat `sound/isa/opti9xx/snd-opti93x.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-emu8000-synth.ko
    cp: cannot stat `sound/isa/sb/snd-emu8000-synth.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-jazz16.ko
    cp: cannot stat `sound/isa/sb/snd-jazz16.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sb-common.ko
    cp: cannot stat `sound/isa/sb/snd-sb-common.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sb16-csp.ko
    cp: cannot stat `sound/isa/sb/snd-sb16-csp.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sb16-dsp.ko
    cp: cannot stat `sound/isa/sb/snd-sb16-dsp.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sb16.ko
    cp: cannot stat `sound/isa/sb/snd-sb16.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sb8-dsp.ko
    cp: cannot stat `sound/isa/sb/snd-sb8-dsp.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sb8.ko
    cp: cannot stat `sound/isa/sb/snd-sb8.ko’: No such file or directory
    INSTALL sound/isa/sb/snd-sbawe.ko
    cp: cannot stat `sound/isa/sb/snd-sbawe.ko’: No such file or directory
    INSTALL sound/isa/snd-adlib.ko
    cp: cannot stat `sound/isa/snd-adlib.ko’: No such file or directory
    INSTALL sound/isa/snd-als100.ko
    cp: cannot stat `sound/isa/snd-als100.ko’: No such file or directory
    INSTALL sound/isa/snd-azt2320.ko
    cp: cannot stat `sound/isa/snd-azt2320.ko’: No such file or directory
    INSTALL sound/isa/snd-cmi8330.ko
    cp: cannot stat `sound/isa/snd-cmi8330.ko’: No such file or directory
    INSTALL sound/isa/snd-es18xx.ko
    cp: cannot stat `sound/isa/snd-es18xx.ko’: No such file or directory
    INSTALL sound/isa/snd-opl3sa2.ko
    cp: cannot stat `sound/isa/snd-opl3sa2.ko’: No such file or directory
    INSTALL sound/isa/snd-sc6000.ko
    cp: cannot stat `sound/isa/snd-sc6000.ko’: No such file or directory
    INSTALL sound/isa/snd-sscape.ko
    cp: cannot stat `sound/isa/snd-sscape.ko’: No such file or directory
    INSTALL sound/isa/wavefront/snd-wavefront.ko
    cp: cannot stat `sound/isa/wavefront/snd-wavefront.ko’: No such file or directory
    INSTALL sound/isa/wss/snd-wss-lib.ko
    cp: cannot stat `sound/isa/wss/snd-wss-lib.ko’: No such file or directory
    cp: cannot stat `sound/pci/hda/snd-hda-codec.ko’: No such file or directory
    INSTALL sound/pci/hda/snd-hda-intel.ko
    cp: cannot stat `sound/pci/hda/snd-hda-intel.ko’: No such file or directory
    INSTALL sound/pci/ice1712/snd-ice1712.ko
    cp: cannot stat `sound/pci/ice1712/snd-ice1712.ko’: No such file or directory
    INSTALL sound/pci/ice1712/snd-ice1724.ko
    cp: cannot stat `sound/pci/ice1712/snd-ice1724.ko’: No such file or directory
    INSTALL sound/pci/ice1712/snd-ice17xx-ak4xxx.ko
    cp: cannot stat `sound/pci/ice1712/snd-ice17xx-ak4xxx.ko’: No such file or directory
    INSTALL sound/pci/korg1212/snd-korg1212.ko
    cp: cannot stat `sound/pci/korg1212/snd-korg1212.ko’: No such file or directory
    INSTALL sound/pci/lola/snd-lola.ko
    cp: cannot stat `sound/pci/lola/snd-lola.ko’: No such file or directory
    INSTALL sound/pci/lx6464es/snd-lx6464es.ko
    cp: cannot stat `sound/pci/lx6464es/snd-lx6464es.ko’: No such file or directory
    INSTALL sound/pci/mixart/snd-mixart.ko
    cp: cannot stat `sound/pci/mixart/snd-mixart.ko’: No such file or directory
    INSTALL sound/pci/nm256/snd-nm256.ko
    cp: cannot stat `sound/pci/nm256/snd-nm256.ko’: No such file or directory
    INSTALL sound/pci/oxygen/snd-oxygen-lib.ko
    cp: cannot stat `sound/pci/oxygen/snd-oxygen-lib.ko’: No such file or directory
    INSTALL sound/pci/oxygen/snd-oxygen.ko
    cp: cannot stat `sound/pci/oxygen/snd-oxygen.ko’: No such file or directory
    INSTALL sound/pci/oxygen/snd-virtuoso.ko
    cp: cannot stat `sound/pci/oxygen/snd-virtuoso.ko’: No such file or directory
    INSTALL sound/pci/pcxhr/snd-pcxhr.ko
    cp: cannot stat `sound/pci/pcxhr/snd-pcxhr.ko’: No such file or directory
    INSTALL sound/pci/riptide/snd-riptide.ko
    cp: cannot stat `sound/pci/riptide/snd-riptide.ko’: No such file or directory
    INSTALL sound/pci/rme9652/snd-hdsp.ko
    cp: cannot stat `sound/pci/rme9652/snd-hdsp.ko’: No such file or directory
    INSTALL sound/pci/rme9652/snd-hdspm.ko
    cp: cannot stat `sound/pci/rme9652/snd-hdspm.ko’: No such file or directory
    INSTALL sound/pci/rme9652/snd-rme9652.ko
    cp: cannot stat `sound/pci/rme9652/snd-rme9652.ko’: No such file or directory
    INSTALL sound/pci/snd-ad1889.ko
    cp: cannot stat `sound/pci/snd-ad1889.ko’: No such file or directory
    INSTALL sound/pci/snd-als300.ko
    cp: cannot stat `sound/pci/snd-als300.ko’: No such file or directory
    INSTALL sound/pci/snd-als4000.ko
    cp: cannot stat `sound/pci/snd-als4000.ko’: No such file or directory
    INSTALL sound/pci/snd-atiixp-modem.ko
    cp: cannot stat `sound/pci/snd-atiixp-modem.ko’: No such file or directory
    INSTALL sound/pci/snd-atiixp.ko
    cp: cannot stat `sound/pci/snd-atiixp.ko’: No such file or directory
    INSTALL sound/pci/snd-azt3328.ko
    cp: cannot stat `sound/pci/snd-azt3328.ko’: No such file or directory
    INSTALL sound/pci/snd-bt87x.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-ak4641.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-ak4642.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-ak4642.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-ak4671.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-ak4671.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-alc5623.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-alc5623.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-alc5632.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-alc5632.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-cs4270.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-cs4270.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-cs4271.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-cs4271.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-cs42l51.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-cs42l51.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-cs42l73.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-cs42l73.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-cx20442.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-cx20442.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-da7210.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-da7210.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-dfbmcs320.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-dfbmcs320.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-jz4740-codec.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-jz4740-codec.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-l3.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-l3.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-lm4857.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-lm4857.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-max98088.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-max98088.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-max98095.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-max98095.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-max9850.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-max9850.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-max9877.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-max9877.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-pcm3008.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-pcm3008.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-rt5631.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-rt5631.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-sgtl5000.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-sgtl5000.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-sn95031.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-sn95031.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-spdif.ko
    cp: cannot stat `sound/soc/codecs/snd-soc-spdif.ko’: No such file or directory
    INSTALL sound/soc/codecs/snd-soc-ssm2602.kod/soc/codecs/snd-soc-tlv320dac33.ko’: No su

    Thanks for your help!