[multiboot-guide] master: Reinstalling GRUB on UEFI systems (0bf512f)

immanetize at fedoraproject.org immanetize at fedoraproject.org
Mon Jan 26 23:44:26 UTC 2015


Repository : http://git.fedorahosted.org/cgit/docs/multiboot-guide.git

On branch  : master

>---------------------------------------------------------------

commit 0bf512fd4bd2d22d393113a6ecb3c6489a85f0ad
Author: Pete Travis <immanetize at fedoraproject.org>
Date:   Mon Jan 26 15:44:05 2015 -0700

    Reinstalling GRUB on UEFI systems
    
    No GRUB? Trash your EFI system partition? Look here for salvation.


>---------------------------------------------------------------

 en-US/GRUB-reinstalling.xml |   95 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 93 insertions(+), 2 deletions(-)

diff --git a/en-US/GRUB-reinstalling.xml b/en-US/GRUB-reinstalling.xml
index 57cb522..2096c83 100644
--- a/en-US/GRUB-reinstalling.xml
+++ b/en-US/GRUB-reinstalling.xml
@@ -5,8 +5,8 @@
 
 ]>
 
-<section id="GRUB-reinstalling">
-  <title>Reinstalling GRUB</title>
+<section id="GRUB-recreating">
+  <title>Recreating GRUB</title>
   <para>
     This section describes the process for reinstalling the GRUB bootloader and recreating the configuration. Unlike legacy GRUB, which required users to manually create entries, GRUB2 will scan the system for bootable systems and automatically create the menu configuration.  There are a number of reasons to reinstall GRUB:
     <simplelist>
@@ -38,6 +38,97 @@
 <prompt>#</prompt><command>grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg</command>
         </screen>
       </para>
+      <para>
+        In most cases, this operation will detect any operating system available on your computer and create entries for them in the GRUB menu. Actually reinstalling the GRUB bootloader isn't required, just reconfiguring.
+      </para>
+      <para>
+        If Fedora does not boot because of an invalid GRUB configuration, you can perform the procedure above from a <xref linkend="common-chroot_from_live">chroot</xref> to repair it.
+      </para>
     </section>
+    <section id="GRUB-reinstalling">
+      <title>Reinstalling GRUB</title>
+      <para>
+        In some cases, you may need to reinstall the GRUB bootloader itself.  It might be because another operating system has overwritten GRUB, or because of some inadvertent action.  This section explains how to do that, but if you do have a GRUB menu or GRUB prompt, you probably don't need to perform the operations.  This section assumes that you have tried all of the firmware boot options, and are sure you do not have a functioning GRUB bootloader on your system.
+      </para>
+      <para>
+        Be careful not to mix up the different instructions for UEFI and legacy systems.  Installing the wrong implementation of GRUB can cause problems that are difficult to resolve.
+      </para>
+      <section id="GRUB-reinstalling-UEFI">
+        <title>Reinstalling GRUB on UEFI systems.</title>
+        <procedure>
+          <title>Reinstalling GRUB on UEFI systems.</title>
+          <step>
+            <para>
+              Enter your installed system in a chroot using the instructions in <xref linkend="common-chroot_from_live" />.  Be sure to boot the live image in UEFI mode.
+            </para>
+          </step>
+          <step>
+            <para>
+              Reinstall the packages that provide bootloader files.  This will recreate any Fedora files missing from the EFI system partition.
+            </para>
+            <screen>
+<prompt>#</prompt> <command>yum reinstall grub2-efi shim</command>
+            </screen>
+          </step>
+          <step>
+            <para>
+              Optionally, recreate the firmware boot entry.  You only need to do this if the Fedora entry is missing, so check to see if the Fedora entry is present before continuing.
+            </para>
+            <substeps>
+              <step>
+                <para>
+                  Check the existing firmware boot entries.
+                </para>
+                <screen>
+<prompt>#</prompt> <command>efibootmgr -v</command>
+<computeroutput>
+  BootCurrent: 0015
+  Timeout: 1 seconds
+  BootOrder: 0015,0000
+  Boot0000* Windows Boot Manager  HD(3,2e9a5000,32000,0d13443c-6bf1-4952-960c-c05ba2b3fd8c)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a...............
+  Boot0015* Fedora  HD(1,800,64000,211be689-9d4f-4034-bbc9-4e03372165db)File(\EFI\fedora\grubx64.efi)
+  Boot0018* SATA : PORT 4 : HL-DT-ST BD-RE  WH14NS40  BIOS(3,0,00)AMBO
+  Boot0019* SATA : PORT 6G 0 : ST31500341AS : PART 0 : Boot Drive BIOS(2,0,00)AMBO
+</computeroutput>
+                </screen>
+              </step>
+              <step>
+                <para>
+                  If the Fedora entry is missing, check the installation logs to get the command to put it back.
+                </para>
+                <screen>
+<prompt>#</prompt> <command>grep efibootmgr /var/log/anaconda/anaconda.program.log</command>
+<computeroutput>
+05:43:07,548 INFO program: Running... efibootmgr
+05:43:07,566 INFO program: Running... efibootmgr -c -w -L Fedora -d /dev/sda -p 2 -l \EFI\fedora\shim.efi
+</computeroutput>
+                </screen>
+              </step>
+              <step>
+                <para>
+                  Run the <command>efibootmgr</command> invocation again.  If needed, adjust the arguments to fit your EFI system partition's location. In this example, <option>-d /dev/sda</option> places that partition on the <filename class="partition" >/dev/sda</filename>, and <option>-p 2</option> designates the second partition on the drive.
+                </para>
+                <screen>
+<prompt>#</prompt> <command>efibootmgr -c -w -L Fedora -d /dev/sda -p 2 -l \EFI\fedora\shim.efi</command>
+                </screen>
+              </step>
+            </substeps>
+          </step>
+          <step>
+            <para>
+              Exit the chroot and reboot your system into Fedora.
+              <!-- TODO: link to EFI boot order help from here -->
+            </para>
+          </step>
+        </procedure>
+      </section>
+
+
+     <para />
+      </section>
+      <section id="GRUB-reinstalling-BIOS">
+        <title>Reinstalling GRUB on BIOS systems.</title>
+        <para />
+      </section>
   </section>
 <!-- see TODO.xml for some additional information you may choose to add -->



More information about the docs-commits mailing list