iPXE discussion forum

Full Version: Grub2 + wimboot to boot .wim file in EFI mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,
I am trying to boot.wim file using GRUB2 EFI + wimboot.
The boot.wim file is extracted from Windows installation .ISO

Before that I successfully boot boot.wim file using iPXE in both BIOS and EFI mode.
Here is my script code:

Code:
kernel ${boot-url}/wimboot/wimboot gui pause
  initrd ${boot-url}/wimboot/bcd            BCD
  initrd ${boot-url}/wimboot/boot.sdi        boot.sdi
  initrd ${boot-url}/wimboot/boot.wim        boot.wim
  boot || goto failed

iPXE BIOS
[Image: yANfOih.png]

iPXE EFI
[Image: smHlWzI.png]

Then I converted the above code to use only GRUB2 and wimboot (without iPXE):

Code:
menuentry "Wimboot" {
    linux16 /wimboot/wimboot gui pause
    initrd16 newc:bcd:(loop)/boot/bcd \
           newc:boot.sdi:(loop)/boot/boot.sdi \
           newc:boot.wim:(loop)/sources/boot.wim
}

It boot fine in BIOS mode and show the same screenplay as it was in iPXE BIOS case. But in EFI mode, I only got black screen and never get into the setup menu.

Since the screen was black, I did not get any notifications that wimboot is in EFI mode (In EFI mode, wimboot uses BOOTx64.efi instead of bootmgr.exe). So my questions are:

1. How to ensure that wimboot get into EFI mode? Does it need iPXE to get wimboot into EFI mode, or wimboot can alone doing that?
2. In my opinion, the first code runs in iPXE environment, the second code runs in GRUB2 environment which may cause the problem. But how to fix it?
3. As I understand, iPXE only support chainload in Network mode (script file must be load off the network). Could iPXE support chainload in local (script file in local disk)?
i.e
Code:
chain /local-root/myscript.ipxe
[quote='Ryan' pid='12757' dateline='1467258443']
Code:
menuentry "Wimboot" {
    linux16 /wimboot/wimboot gui pause
    initrd16 newc:bcd:(loop)/boot/bcd \
           newc:boot.sdi:(loop)/boot/boot.sdi \
           newc:boot.wim:(loop)/sources/boot.wim
}

That is a BIOS-only configuration. It will not work in UEFI.

As far as I know, GRUB2 is not capable of supporting wimboot under UEFI. You will need to use iPXE to load wimboot directly (which you already have working).

Quote:3. As I understand, iPXE only support chainload in Network mode (script file must be load off the network). Could iPXE support chainload in local (script file in local disk)?
i.e
Code:
chain /local-root/myscript.ipxe

Yes, you can do that with iPXE in UEFI. Use the "file://" URI scheme to access local filesystems. See http://git.ipxe.org/ipxe.git/commitdiff/9913a40 for more details.

Michael
Quote:Yes, you can do that with iPXE in UEFI. Use the "file://" URI scheme to access local filesystems. See http://git.ipxe.org/ipxe.git/commitdiff/9913a40 for more details.

Thank you for your answer.

I tried but could not figure it out.

From Grub2 on local disk, I chainload the ipxe.efi
[Image: 1DIVEQr.png]
Code:
menuentry "chainloader EFI"{
    chainloader /ipxe.efi
}
And here is the rest of it.
[Image: o4XP1xS.png]

Could you let me know how to make to work?
(2016-07-08 06:11)Ryan Wrote: [ -> ]Could you let me know how to make to work?

Is the filesystem in question accessible as an EFI_SIMPLE_FILE_SYSTEM_PROTOCOL?

You can test this by starting the UEFI shell (not the iPXE shell). The "map" command will show you the filesystems that UEFI itself can access.

Michael
Reference URL's