Grub 2

The primary configuration file for GRUB2 is named grub.cfg. We can find it in /boot folder. Content is this file is automatically generated. Multiple files(scripts) are used for configuring GRUB's menu and some of these files are stored under the /etc/grub.d/ directory, such as the following: Partition numbers - start at 1, but physical device/ numbering start from 0. So for example, hd(0,1) refers to the first partition on the first drive (hd0). In contrast in GRUB Legacy it would be (hd0,0)
 * 1) 00_header - Sets the default values for some general GRUB variables such as graphics mode, default selection, timeouts and so on.
 * 2) 10_linux - Helps to find all the kernels on the root device of the current operating system, and automatically creates associated GRUB entries for all the kernels it finds.
 * 3) 30_os-prober - Automatically probes for other operating system that might be installed on the system. Especially useful in dual-boot systems.
 * 4) 40_custom - Where users can edit and store custom menu entries and directives

/boot/grub2/grub.cfg file is automatically generated and updated by invoking the grub2-mkconfig command.

Example of creating new menu entry.
 * 1) vim /etc/grub.d/99_custom.sh && + chmod +x 99_custom.sh

EOF
2. grub2-mkconfig -o /boot/grub/grub2.cfg