ubuntu kernel compile

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

where, 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!! 


3 thoughts on “ubuntu kernel compile

  1. :D
    “ether” is quite old theory…even before einstein….its because scientist can not think that light can travel without any medium so they made “ether”….
    but bohr,einstein have realized the property of light “duality”..
    i.e. it can travel as quantum as well as by wave…..
    so that explain there is no need of ether…..
    and as theory of relativity came after the therory of ether….it is the theory of relativity who prove the theory of ether is wrong…you may go for some googling for better explanation…and believe me in gujarat samachar…”BUDHVAR NI BAPORE” is the only article with knowledge..
    me and babba and tejas will be much happy to find another blogging friend..keep blogging…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s