System administrators who are planning to upgrade to Red Hat Enterprise Linux 7 (RHEL) have a a change coming to them. With the newer versions of Red Hat, a new version of GRUB, the Red Hat boot loader, will be the new default. GRUB 2, the new boot loader, will bring a few changes in configuration and management.

We can’t talk about GRUB or GRUB 2 without first talking about boot loaders. That is the main job that GRUB is in place for. Boot loaders work with the system to start the boot process. Most people have heard about boot loaders in the capacity of “booting up” the computer. That is more or less how the process works. When you turn on your computer(s), it goes through a Power on Self-Test (POST). The POST checks for RAM and minimum hardware requirements and makes sure they are present and functioning. After a successful POST the system will scan for a disc to boot off. In the case of RHEL 7 the boot loader function is handled by GRUB 2. From a fundamental standpoint, if you don’t have to make adjustments to your boot loader than it’s doing great. You know your boot loader is working right when you don’t even know it’s there.

GRUB vs GRUB 2

All previous versions of RHEL used GRUB as a default boot loader. With the newer versions, 7 and onward, GRUB 2 will be the default boot loader. In terms of differences between the two, there are a few but it is a noticeable a change. Those who frequently use Red Hat may find some things to be drastically different, but with the right training and practice they can easily be handled.

The biggest differences you’ll find is the changes in layout and modification. GRUB 2 exposes additional functionality, but with that comes more complexity. This complexity expands the number of lines in the configuration, as you can see in the pictures below. (GRUB is on the left and GRUB 2 is on the right.) This has created a different way to make changes to the boot loading process; to actually change the settings, including time out or default options.

Another big change is that we no longer do direct edits to the configuration file. Changes can be made in the GRUB default (/etc/default/grub) and template (/etc/grub.d) files. Changes must be committed to the configuration file using 'grub2-mkconfig'.

After that, differences are really more cosmetic than anything. In GRUB 2 the files names and layout are a bit different. So in the question of ‘Is there any difference between GRUB and GRUB 2?’ They are both boot loaders that do the job they are supposed to do. GRUB 2 adds a lot more features and complexity than its predecessor, but its job is the same as the original GRUB.

Making Changes

The architecture of files is different between GRUB and GRUB 2, as well as the procedures and how they are all dealt with. Let’s start with the configuration file. On GRUB within versions 6 and older, there are about 10 lines that are within the configuration line. GRUB 2 carries more than 10 but functionality is the same, just much more in depth.

Files for GRUB 2 cannot be edited manually. If a change needs to be made, it’s not as easy as going into the 'grub.conf' and making it. If you would want to make changes in GRUB 2, you will need to go to the default and template files. From there you make your selection and the changes needed, like changing the default timeout.

To commit the changes to the (/boot/grub/grub.cfg), we run 'grub2-mkconfig'. For more information on how to make changes in GRUB and GRUB 2, check out Red Hat classes at New Horizons.

Configuring GRUB is something that in the "old days" was pretty simple to deal because you just went to one file, made your changes and when you rebooted your system, all your changes would appear. What they've done with GRUB 2, in a lot of ways, is made it more powerful but it also brought on more complexity.

Closing Thoughts

From an administrative standpoint, there are some differences you have to be aware of. GRUB 2 is the default boot loader for RHEL 7 so when the transition from the older versions of Red Hat to the newer ones takes place, there are going to be some fundamental setting differences that are going to be changing as well. If you're doing a version change, knowing what you're getting into before you decide to make the switch is the best way to go.

Ralph Nyberg is a technology educator and IT professional with over 15 years of experience in a broad range of networking technologies. Beyond the classroom, Ralph has extensive experience in network consulting and curriculum design. He brings a wealth of knowledge and solution-driven philosophy to his work both inside and outside the classroom. Ralph frequently assists with the development of custom solutions for customers, as well as playing a critical role in design and architecture decisions relating to the corporate and classroom networks.