GRUB (GRand Unified Bootloader) is the boot mechanism used to control the booting of the operating system(s) in Red Hat Linux, and many other distributions. It's akin to the Windows boot.ini (2000 & XP) or BCDedit.exe (Vista) and is an alternative to LILO (LInux LOader).

Although it's an automated process, there are times when one has to work with GRUB, say on a dual-boot machine. In such a case, you might wish to alter the order of the default Operating System into which the computer boots, or to change the time until the computer boots into an operating system. These settings are changed in the grub.conf file.

The grub.conf file is located in the /etc folder in the file system. In Linux the /etc folder, and all settings folders, can be found in the File System. To edit grub.conf, you will need to use the Terminal (Red Hat Menu->System Tools->Terminal). Once in the Terminal you can use a number of text editors built into Linux. One of the oldest is emacs, another editor is called nano.
Either editor will do.

At the prompt type nano/etc/grub.conf
or emacs /etc/grub.conf

This command will bring up the grub.conf file, which will look something like this:

# grub.conf generated by anaconda
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4smp)
root (hd0,2)
kernel /vmlinuz-2.6.11-1.1369_FC4.smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.smp.img
title Fedora Core-up(2.6.11-1.1369_FC4smp)
root (hd0,2)
kernel /vmlinuz-2.6.11-1.1369_FC4.smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.smp.img
title Other
rootnoverify (hd0,1)
chainloader+1

In GRUB, like many programming files, the hash mark (#) indicates comments.
The "default" setting dictates the default operating sytem. In this case the first Fedora Core. The Timeout indicates the amount of time before GRUB boots to the default operating system.

To make changes to any portion of grub.conf, just arrow the cursor down to portion you want to edit, make the changes and then save, by first hittnig the ESC key. Upon reboot GRUB will reflect your changes.

Advertisements