Freya UEFI install boots to grub prompt

Bug #1492801 reported by Desmond Miles on 2015-09-06
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
elementary OS
New
Undecided
Unassigned

Bug Description

Hello, I installed Freya 0.3.1 on my PC in UEFI mode but it just boots into grub prompt.

I figured out what's going on here.

At the grub prompt when I type configfile (hd0,gpt2)/boot/grub/grub.cfg I can boot into Freya.

It seems that the grub path in the file "/boot/efi/EFI/grub/grubx64.efi" which is generated during install and located on the EFI partition is not set to "/boot/grub/" or something.

When I copy "/boot/grub/x86_64-efi/grub.efi" as "/boot/efi/EFI/grub/grubx64.efi" it boots into Freya.

賴家亨 (laichiaheng) wrote :

So you know where the problem is and how to solve it!
I have the same problem too, please vote for it: https://bugs.launchpad.net/elementaryos/+bug/1492256

賴家亨 (laichiaheng) wrote :

So you just move the file when you are using the live usb??

賴家亨 (laichiaheng) wrote :

Have you input commands after copying the grub.efi to /boot/efi/EFI/grub/grubx64.efi?

賴家亨 (laichiaheng) wrote :

I copy the grub.efi and rename it to grubx64.efi and put it in /boot/efi/EFI/grub/, but It still boots into grub prompt.

Rob Hartley (8ob) wrote :

I can confirm that the the instructions offered solve the issue for me.

To confirm, this is the steps I followed:

- Install Elementary Freya 0.3.1 as normal with 3 partitions (EFIBoot [sda2], Swap [sda3], and Root[sda4])
- Upon rebooting, system does not load eOS, and instead drops me to a minimal grub shell
- Enter the following command as suggested to get to a functional grub loader:

configfile (hd0, gpt4)/boot/grub/grub.cfg

- After this, the system booted and I was able to log in ok.
- Next, I followed the instructions to replace the grub efi file. Here are my steps:

cd /boot/efi/EFI/grub
sudo cp grubx64.efi grubx64.efi.backup (just in case)
sudo rm grubx64.efi
sudo cp /boot/grub/x86_64-efi/grub.efi /boot/efi/EFI/grub/grubx64.efi

This left me with a working system.

This is only a workaround though. The real question is why this happens in the first place. I did not receive any errors during installation that would suggest grub failed to configure the system properly.

I also tried running boot-repair from a live session, but this did not solve the issue either.

If anyone needs any logs or command outputs to help debug I'd be happy to oblige.

賴家亨 (laichiaheng) wrote :

Thanks, it works!

HaselnuesseTo (k-nikulski) wrote :

Thank you! But secure boot still isn't working :/
I used your guide to answer this question: http://elementaryos.stackexchange.com/questions/1776/how-can-i-fix-a-secure-boot-failure-when-i-installed-0-3-1-without-internet/1884#1884

Joel Almeida (joelalmeidaptg) wrote :

This happens to me too, even when installing with internet. I get a weird name in the UEFI selection in BIOS, grub instead of elementary os, and it fails to boot.

Desmond Miles (desmond-miles) wrote :

You can move the file while still booted to Live USB or you can do it from WinPE if that is easier for you.

Backup the grub.efi file and then in WinPE CMD type diskpart then type list volume then select the EFI partition and type ASSIGN LETTER=F, then replace the file on F:

About Secure Boot, for it to work it needs to boot the shim.efi file that is located on EFI partition, I am not sure how to make it work with the replaced grub file and the shim file, but you can experiment with it.

I hope this will be fixed in next release.

DJ Roberts (arudis4x) wrote :

This is going about it the long way, but.... I had this exact same issue on my desktop after having NOT had the issue on my laptop. But after looking at the forums here I realized that the reason I didn't have the issue on my laptop is because I installed ubuntu first. It was a dual-boot win10 & ubuntu system. I cleared out that partition on my ssd and replaced it with elementary and it booted just fine. Tried that on my desktop (installing ubuntu then installing elementary after a successful ubuntu boot to check) and it worked perfectly. Not sure if this will help figure out what may be causing it or not but I figured it might be useful information. Again, Installing ubuntu first, then overwriting it with elementary causes a perfect no-issues boot.

Francisco Mateo (cisco21c) wrote :

Confirming this happens to me as well, even with connecting to a network during installation. Downloaded the ISO straight from elemntary, used Rufus with ISO mode for USB. Installation finished without any errors, but then on boot drops me into the grub shell.

Following Rob Hartley's method fixes the issue.

Phil (phil-lacan) wrote :

When I input configfile (hd0, gpt4)/boot/grub/grub.cfg it says "error: filename expected."
What should I do now?

Calimero (levikinglorrain) wrote :

I had to move the efi file not into /boot/efi/EFI/grub/grubx64.efi but into /boot/efi/EFI/ubuntu/grubx64.efi

@Phil (phil-lacan) : the hd0 design your hard drive (hd0 for sda, hd1 for sdb, hd2 for sdc...) and design the main partition number. So it maybe not gpt4 for you. For me it was gpt2. You could try each possibilty, or boot onto live linux and see what is the good number partition

Miguel Victor (migzwebhost) wrote :

I got no efi directory under /boot, what have i done wrong ? :(

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers