You are not logged in.

#1 2013-09-05 08:19:39

aaditya
Member
Registered: 2013-09-01
Posts: 174

[Solved] Chainload Windows8 UEFI with Grub2-efi

Hi! When I was using Grub-Bios, I could chainload Windows using

set root=hd0,1
chainloader +1

But now that I am using gpt+uefi, it just shows-

Error. Invalid Efi file.

which seems correct as the efi files are in the Efi partition.

But how to access/load the efi file from the Grub Command prompt, in order to chainload Windows (or any other OS)?

Thanks!

Last edited by aaditya (2014-03-23 14:25:40)

Offline

#2 2013-09-05 08:23:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-09-05 08:44:13

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

Don't chainload, just load the efi instead.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2013-09-05 08:45:49

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

jasonwryan wrote:

Thank You! I will note the command down and try it.

Offline

#5 2013-09-05 09:11:30

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

@jasonwryan, the grub-probe command doesnt work in the grub prompt,so dont know what to do.

@Mr.Elendig, Thanks for replying, i did try chainloading,

chainloader (hd0,4)/efi/Microsoft/Boot/bootmgfw.efi

it gives some output like-

/End Entire
file path:/ACPI(ao3......)

then I do

boot

but it doesnt do anything, and after 1 minute the system restarts.

So how do I load the EFI file directly?

Last edited by aaditya (2013-09-05 09:22:14)

Offline

#6 2013-09-05 16:39:51

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

You might want to consider using something other than GRUB 2, which is difficult to configure. Both gummiboot and rEFInd are easier to configure. In fact, they both auto-detect the Windows boot loader by default, so you needn't explicitly configure them to give you a Windows boot option. Both are in the Arch repositories.

Offline

#7 2013-09-05 17:13:54

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

srs5694 wrote:

You might want to consider using something other than GRUB 2, which is difficult to configure. Both gummiboot and rEFInd are easier to configure. In fact, they both auto-detect the Windows boot loader by default, so you needn't explicitly configure them to give you a Windows boot option. Both are in the Arch repositories.

Yes, as a matter of fact I do use rEFInd smile,  but I have Grub installed in a pendrive, and if my system fails to load, I want to know how to boot it from the Grub Command Prompt.

Offline

#8 2013-09-05 22:09:02

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

You can put rEFInd on a USB flash drive, too; in fact, there's a ready-made flash drive image on the rEFInd downloads page. When you boot from such a disk, it should let you chainload to any boot loader that's on your ESP, including the Windows boot loader and whatever you're using for Linux on the ESP. rEFInd on a USB flash drive might also boot your Linux kernel directly from wherever it resides; however, the boot may fail if you don't have a refind_linux.conf file to hold your kernel options. (OTOH, it might succeed; it depends on your exact configuration.)

Offline

#9 2013-09-06 06:04:48

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

srs5694 wrote:

You can put rEFInd on a USB flash drive, too; in fact, there's a ready-made flash drive image on the rEFInd downloads page. When you boot from such a disk, it should let you chainload to any boot loader that's on your ESP, including the Windows boot loader and whatever you're using for Linux on the ESP. rEFInd on a USB flash drive might also boot your Linux kernel directly from wherever it resides; however, the boot may fail if you don't have a refind_linux.conf file to hold your kernel options. (OTOH, it might succeed; it depends on your exact configuration.)

Ok, Thanks for your help smile

Offline

#10 2014-03-23 14:24:32

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: [Solved] Chainload Windows8 UEFI with Grub2-efi

With some help from here and here, I was able to figure it out.

insmod ntfs
set root=(hd0,gpt4)
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
boot

(hd0,4) or /dev/sda4 is my EFI System partition.

I also added it to the wiki.
http://wiki.archlinux.org/index.php/GRU … _UEFI_mode

Offline

Board footer

Powered by FluxBB