If your browser supports Refresh, you'll be transported to my New Blog in 5 seconds, otherwise, select the link manually. Thank you

Monday, September 29, 2008

Linux Kernel Compilation Guide for Ubuntu users

I have been trying to compile the kernel for the past few days and get everything in order. Now that I have everything in order, I thought of putting up this post. I am basically putting up various links to guides that I used ( will save you a lot of searching).

  1. Packages
You can use the vanilla kernel from kernel.org or install the linux-source package from the Ubuntu repository. I used the latter as it also has the Ubuntu specific patches.

For the compilation process this guide is the best.

  • ALSA
After compile you will find that the sound on your compiled kernel does not work and the nvidia ( or ATI ) drivers are also not detected. To make this right just follow the guides below::

For alsa drivers, install the alsa-source package extract the archive and then give the following commands as root.



# ./configure --with-kernel=dir #where dir = your kernel source directory

# make
# make install-modules

If for some reason this fails, check these pages.

ALSA wiki


Other guide

  • nVidia
Getting the nvidia drivers working in the compiled kernel was a royal pain for me. May be I was googling for the wrong things. Anyways, I finally found the answer. Just follow this guide and you will have the nvidia drivers installed and running on your compiled kernel just fine.

  • ATI
I was also able to get this guide for installing ATI drivers from source. Don't know if this works or not. If anyone does try it, please comment about its validity.

EDIT :: It looks like master_kernel at ubuntuforums thought that his thread was not enough. He has made a GUI app which follows the steps in the thread and does everything for you. All though I still prefer the CLI way I thought this was a good thing for very new users. Plus it installs the nvidia and ati drivers all by itself. Go here for more info.

A few screenshots follow::


Happy compiling.

Share/Save/Bookmark

2 comments:

Aniket Zamwar said...

i think this will help me...
i needed it..
also put sum post on hw to write Kernel modules..

- Amod said...

hmmm...