Here, in this article , am going to provide some understanding of Linux boot loader known as GRUB. If you have understanding of working pattern of GRUB then it can help you to know how the operating system exactly works. Even it will help you to fix and recover many Linux starting problems. If you really want to gain confidence in working of Linux then you should master the GRUB boot loader. GRUB can easily work with DOS, Windows, Linux or any BSD operating system. GRUB means Grand Unified Boot loader.
Grub boot loader can be configured dynamically, means a user has an option to make changes while booting. Even users can also easily alter the current boot entries, they can add new entries, select multiple kernels or even they can modify initrd. GRUB has also got a support of Logical Block Address. GRUB can be installed and executed from any type of device like hard disk, CD and USB. GRUB and GRUB2 are two different versions.
GRUB2 is considered as default boot loader of Ubuntu whereas GRUB is generally used in RHEL older versions. When started, GRUB2 mainly presents a menu and waits for some input from users. It generally transfers control to our operating system kernel. GRUB2 is mainly designed to provide flexibility and performance to today’s operating systems.
Features and Comparisons between GRUB and GRUB2
The default menu which is looking very similar to GRUB but there are some changes made in this.
1. In today’s Linux Distros including (Ubuntu 16.04 and RHEL 7), GRUB2 will now directly show a login prompt and no menu is displayed now.
2. If you want to see the menu during boot you need to hold down SHIFT key. Even sometimes by pressing ESC you can also display the menu.
3. Now, the new configuration file is /boot/grub/grub.cfg. There is no file called /boot/grub/menu.lst now. This main configuration file contains different types of scripts and it is not allowed to edit this file directly.
4. Users have also now choice of creating custom files in which they can place their own menu entries. You can make use of a file called 40_custom which is available in /etc/grub.d folder.
5. Even users can now change the menu display settings. This is done through a file called grub located in /etc/default folder.
6. In today’s GRUB, numbering of partitioning has totally changed. The first partition is now considered as 1 instead of 0. The first device is still identified with hd0. These changes can be altered if needed by making some changes to device.map file of the /etc/grub folder.