Bug 772505 - GRUB-EFI boot fail, only get a grub prompt
GRUB-EFI boot fail, only get a grub prompt
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
: 770584 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-01-08 18:00 EST by Martin Jürgens
Modified: 2012-11-28 05:20 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-28 05:20:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Jürgens 2012-01-08 18:00:51 EST
Description of problem:
I'm creating an EFI-bootable USB stick of Fedora 16 x64 using the following command on my Dell Latitude E5520:

livecd-iso-to-disk  --format --efi Fedora-16-x86_64-Live-Desktop.iso  /dev/sdb

When booting from it, I only get a grub command promt (same happens when I boot from CD).

If I select the disk using the root command (root (hd1)), I get this:
Filesystem type unknown

If I then use kernel /EFI/boot/... to boot, I get: Error 17: Cannot mount selected partition.

This works fine with Windows 7 and Ubuntu.

How reproducible:
Comment 1 Chris Murphy 2012-01-08 18:24:32 EST
The root should be (hd0,0). When at the grub prompt type the following commands and report the results:


find /Efi/boot/vmlinuz0
Comment 2 Martin Jürgens 2012-01-09 04:12:22 EST
grub> root
 (hd0,2,a) : Filesystem type unknown, partition type 0x0
grub> find /Efi/boot/vmlinuz0
(cursor keeps blinking)
Comment 3 Chris Murphy 2012-01-09 04:18:20 EST
That is not a typo? (hd0,2,a)

If you boot a working linux installation and insert this USB stick, what does 'parted -l' reveal on this device?
Comment 4 Chris Murphy 2012-01-09 04:22:48 EST
Could you post the grub.conf (named bootx64.conf) from the USB stick? And also post the grub.conf that's on this system's boot partition? (I'm assuming the EFI computer you're testing the boot stick on, has an EFI installation of linux already on an internal hard drive?
Comment 5 Martin Jürgens 2012-01-09 04:34:32 EST
(hd0,2,a): its not a typo

heres the parted output:
Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdb: 8004MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  8003MB  8002MB  fat32        EFI System Partition  boot

theres no efi installation of linux on it currently, so i cant provide you with a grub.conf.
Comment 6 Martin Jürgens 2012-01-09 04:37:42 EST
heres bootx64.conf from the usb stick:

timeout 10

title Fedora-16-x86_64-Live-Desktop.is
  kernel /EFI/boot/vmlinuz0 root=live:UUID=CA9B-FF7C rootfstype=vfat ro liveimg  LANG=en_US.UTF-8 quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
  initrd /EFI/boot/initrd0.img
title Verify and Boot Fedora-16-x86_64-Live-Desktop.is
  kernel /EFI/boot/vmlinuz0 root=live:UUID=CA9B-FF7C rootfstype=vfat ro liveimg  LANG=en_US.UTF-8 quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 rd.live.check
  initrd /EFI/boot/initrd0.img
Comment 7 Chris Murphy 2012-01-09 04:53:47 EST
Well it seems to me that if your computer is set to use EFI boot, not BIOS legacy or disabled EFI boot, and also set to boot off this USB stick, that it should be (hd0,0). What happens if you type

root (hd0,0)
find /Efi/boot/vmlinuz0

If you get a response 'hd0,0' then either grub.efi is somehow being produced with the wrong device as root, or something is up with the UEFI on this box. Is the UEFI firmware for sure up to date?
Comment 8 Martin Jürgens 2012-01-09 09:54:39 EST
if I type root (hd0,0), it says:
filesystem type is fat, 0x83 partition type 

I guess that this is my windows 7 efi partition.

the computer is definitly set to EFI boot, and it definitly boots off the USB stick.
As I mentioned, it just works fine with Ubuntu and Windows 7. The UEFI firmware is up to date.
Comment 9 Martin Jürgens 2012-01-11 12:17:50 EST
do you have any more ideas? i really miss fedora, and i cant disable uefi because windows does not boot anymore then.
Comment 10 Chris Murphy 2012-01-11 13:49:43 EST
See comment 7. You did root (hd0,0) but you didn't appear to then do find.
Comment 11 Martin Jürgens 2012-01-11 14:38:18 EST
cursor keeps blinking when doing find
Comment 12 Chris Murphy 2012-01-11 15:10:57 EST
I don't have a good explanation for why grub.efi either has the wrong root, or isn't finding vmlinuz0. So someone else who knows more about grub.efi will have to reply. 

If I were in this situation I would try booting off LiveCD and DVD (separately obviously) and manually install GRUB-EFI to the boot stick to see if that will work, since that recreates grub.efi. If that works, it'd expose a possible bug in livecd-tools when it makes the call to have grub.efi built. 

If that doesn't work, then I'd boot off the LiveCD, install GRUB2-EFI (yum install grub2-efi), and manually install that onto the boot stick (grub2-efi-install). If that doesn't work, I'd take the issue to GNU help-grub or grub-devel (there is no more development on grub<0.99 so you'd need to be using GRUB2 for those lists).

In either case, you need to relocate and rename grub.efi. It will be installed in /EFI/redhat as grub.efi. But it needs to go into /EFI/boot as bootx64.efi. I forget offhand if grub.conf/grub.cfg need to also be renamed to bootx64.conf and bootx64.cfg. It's a little confusing...but if you want to get it working and help make Fedora better this is the way to do it, if no one else responds with a better suggestion in the meantime.
Comment 13 Martin Jürgens 2012-01-12 08:30:54 EST
*** Bug 770584 has been marked as a duplicate of this bug. ***
Comment 14 Martin Jürgens 2012-01-13 06:34:11 EST
solved it. used a grub2-efi generated bootx64.efi which only led to a command promt (although i modified the config file to be grub2 - like). i then used the following commands:

search --set -f /efi/boot/vmlinuz0
linux /efi/boot/vmlinuz0 ro rootfstype=auto liveimg root=live:/dev/sdb1
initrd /efi/boot/initrd.img

afterwards, I installed it which worked like a charm. thanks for your help.
Comment 15 Chris Murphy 2012-01-13 12:07:51 EST
grub2-efi-install bakes the location of grub.cfg into the grub.efi so you have to use --boot-directory.

Anyway even though your specific problem is fixed, without understanding why grub-efi (legacy) was failing, this isn't likely to get fixed for anyone else that has the same experience.
Comment 16 Martin Jürgens 2012-01-13 12:13:09 EST
as soon as fedora starts shipping grub2 it should be fixed hopefully.
Comment 17 Chris Murphy 2012-01-13 12:22:17 EST
You filed a bug against Fedora 16 and grub-efi legacy, not rawhide. The purpose of filing bugs is to get the actual bug reported fixed, not to do individual tech support. It's an assumption on your part that F17 will include GRUB2-EFI. At the moment it appears GRUB2 for BIOS, and GRUB-EFI (legacy) for EFI machines, same as F16.
Comment 18 Martin Jürgens 2012-01-13 12:35:16 EST
im sorry for misusing bugzilla for tech support.
ill be glad to try installing grub-efi to the stick as soon as i have time again
Comment 19 Martin Jürgens 2012-09-03 16:36:54 EDT
same issue still appears with latest A08 bios and fedora rawhide. and it continues to work with ubuntu.
Comment 20 Martin Jürgens 2012-11-28 05:20:43 EST
works with fedora 18 beta

Note You need to log in before you can comment on or make changes to this bug.