E.3. Installing GRUB


In a vast majority of cases, GRUB is installed and configured by default during the installation of Red Hat Enterprise Linux. However, if for some reason GRUB is not installed, or if you need to install it again, it is possible to install grub manually.
On systems without UEFI firmware, a valid GRUB configuration file must be present at /boot/grub/grub.conf. You can use the grub-install script (part of the grub package) to install GRUB. For example:
# grub-install disk
Replace disk with the device name of your system's boot drive such as /dev/sda.
On systems with UEFI firmware, a valid GRUB configuration file must be present at /boot/efi/EFI/redhat/grub.conf. An image of GRUB's first-stage boot loader is available on the EFI System Partitition in the directory EFI/redhat/ with the filename grubx64.efi, and you can use the efibootmgr command to install this image into your system's EFI System Partition. For example:
# efibootmgr -c -d disk -p partition_number -l /EFI/redhat/grubx64.efi -L "grub_uefi"
Replace disk with the name of the device containing the EFI System Partition (such as /dev/sda) and partition_number with the partition number of your EFI System Partition (the default value is 1, meaning the first partition on the disk).

Important

The grub package does not automatically update the system boot loader when the package is updated using Yum or RPM. Therefore, updating the package will not automatically update the actual boot loader on your system. Use the grub-install command manually every time after the package is updated.
For additional information about installing GRUB, see the GNU GRUB Manual and the grub-install(8) man page. For information about the EFI System Partition, see Section 9.18.1, “Advanced Boot Loader Configuration”. For information about the efibootmgr tool, see the efibootmgr(8) man page.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.