Friday, March 26, 2010

Ubuntu grub 2 edit

    I previously spoke about upgrade Ubuntu grub. I did it for do some fancy things like customize my grub such as adding a background picture, change colors. Then I came up with a serious issue. Actually after I found the solution it seemed very easy but finding the solution by my own took some serious time. That's why I thought to write this article.

    When we fully update our OS, it will show in our grub loading time. It shows not only the upgraded version but also the previous versions also. So after we did that several times,  our screen fill with those upgrade version details at the grub loading time. It seems unnecessary. If you are running some other OS with Ubuntu you will feel it badly, because you have to press down arrow key several times. In "GNU GRUB 0.97" version you can edit those information in menu.lst file which locate /boot/grub directory. All you have to do is comment those previous upgraded versions.

   Here is the thing, after you have upgraded the grub 0.97 to grub 1.96 it is no use of editing that menu.lst file. Now you have to edit grub.cfg file which locates in the same directory. But the contents little bit difference. You will be able to identify those changes when you see it, like "uuid" replace with "root".

As an example in menu.lst file you will be able to see a block of context similar to this:

#title        Ubuntu 9.04, kernel 2.6.28-17-generic
#uuid        62ddb71b-c0fb-4a3d-9f21-87649aef2712
#kernel        /boot/vmlinuz-2.6.28-17-generic root=UUID=62ddb71b-c0fb-4a3d-9f21-87649aef2712 ro quiet splash
#initrd        /boot/initrd.img-2.6.28-17-generic
#quiet


But that will display in grub.crg as follow:

#menuentry "Ubuntu, linux 2.6.28-17-generic" {
#    linux  /boot/vmlinuz-2.6.28-17-generic
#    root=UUID=eee7e530-9088-4a70-a70c-3a559164416d ro quiet splash
#    initrd  /boot/initrd.img-2.6.28-17-generic
#}

So now you can use grub2 with confidence.


*** Thank You ***

** /-\ |\| |_| _| /-\ **

No comments:

Post a Comment