Ask Your Question

Rebuild grub2 EFI boot

asked 2016-02-16 18:22:00 -0500

yn1v gravatar image

updated 2016-02-17 19:41:21 -0500

I switched disks and instead of fixing a bad disk I destroyed my grub. I booted with super grub2 disk and here is what I got so far:

uname -srvmpio

Linux 4.3.5-300.fc23.x86_64 #1 SMP Mon Feb 1 03:18:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

dnf reinstall grub2-efi.x86_64 grub2-efi-modules.x86_64 shim.x86_64

Reinstalled: grub2-efi.x86_64 1:2.02-0.25.fc23 shim.x86_64 0.8-8

fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: C76AE882-9508-4A41-A2FF-DD860DCD6BA7

Device Start End Sectors Size Type /dev/sda1 2048 411647 409600 200M EFI System /dev/sda2 411648 1435647 1024000 500M Linux filesystem /dev/sda3 1435648 976773119 975337472 465.1G Linux LVM

grub2-install /dev/sda

grub2-install: error: /usr/lib/grub/x86_64-efi/ doesn't exist. Please specify --target or --directory.

find -name

./usr/lib/grub/i386-pc/ ./boot/grub2/i386-pc/ ./run/media/neville/ISOIMAGE/boot/grub/x86_64-efi/

grub2-install --directory /usr/lib/grub/i386-pc /dev/sda

Installing for i386-pc platform. grub2-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible. grub2-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. grub2-install: error: will not proceed with blocklists.

What should I do next ?

Let me flesh out this a little bit. I have a computer with x64 workstation. It has three partitions. EFI, boot and LVM where system files are located. I was trying to rebuilt one grub2-efi in another disk and going back and forward sent some rebuilt to my hard drive.

So I booted with super grub2 disk and located my system. So I have my system running, but I am unable to re-create my grub to be able to boot. I put all information that is relevant, like my current OS using OS, partitions using fdisk, the response to reinstall grub2-efi, the fact that I don't have any x86_64 grub file only i386, which is odd, but not too odd as I checked a clean install and is the same.

Next there is my try, to rebuilt the grub and the errors that I got. So, what should I do? Should I look for a repair tool and verify the hard drive to overcome those warnings? I am right thinking that I do not need to do chroot and mount --bind as using my actual system with the help of super grub2 disk, I already have the current system ready to be recovered... right?

edit retag flag offensive close merge delete


I have this same problem. In ubuntu I could just run boot-repair but with fedora I cant restore boot

samjbr gravatar imagesamjbr ( 2017-12-16 15:20:12 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2017-12-16 15:32:11 -0500

samjbr gravatar image

I commented before, for me it works now that I installed the following:

sudo dnf install grub2-efi-x64-modules.noarch

You can also use grub-customizer, is a GUI and runs grub2-install when you press 'Install to MBR'

edit flag offensive delete link more

answered 2017-12-18 12:57:49 -0500

cmurf gravatar image

updated 2017-12-18 12:59:21 -0500

On Fedora, with a computer that has UEFI firmware, do not run grub2-install. If you do, you will end up with a non-standard installation that almost no one will understand or be able to help out with. The following commands reinstall the Fedora built shim and GRUB EFI binaries onto the EFI System partition.

Fedora 26 and older

sudo dnf reinstall grub2-efi shim

Fedora 27 and newer (assumes x86-64 arch, other archs are supported)

sudo dnf reinstall grub2-efi-x64 shim-x64
edit flag offensive delete link more


I guess that is because secure boot requires a signed grub image (and shim) in /boot/efi/EFI/fedora. and that grub2-install will override that image with an images generated from various grub modules. I don't have UEFI so I can't verify this.

villykruse gravatar imagevillykruse ( 2017-12-19 12:30:43 -0500 )edit

Question Tools

1 follower


Asked: 2016-02-16 18:22:00 -0500

Seen: 12,502 times

Last updated: Dec 18 '17