Customizing Linux GRUB (Part I) : Adding more Operating System Entries, Changing OS Names, setting Fedora GRUB as default instead of Ubuntu

This is a nice hack to change your GRUB boot loader preferences. For those who have a dual boot configuration on there systems, be it a Linux with Linux or Linux with Windows, you may have sometimes thought of changing OS label names, or the background image or even using GRUB instead of any other boot loader. This post aims to teach you all this. Also Ubuntu 11.04 uses GRUB 2, which is only more complicated and harder to customize. If you have Fedora and Ubuntu installed in your PC like mine, you would like to use Fedora’s GRUB 1.9. Or maybe you have installed Fedora but it doesn’t recognize Ubuntu and you cannot boot it. Or suppose instead of Windows boot loader, you would like to use GRUB. This article has all the answers of your problems. 

First of all let me say that the full form of acronym GRUB is GRand Unified Bootloader. It is a open-source software that appears to you just after booting your PC and let you make operating system choices. This tweak cover three parts, first part we will learn how to change GRUB OS label names, or add more operating system choices. Second part we will learn about using Fedora’s GRUB instead of any other OS bootloader. And in third part (next post) we will learn how to change the GRUB’s boring background image to something else.Changing GRUB OS label names and adding more OS choices in the GRUB menu

In Fedora, open terminal and go to /boot/grub folder.

Now backup the grub.conf file using super user privileges or sudo. This is the main file we will be working on, so its always advisable to save a backup of it.

This will copy the file to your home folder.

Now to edit the file, open it with gedit or vi, using root user privileges. You will see something like this:.

To change the operating system label names, just change the part after title. For e.g. we have this line

change it to something like

You can also give your name there, in fact any name or words. Note that after every kernel update, an entry of that kernel gets added to this list. Its advisable to have two kernel entries of the same OS in the GRUB, one that comes with during installation, and the other the latest kernel, so that if the latest kernel has got bugs, you can always go back to work with the more stable first one. To delete a OS entry, simple remove the title, kernel and initrd entries of that kernel. Also note that you can change the default OS that can be booted by changing the default (0= 1st entry, 1=2nd) . Also you can change the timeout seconds (time GRUB will wait before booting the default OS) by changing the timeout value.

Now suppose that you have installed Fedora and it doesn’t recognize the Ubuntu that you have installed earlier. For that you have to add Ubuntu entries in this file. Go to Ubuntu drive, and open /boot/grub/grub.cfg file. Browse till you find something like this line.

 


Now go back to your Fedora’s boot/grub/grub.conf and append the following entries:

Now we need to provide the root entry. For this type root ( and give the hard disk Ubuntu is installed on. If you have a single hard disk, it should be zero, otherwise specify the number like if it in the second had disk, it will be:

now we need to specify the partition Ubuntu is installed on. For example, /dev/sda1 is known as 0th partition, /dev/sda2 the 1st partition and so on. My Ubuntu is installed in /dev/sda3 so
I write:

Now we need to find the kernel and initrd image addresses. For that, open the grub.cfg file of Ubuntu, go the the entry of Ubuntu, and simply copy what is written after “linux” entry to kernel entry in Fedora’s grub.conf. Also copy the initrd entry grub.conf and leave as it is. So our final Ubuntu entry will look somethinbg like this:

You can add other entries in grub.conf (like failsafe mode of Ubuntu, memtest86+) by the process described above.

 

Once done, save the file and exit.

Setting Fedora’s GRUB as default instaed of any other Operating System (Ubuntu), or using GRUB instead of Windows bootloader.

To install Fedora’s grub and to use it as the default GRUB instead of Ubuntu or any other OS , open terminal and type:

If all goes well, Fedora’s GRUB will be installed as default GRUB for your system.

Next, to change the background (splash) image of the GRUB menu, have a look at this

Resources : http://www.gnu.org/software/grub/

Facebook Comments

Saurav Modak

I am a aspiring hacker and love to learn new languages. Programming lover, writer and web developer, I blog when I get spare time from these.

You may also like...

1 Response

  1. August 9, 2013

    […] earlier and then exit the install. If you have more than one OS installed, consider reading adding more operating systems to GRUB. If you have Ubuntu, you will need to login to the system and run update-grub to bring Arch up in […]

Liked it? Leave a comment