Grub efi does not execute /efi/boot/grub.cfg and goes in shell mode

Bug #1478848 reported by Nicolas Gama
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After installing Ubuntu 15.04 in efi mode, grub efi amd64 does not boot properly:
when the computer boots, it goes directly into grub shell mode,
it does not execute the grub.cfg configuration file in the efi partition (either /efi/boot/grub.cfg or /efi/ubuntu/grub.cfg, depending on whereas the --removable option was provided or not).

from the grub shell, executing the following command resumes normal boot operations.
configfile /efi/boot/grub.cfg
or
configfile /efi/ubuntu/grub.cfg

Reproduce this bug:

install grub with:
the alternate cd (regular ubuntu installation)
or
grub-install --target x86_64-efi --efi-directory ... --root-directory ...
or
grub-install --target x86_64-efi --efi-directory ... --root-directory ... --removable

and try to reboot.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: grub-efi-amd64 2.02~beta2-22ubuntu1.1
ProcVersionSignature: Ubuntu 3.19.0-18.18-generic 3.19.6
Uname: Linux 3.19.0-18-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: LXDE
Date: Tue Jul 28 10:51:54 2015
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nicolas Gama (gama-nicolas) wrote :
Revision history for this message
Nicolas Gama (gama-nicolas) wrote :

More information:
it seems that the prefix is wrongly set when normal.mod is loaded:

echo $root shows (hd0,gpt1)
echo $prefix shows (hd0,gpt1)/boot/grub

On my system, (hd0,gpt1) is the EFI System partition and the linux root is (hd0,gpt3)

This means that normal.mod is looking for (hd0,gpt1)/boot/grub/grub.cfg instead of (hd0,gpt1)/efi/boot/grub.cfg

I guess that the right prefix should be (hd0,gpt1)/efi/boot ?
Is it grub-mkimage or grub-install who does this mistake?

In any cases, copying /efi/boot/grub.cfg to /boot/grub/grub.cfg inside the EFI partition is a dirty workaround, but it will works until a fix is committed.

Revision history for this message
Phillip Susi (psusi) wrote :

What argument did you give to --root-directory? You shouldn't need the argument unless you are booted from a livecd and aren't chrooted into your installed system. If you specified /boot/efi, then that would be the problem: it should be your root directory.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Nicolas Gama (gama-nicolas) wrote :

I tried first without --root-directory, then with
--root-directory /
from the system itself.

Then, from a live USB, I tried using --root-directory /mnt/bla (where /mnt/bla was the mount point)

They all give the same result: the system doesnt boot, we are left with the grub shell where root and prefix point inside the EFI system partition.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.