Ubuntu has a very strange way to update the grub.cnf. I have not figured it out yet, so I did it manually. there has to be some way where you can just compile the kernel and it updates the grub entry automatically. By doing "make install" in kernel source tree, it builds the kernel image without initrd and puts it under /boot (and also updates the grub entry in Fedora distribution). Somehow initrd is required in Ubuntu (which I have installed under Windows using ubuntu.exe installer). so here are the steps which I followed to install the new kernel under Ubuntu.
Make sure to have enough space before executing the steps below :
1. Download kernel from http://www.kernel.org (do not know the way to install kernel source from Ubuntu repositories)
2. Extract the source (tar -xjf kernel.bz2)
3. make -j8 && make modules && make modules_install && make install
## Initrd is required in Ubuntu, so this command applies only under Ubuntu.
4. mkinitramfs -o /boot/initrd-2.6.38 126.96.36.199
where, 188.8.131.52 is the kernel version for which I am generating the initramfs (or initrd image). By default it takes the running kernel version.
Once done, update the /boot/grub/grub.cfg. On top of the file, it is mentioned that "DO NOT EDIT THIS FILE", but it is safe to edit if you know what you are doing. Just copy the existing entry and update the "boot’ and "initrd" fields of that entry. You are done!!