Pawan Sharma | March 27, 2011 | | Be the first to comment!

GRUB menu of RHEL 6

         In my previous post I explain the BOOT PROCESS of RHEL 6. In this post I will explain you the GRUB boot loader and files associated with the GRand Unified Boot loader.
         The Standard Boot loader associated with Red Hat Enterprise Linux is GRUB, the GRand Unified Boot Loader. As suggested by the Red Hat exam requirements, for RHCSA exam, you need to know how to use Grub menu to boot in to different runlevels, and diagnose and correct boot failures arising from boot loader errors.

         When you start your computer, your BIOS look for the /boot directory and finds the GRUB menu, which will look similar to figure below:



To understand the GRUB, the best place is to start is form GRUB configuration file.
You can find grub configuration file ‘grub.conf’ in /boot/grub/ folder and also you can find a hard link of ‘grub.conf’ file in /etc/ directory. The contents of a GRUB configuration file in RHEL 6 are given below:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/sdb3
#          initrd /initrd-[generic-]version.img
title Red Hat Enterprise Linux (2.6.32-71.el6.i686)
      root (hd0,1)
      kernel /vmlinuz-2.6.32-71.el6.i686 ro root=UUID=0d96a842-0806-42fb-84af-2ae0676fd40d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
      initrd /initramfs-2.6.32-71.el6.i686.img
title Windows 7
      rootnoverify (hd0,0)
      chainloader +1

           Every line which starts with ‘#’ is a comment. The comment lines don’t affect the working of the GRUB file. First line suggests that this file is created by anaconda, which is the RHEL 6 installation program.

The actual commands in this file are:
·         default=0 : this means that GRUB will boot RHEL 5 by default.

·         Timeout=5 : this means, before GRUB automatically boots the default Operating System it will wait for 5 seconds.

·         splashimage : directive locates the graphical GRUB menu screen which is located at (hd0,1)/grub/splash.xpm.gz

·         hiddenmenu: directive means that the GRUB options are hidden, with the message shown below:
Booting Red Hat Enterprise Linux Server (2.6.32-71.el6.i686)

This GRUB configuration file can be used to diagnose and recover GRUB problems.

No comments:

Post a Comment