3.3. Systems with UEFI firmware
The EFI/BOOT/grub.cfg configuration file on the boot media contains a list of preconfigured menu entries and other directives which controls the appearance and the Boot menu functionality. In the configuration file, the default menu entry for Red Hat Enterprise Linux (Test this media & install Red Hat Enterprise Linux 10) is defined in the following block:
menuentry 'Test this media & install Red Hat Enterprise Linux 10.0' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RHEL-10-0-BaseOS-x86_64 rd.live.check quiet
initrdefi /images/pxeboot/initrd.img
}
Where:
menuentry- Defines the title of the entry. It is specified in single or double quotes ('or"). You can use the--classoption to group menu entries into different classes, which can then be styled differently by using GRUB2 themes.참고As shown in the above example, you must enclose each menu entry definition in curly braces (
{}).linuxefi- Defines the kernel that boots (/images/pxeboot/vmlinuzfrom the example) and the other additional options, if any.You can customize these options to change the behavior of the boot entry.
One of the notable options is
inst.ks=, which allows you to specify a location of a Kickstart file. You can place a Kickstart file on the boot ISO image and use the inst.ks= option to specify its location; for example, you can place akickstart.ksfile into the image’s root directory and useinst.ks=hd:LABEL=RHEL-10-0-BaseOS-x86_64:/kickstart.ks.You can also use
dracutoptions which are listed on thedracut.cmdline(7)man page on your system.중요When using a disk label to refer to a certain drive, for example,
inst.stage2=hd:LABEL=RHEL-10-BaseOS-x86_64, replace all spaces with\x20.-
initrdefi- Location of the initial RAM disk (initrd) image to be loaded.
Other options used in the grub.cfg configuration file are:
set timeout- Determines how long is the boot menu displayed before the default menu entry is automatically used. The default value is60, which means the menu is displayed for 60 seconds. Setting this value to-1disables the timeout completely.참고Setting the timeout to
0is useful when performing a headless installation, because this setting immediately activates the default boot entry.submenu- A submenu block allows you to create a sub-menu and group some entries under it, instead of displaying them in the main menu. TheTroubleshootingsubmenu in the default configuration contains entries for rescuing an existing system.The title of the entry is in single or double quotes (
'or").The
submenublock contains one or moremenuentrydefinitions as described above, and the entire block is enclosed in curly braces ({}) For example:submenu 'Submenu title' { menuentry 'Submenu option 1' { linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RHEL-10-0-BaseOS-x86_64 nomodeset quiet initrdefi /images/pxeboot/initrd.img } menuentry 'Submenu option 2' { linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RHEL-10-0-BaseOS-x86_64 inst.rescue quiet initrdefi /images/pxeboot/initrd.img } }-
set default- Determines the default entry. The entry numbers start from0. If you want to make the third entry the default one, useset default=2and so on. -
theme- Determines the directory which contains GRUB2 theme files. You can use the themes to customize visual aspects of the boot loader - background, fonts, and colors of specific elements.