Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (Not For Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (Not For Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Thread Tools Search this Thread Display Modes
Old 16th March 2017, 03:13 PM
jonathonp's Avatar
jonathonp Offline
Registered User
Join Date: Oct 2006
Location: Melbourne
Age: 46
Posts: 571
How to reinstall Grub EFI in Fedora with Fedora-Workstation-Live media

How to reinstall Grub EFI in Fedora with Fedora-Workstation-Live media & also remove EFI boot entries

1. Boot Fedora Workstation live media

2. Open gnome terminal and locate the Fedora partitions:
lsblk -f
You could also use fdisk
fdisk -l
3. Mount the Fedora installation partitions:
[liveuser@localhost-live ~]$
[root@localhost-live liveuser]#
mount /dev/sda5 /mnt
[root@localhost-live liveuser]#
mount /dev/sda4 /mnt/boot
[root@localhost-live liveuser]#
mount /dev/sda1 /mnt/efi

4. Bind the required parts of the file system:
[root@localhost-live liveuser]#
mount --bind /dev /mnt/dev
[root@localhost-live liveuser]#
mount --bind /proc /mnt/proc
[root@localhost-live liveuser]#
mount --bind /sys /mnt/sys
Enable network access in chroot:
[root@localhost-live liveuser]#
mount -o bind /run /mnt/run
NOTE: "mount -o bind /etc/resolv.conf /mnt/etc/resolv.conf" has been deprecated from what i understand.

5. Change root
[root@localhost-live liveuser]#
 chroot /mnt

6. Reinstall grub efi:
[root@localhost-live /]#
dnf reinstall grub2-efi grub2-efi-modules shim
Last metadata expiration check: 3:55:40 ago on Thu Mar 16 20:21:06 2017.
No match for argument: grub2-efi-modules
Dependencies resolved.
================================================== ==============================
Package Arch Version Repository Size
================================================== ==============================
grub2-efi x86_64 1:2.02-0.38.fc25 updates 1.1 M
shim x86_64 0.8-10 fedora 634 k

Transaction Summary
================================================== ==============================

Total download size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): shim-0.8-10.x86_64.rpm 341 kB/s | 634 kB 00:01
(2/2): grub2-efi-2.02-0.38.fc25.x86_64.rpm 473 kB/s | 1.1 MB 00:02
Total 183 kB/s | 1.7 MB 00:09
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Reinstalling: shim-0.8-10.x86_64 1/4
Reinstalling: grub2-efi-1:2.02-0.38.fc25.x86_64 2/4
Erasing : shim-0.8-10.x86_64 3/4
Erasing : grub2-efi-1:2.02-0.38.fc25.x86_64 4/4
Verifying : grub2-efi-1:2.02-0.38.fc25.x86_64 1/4
Verifying : shim-0.8-10.x86_64 2/4
Verifying : grub2-efi-1:2.02-0.38.fc25.x86_64 3/4
Verifying : shim-0.8-10.x86_64 4/4

grub2-efi.x86_64 1:2.02-0.38.fc25 shim.x86_64 0.8-10


7. Update grub efi:
[root@localhost-live /]#
grub2-mkconfig -o /efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.9.13-201.fc25.x86_64
Found initrd image: /boot/initramfs-4.9.13-201.fc25.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-374c398df90b4840ba6534b92ae530ed
Found initrd image: /boot/initramfs-0-rescue-374c398df90b4840ba6534b92ae530ed.img
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Arch on /dev/sda8
Found Ubuntu 16.10 (16.10) on /dev/sdb1
Found CentOS Linux release 7.3.1611 (Core) on /dev/sdb13
Found unknown Linux distribution on /dev/sdb3
Found Solus (2017.01.01.0) on /dev/sdb5
[root@localhost-live /]#
[root@localhost-live /]#
EFI Boot Manager example (used this on my laptop)

1. To read man pages:
man efibootmgr
[jonathon@localhost ~]$ su

2. Use the following command to view boot entries.

[root@localhost jonathon]#
efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0003,0002,0004,0001,0000
Boot0000* Windows Boot Manager HD(1,GPT,dc17ccb7-ce74-4f27-8e7d-902fc30ed04f,0x800,0xfa000)/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.}....................
Boot0001* arch HD(1,GPT,dc17ccb7-ce74-4f27-8e7d-902fc30ed04f,0x800,0xfa000)/File(\EFI\ARCH\GRUBX64.EFI)
Boot0002* Fedora HD(1,GPT,dc17ccb7-ce74-4f27-8e7d-902fc30ed04f,0x800,0xfa000)/File(\EFI\FEDORA\SHIM.EFI)
Boot0003* ubuntu HD(1,GPT,dc17ccb7-ce74-4f27-8e7d-902fc30ed04f,0x800,0xfa000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0004* Linux Boot Manager HD(1,GPT,dc17ccb7-ce74-4f27-8e7d-902fc30ed04f,0x800,0xfa000)/File(\EFI\GOOFIBOOT\GOOFIBOOTX64.EFI)

3. Delete an entry:

[root@localhost jonathon]#
efibootmgr -b 0001 -B
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0003,0002,0004,0000
Boot0000* Windows Boot Manager
Boot0002* Fedora
Boot0003* ubuntu
Boot0004* Linux Boot Manager

Delete an entry:
[root@localhost jonathon]#
 efibootmgr -b 0004 -B
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0003,0002,0000
Boot0000* Windows Boot Manager
Boot0002* Fedora
Boot0003* ubuntu
[root@localhost jonathon]#

As you can see the 2 entries Boot0001* arch and Boot0004* Linux Boot Manager have been removed.

Recently i decided to change from Legacy mode to UEFI mode and see if there is any benefit in doing things this way when running multiple Linux installations. I'm sticking with efi mode Jonathon
PC CPU 3.60 Gigahertz Intel Core i7-4790, Motherboard Gigabyte H97M-D3H RAM: 32GB: Fedora 25 MATE x64, ARCH KDE, Solus OS Budgie
Asus Zenbook UX305CA: Fedora 25 Gnome
HP Elitebook 2170p Ubuntu 16.1 Unity & Arch Mate

Last edited by jonathonp; 17th March 2017 at 12:07 AM.
Reply With Quote

chroot , efi , fedora , fedoraworkstationlive , grub , media , network , reinstall

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reinstall grub efi in Fedora 25? jonathonp Installation, Upgrades and Live Media 7 17th March 2017 04:37 PM
Is there any non-live and non-netinst Fedora 23 workstation iso? MarioPL98 Installation, Upgrades and Live Media 2 21st November 2015 01:40 AM
How to reinstall grub2 on fedora 21 using a live image and chroot humbleRumble Installation, Upgrades and Live Media 6 20th April 2015 03:27 PM
Can I reinstall Fedora 16 with the live same DVD and keep all my stuff? Oakems EOL (End Of Life) Versions 4 28th January 2014 11:29 PM
How to reinstall grub 2 in Fedora 16? jonathonp Using Fedora 13 13th December 2011 06:18 AM

Current GMT-time: 01:02 (Saturday, 21-10-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat