[lfs-support] Almost Finished with Grub and EFI--But First Some Basics

Dan McGhee beesnees at grm.net
Mon Nov 18 08:38:42 PST 2013

On 11/13/2013 07:52 PM, Bruce Dubbs wrote:
> Dan McGhee wrote:
> But in the meantime, here's the command I used to make the image:
> grub-mkimage -O x86_64-efi -o grubx64.efi -p "" part_gpt fat ext2 normal
> chain boot configfile linux multiboot
> I'm not sure why you want --prefix=''.  I think you want  /efi/boot.
> Have you seen http://wiki.osdev.org/GRUB#Grub_for_EFI ?
Bruce, I've been meaning to answer this question, but I kept being 
diverted by my testing. I found this
at the grub mailing list.

It's short so I'll just quote it:
> Actually change the command to :
> ./grub-mkimage -d . -o grub.efi -O TARGET_EFI_ARCH-efi -p "" <Your
> list of GRUB2 Modules>
> The 2 double quotes after -p is very important. Without the double
> quotes, grub_prefix is set to /boot/grub (default) in the generated
> efi app and grub.efi searches for /boot/grub/grub.cfg (not
> /efi/grub/grub.cfg or /efi/grub2/grub.cfg). If you specify null prefix
> parameter, grub.efi will check for the path from where it has been
> loaded and set that path as grub_prefix, thus making grub.efi
> portable.
Your insights are so valuable that I wanted to get back to you right 
away. Sorry for the delay.


More information about the lfs-support mailing list