Okay folks, here's what I did:
- Code: Select all
sudo apt-get install git-core kernel-package fakeroot build-essential ncurses-dev
Then download latest kernel version from here:
http://www.kernel.org/Unpack the kernel tarball in say /home/username/Downloads/Kernels (for example, where 'username' = your user account name.)
Then go into the new directory (should look like this linux-3.4) and open a terminal window in that location. Or, open any old terminal window and type:
- Code: Select all
cd /home/username/Downloads/Kernels/linux-3.4
Since you don't want to start from absolute scratch configuring your shiny new kernel, start with the .config file from your current kernel, which presumably works since you're reading this.
- Code: Select all
sudo cp /boot/config-`uname -r` ./.config
Now, to configure your new kernel, type this:
- Code: Select all
sudo make menuconfig
Now for the really fun part! Customize your new kernel for your specific processor type for enhanced performance! Also probably a good idea to disable Zen if you don't use it!
Processor Type and Features -> Paravirtualized Guest Support -> Xen
Navigate around to enable other options that you may need. (Examples: file system support, network and wireless modules, media and tv modules, any and everything you need!) Press space bar once to enable support as a module . This is generally desired over built-in modules <*> in _most_ cases. If you forget something, you can always go back to this step later and recompile your kernel again.
When you are finished, keep hitting ESC to exit and say ‘Yes’ you want to save.
Time to compile!
- Code: Select all
sudo make-kpkg clean
- Code: Select all
sudo fakeroot make-kpkg --initrd --append-to-version=-vanillakernel-3.4 kernel_image kernel_headers
Note, you can append anything you like to the kernel version as long as it starts with a "-" and doesn't contain any Uppercase letters. Keep it simple!
Compiling the kernel will take some time. Go have a few cocktails.
When you're done, you'll notice two brand new deb files in the directory above 'linux-3.4'. One of these will be the kernel package, the other will be the kernel headers package. From within your still open terminal, type:
- Code: Select all
cd ..
sudo dpkg -i *.deb
The new packages will be installed automatically.
Reboot the computer and your new kernel should be the default in GRUB!
Rinse and repeat when new kernels are released!
Note: for Nvidia and ATI users, you'll need to manually compile the video driver against the new custom kernel as per-compiled blobs for your custom kernel won't be available in the repositories.
Enjoy!