ttps://docs.fedoraproject.org/en-US/Fedora/21/html/System_Administrators_Guide/sec-Reinstalling_GRUB_2.html#sec-Using_the_grub2-install_Command Section 20.4 and 20.4.1 apply only to BIOS computers, not UEFI. On UEFI: 1. grub2-install fails https://bugzilla.redhat.com/show_bug.cgi?id=1101352 2. If grub2-efi-modules is installed, grub2-install succeeds but then: 2a. This will break UEFI Secure Boot systems because the core.img/grubx64.efi binary that gets created isn't signed and therefore UEFI Secure Boot will reject it. 2b. On UEFI systems without Secure Boot, GRUB behavior is different in a number of ways including that it will no longer look to /boot/efi/EFI/fedora/grub.cfg but rather to /boot/grub2/grub.cfg. Two ways to fix the documentation: a.) A side bar that says this section doesn't apply to systems with UEFI firmware (maybe a link to where we give them a hint "how to find out what kind of firmware you have"), and/or that this section is effectively done by 20.4.2 step 3. b.) Reorganize 20.4 into discreet BIOS and UEFI sections.
Hello Chris Thank you for raising this bug: Link to doc: http://docs.fedoraproject.org/en-US/Fedora/21/html/System_Administrators_Guide/sec-Resetting_and_Reinstalling_GRUB_2.html
Hello Proposed change: 20.4. Reinstalling GRUB 2 Reinstalling GRUB 2 is a convenient way to fix certain problems usually caused by an incorrect installation of GRUB 2, missing files, or a broken system. Other reasons to reinstall GRUB 2 include the following: Upgrading from the previous version of GRUB. The user requires the GRUB 2 boot loader to control installed operating systems. However, some operating systems are installed with their own boot loaders. Reinstalling GRUB 2 returns control to the desired operating system. Adding the boot information to another drive. 20.4.1. Reinstalling GRUB 2 on BIOS-Based Machines When using the yum grub2-install command, the boot information is updated and missing files are restored. Note that the files are restored only if they are not corrupted. Use the yum grub2-install <device> command to reinstall GRUB 2 if the system is operating normally. For example: ~]# yum grub2-install /dev/sda 20.4.2. Reinstalling GRUB 2 on UEFI-Based Machines When using the yum reinstall grub2-efi command, the boot information is updated and missing files are restored. Note that the files are restored only if they are not corrupted. Use the yum reinstall grub2-efi <device> command to reinstall GRUB 2 if the system is operating normally. For example: ~]# yum reinstall grub2-efi /dev/sda
Delete the yum reference in section 20.4.1. The correct command is: # grub2-install /dev/sdX ## (where X is the applicable drive letter) Add shim to, and remove /dev/sda from, the reinstall commend in section 20.4.2. The correct command is: # yum reinstall grub2-efi shim ## Fedora 21 and older # dnf reinstall grub2-efi shim ## Fedora 22 and newer
Hello Thank you for comment 3 I will use: 20.4.1. Reinstalling GRUB 2 on BIOS-Based Machines When using the grub2-install command, the boot information is updated and missing files are restored. Note that the files are restored only if they are not corrupted. Use the grub2-install device command to reinstall GRUB 2 if the system is operating normally. For example, if sda is your device: ~]# grub2-install /dev/sda 20.4.2. Reinstalling GRUB 2 on UEFI-Based Machines When using the yum reinstall grub2-efi command, the boot information is updated and missing files are restored. Note that the files are restored only if they are not corrupted. Use the yum reinstall grub2-efi shim command to reinstall GRUB 2 if the system is operating normally. For example: ~]# yum reinstall grub2-efi shim ----------------- I will do the yum to dnf changes as a separate commit Thank you
errr, I missed one "shim" in "When using the yum reinstall grub2-efi command" 20.4.1. Reinstalling GRUB 2 on BIOS-Based Machines When using the grub2-install command, the boot information is updated and missing files are restored. Note that the files are restored only if they are not corrupted. Use the grub2-install device command to reinstall GRUB 2 if the system is operating normally. For example, if sda is your device: ~]# grub2-install /dev/sda 20.4.2. Reinstalling GRUB 2 on UEFI-Based Machines When using the yum reinstall grub2-efi shim command, the boot information is updated and missing files are restored. Note that the files are restored only if they are not corrupted. Use the yum reinstall grub2-efi shim command to reinstall GRUB 2 if the system is operating normally. For example: ~]# yum reinstall grub2-efi shim
commit da159560f733d2bd44479dd3452a52d67579630e Author: Stephen Wadeley <swadeley> Date: Thu May 14 21:30:06 2015 +0200 grub2 install distinguish BIOS and UEFI Bug 1220066 - grub2-install suggestion doesn't distinguish between BIOS and UEFI installs Thank you Chris Murphy for raising this bug. Thank you Peter Jones for advice.
Should this section point to a section or a concise tip/sidebar on how to identify firmware type? Opened new bug 1221780 to track that question separately.
Oops.
Hello This is now live in Fedora 22 version. See: http://docs.fedoraproject.org/en-US/Fedora/22/html/System_Administrators_Guide/sec-Reinstalling_GRUB_2.html Please feel free to reopen this bug if more work is need on the section. The commit is in the 21 branch as well in case we need to republish that guide. Thank you
Hi Stephen, Very good documentation! Could you add grub2-tools to step 3 to compensate for step1 deletion of "/etc/grub.d/*" contents? 3. For EFI systems only, run the following command: ~]# yum reinstall grub2-efi shim grub2-tools thank you.
I encountered the issue on Centos7 but grub2-tools delivers /etc/grub.d/* files on Fedora rawhide also so assume fix works there also.
Forgot to mention its Section 20.4.3 https://docs.fedoraproject.org/en-US/Fedora/22/html/System_Administrators_Guide/sec-Resetting_and_Reinstalling_GRUB_2.html
Hmm 20.4.3 contains stale information. https://bugzilla.redhat.com/show_bug.cgi?id=1313022 I think the section 20.4.3 concerns are better off in that bug since this one was closed.
Thanks Chris. Reverting to closed->currentrelease
I do not think just adding documentation is a good fix. Users running grub2-install should be told that using GRUB2's EFI boot loader is not supported on Fedora and gracefully exit (or provide an override). Documentation is fine but users are not going to be looking at documentation when they run the command. Reopening, a proper solution is have a script in grub.d that can notify the user they can't run grub2-install because this will break their booting.
Opened a new bug. Closing this one again.
(In reply to Chris Murphy from comment #16) > Opened a new bug. Closing this one again. Thank you