10.2.1 The File /boot/grub2/grub.cfg
The graphical splash screen with the boot menu is based on the GRUB2 conguration
le /boot/grub2/grub.cfg, which contains all information about all partitions
or operating systems that can be booted by the menu.
Every time the system is booted, GRUB2 loads the menu le from the le system. For
this reason, GRUB2 does not need to be re-installed after every change to the le. grub
.cfg is automatically rebuilt with kernel installations or removals.
grub.cfg is compiled from the le /etc/default/grub and scripts found in
the /etc/grub.d/ directory with the grub2-mkconfig -o
/boot/grub2/grub.cfg command. Therefore you should never edit the le
manually. Instead, edit the related source les under /etc/grub.d/ or use the YaST
boot loader to modify the GRUB2 conguration as described in Section 10.3, “Cong-
uring the Boot Loader with YaST” (page 186).
10.2.2 The File /etc/default/grub
More general options of GRUB2 belong here, such as the time the menu is displayed,
or the default OS to boot. To list all available options, see the output of the following
command:
grep "export GRUB_DEFAULT" -A50 /usr/sbin/grub2-mkconfig | grep GRUB_
In addition to already dened variables, the user may introduce their own variables,
and use them later in the scripts found in the /etc/grub.d directory.
After you edit /etc/default/grub, run grub2-mkconfig -o
/boot/grub2/grub.cfg to update the main conguration le.
10.2.2.1 General Options
This section details some of the options commonly used in the /etc/default/grub
le. For their complete list, see GNU GRUB manual [http://www.gnu.org/
software/grub/manual/grub.html#Simple-configuration].
The Boot Loader GRUB2 179