Pages

Tuesday, April 30, 2013

Ubuntu Main Line Kernel Update Made Easy

People like me always want to stay up to date with their softwares. This sometime may give freaking pain in ass (read new bugs). But I believe that most of the updates of the various softwares We use improve usability, add new functionality and security. At least developers intend to do so.

As a loyal ubuntu user ( more precisely xubuntu as I have changed my flavor from ubuntu to xbuntu after 12.10 release ), I always wanted to use latest main line kernel from ubuntu team. But there was no automated procedure to do so. After a little googling I stumbled upon a very nice script to ease my need. Askbuntu user Gm-script-writer-62850 has written a script which is openly available on his github account does the job conveniently as good as ppa or any other ubuntu repo.This script can be used as a command from terminal.

All you have to do is just fire up your favorite terminal app and type the following commands.
$ cd /tmp
$ git clone git://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater
$ bash Ubuntu-Mainline-Kernel-Updater/install

If you do not want to use git , then you type the following.

$ cd /tmp
$ wget https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater/archive/master.zip -O Ubuntu-Mainline-Kernel-Updater.zip
$ unzip Ubuntu-Mainline-Kernel-Updater.zip
$ bash Ubuntu-Mainline-Kernel-Updater-master/install    

This will install an executable script KernelUpdateChecker in your /usr/local/bin folder.

Now to check any available kernel update from ubuntu mainline kernel archive type the following commands.
$ cd /tmp
$ KernelUpdateChecker 

This will check the most recent kernel from ubuntu mainline kernel archive and will notify you. To install these update type the following command in terminal.

$ /tmp/kernel-update 

To know more options (arguments) about KernelUpdateChecker you can run the script with "--help" argument. It will list the available options. Some of the advaced use of the script are explained bellow.
$ KernelUpdateChecker -k -r raring -no-rc -v 3.9

This would force the script to generate a install script for the latest 3.9 kernel compiled for Raring (Ubuntu 13.04) that is not a release candidate even if you are running a newer kernel.
-k forces the script to make a installer regardless of now new the current running kernel is
-r raring tells the script to use raring kernels even if you are using precise (Ubuntu 12.04) or Quantal(Ubuntu 12.10)
-no-rc tells the script to ignore release candidate kernels
-v 3.5 tells the script you only want a kernel with a version number starting with 3.5, you can use the entire kernel version number to force a exact version.
$ tmp/kernel-update --silent 

 will install the kernel without asking questions .

$ tmp/kernel-update --uninstall 

will purge the kernel it would normally install from the system.