Search This Blog

Monday, May 28, 2012

Installing and Uninstalling ubuntu kernel

Steps for installing ubuntu kernel 

  • Get the source code  
          apt-get source linux-image-$(uname -r)
  • Perform this step only for the first time you build kernel.
          Downloading dependencies
          sudo apt-get build-dep linux-image-$(uname -r)
  • Building kernel 
  • Now move inside the downloaded kernel directory and type following commands.
    fakeroot debian/rules clean
    fakeroot debian/rules binary-headers binary-generic
After this step, 3 files with .deb extension would be generated in the parent directory of your current folder. Install them using this command
  •  sudo dpkg -i linux*2.6.38-7.37*.deb
  •  Now reboot. After rebooting you can do uname -r to check whether you have booted into new kernel.  

Steps for uninstalling ubuntu kernel   

  • Open the Synaptic package manager. If its not present you can at first install it.
  • Now check your current kernel version using uname -r . Or just make a note of the kernel version which you want to remove.
  • Now inside Synaptic package manager you will find "search". Inside that type 'linux-image'. 
  • After that you will see different kernel images which are installed in your pc.
  • Now select the one which you want to remove and mark it for removal.
  • After that apply the changes to remove that kernel version.