Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ipxe uefi x64 WimBoot [answered]
2016-03-11, 16:00 (This post was last modified: 2016-03-15 16:25 by Fimlore.)
Post: #1
Wink ipxe uefi x64 WimBoot [answered]
Hi iPxe,

I'm trying to boot to an x64 Windows 10 WIM image from ipxe.
The script i'm using is as follows:


Code:
:wimboot
set base-url http://10.168.51.5/bootimg/win
kernel ${base-url}/wimboot
initrd ${base-url}/\${arch}/default.bcd BCD
initrd ${base-url}/boot.sdi boot.sdi
initrd -n boot.wim \${base-url}/winpe.wim boot.wim

The iPXE menu happily starts loading all the files .. everything OK untill there

The output I receive later is:

Code:
Command line: "wimboot"
Using wimboot via 0xd13ba588 len 0x8440
Using default.bcd via 0xd13ba628 len 0x2000
using boot.sdi via 0xd13ba6c8 len 0x306000
using boot.wim via 0xd13ba768 len 0x115a90b3
...found WIM file boot.wim
...found file "Windows\boot\EFI\bootmgfw.efi"
Using BOOTX64.EFI via 0xd1274a00 len 0xee360
..extracted \Windows\Boot\EFI\bootmgwf.efi
Read BOOTX64.EFI
Could not load BOOTX64.EFI: 0x800000000003
Could not boot: Error 0x7f048281 (http://ipxe.org/7f048281)
*note: i tried my best to copy all numbers as-is..

The files I'm using come from an official Windows 10 DVD
and i'm a little illusive to why this does not work.

--edit--
The WIM came from my existing WDS installation
Find all posts by this user
Quote this message in a reply
2016-03-11, 17:16
Post: #2
RE: ipxe uefi x64 WimBoot
Try adding -n BCD to The initrd line so it becomes
Initrd -n BCD http...bc BCD

The -n is used to set the name in efi fs, while the BCD at the end is used in legacy.

However the above is only a problem when the bootloader starts, i guess you have booted something else before since you have bootx64.efi loaded, try an imgfree before to let wimboot load it from wim.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-03-14, 15:12
Post: #3
RE: ipxe uefi x64 WimBoot
(2016-03-11 16:00)Fimlore Wrote:  
Code:
Command line: "wimboot"
Using wimboot via 0xd13ba588 len 0x8440
Using default.bcd via 0xd13ba628 len 0x2000
using boot.sdi via 0xd13ba6c8 len 0x306000
using boot.wim via 0xd13ba768 len 0x115a90b3
...found WIM file boot.wim
...found file "Windows\boot\EFI\bootmgfw.efi"
Using BOOTX64.EFI via 0xd1274a00 len 0xee360
..extracted \Windows\Boot\EFI\bootmgwf.efi
Read BOOTX64.EFI
Could not load BOOTX64.EFI: 0x800000000003
Could not boot: Error 0x7f048281 (http://ipxe.org/7f048281)

The 0x8000000000000003 is the EFI firmware reporting an EFI_UNSUPPORTED error when being asked to load bootmgfw.efi. The most likely explanation is that you are trying to boot a 32-bit Windows on a 64-bit UEFI platform (which simply isn't supported).

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-03-14, 16:22
Post: #4
RE: ipxe uefi x64 WimBoot
I'm using an ipxe.efi created with make bin-x86_x64-efi (or at least that version, I'm still horrible at remembering Linux commands since i'm a Windows developer starting to transit to Linux..), so the Efi should be fine (?)

The WIM is definitely a x64 version, so that can't be the issue; leaves me only with the BCD and sdi files, are those platform dependent?

Thanks for the support so far,

Alex
Find all posts by this user
Quote this message in a reply
2016-03-14, 18:59
Post: #5
RE: ipxe uefi x64 WimBoot
(2016-03-14 16:22)Fimlore Wrote:  The WIM is definitely a x64 version, so that can't be the issue; leaves me only with the BCD and sdi files, are those platform dependent?

Could you extract the file \Windows\Boot\EFI\bootmgfw.efi from your .wim image and post a copy of it somewhere?

Thanks,

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-03-15, 15:22 (This post was last modified: 2016-03-15 15:38 by Fimlore.)
Post: #6
RE: ipxe uefi x64 WimBoot
(2016-03-14 18:59)mcb30 Wrote:  
(2016-03-14 16:22)Fimlore Wrote:  The WIM is definitely a x64 version, so that can't be the issue; leaves me only with the BCD and sdi files, are those platform dependent?

Could you extract the file \Windows\Boot\EFI\bootmgfw.efi from your .wim image and post a copy of it somewhere?

Thanks,

Michael

I've extracted and uploaded it to mega:
https://mega.nz/#!9YETFDSD!xR-9WgajnmMbw...U5dc7waq_I

also, I've used the BCD and boot.sdi file from the original Microsoft DVD, but still receive the 0x80000000...03 error
(2016-03-11 17:16)NiKiZe Wrote:  Try adding -n BCD to The initrd line so it becomes
Initrd -n BCD http...bc BCD

The -n is used to set the name in efi fs, while the BCD at the end is used in legacy.

However the above is only a problem when the bootloader starts, i guess you have booted something else before since you have bootx64.efi loaded, try an imgfree before to let wimboot load it from wim.

sadly, changing the BCD line also did not help.
To check, i also changes the sdi line but to no avail

--

Then i tried using the bcd file generated by WDS; but still the BOOTx64.EFI error..

----

I got it working using another PE Image.
The non working PE image was created using MDT, this one is a slightly modified Windows ADK image.
Are there known issues with MDT Images?
Find all posts by this user
Quote this message in a reply
2016-03-15, 16:08
Post: #7
RE: ipxe uefi x64 WimBoot
(2016-03-15 15:22)Fimlore Wrote:  
(2016-03-14 18:59)mcb30 Wrote:  
(2016-03-14 16:22)Fimlore Wrote:  The WIM is definitely a x64 version, so that can't be the issue; leaves me only with the BCD and sdi files, are those platform dependent?
Could you extract the file \Windows\Boot\EFI\bootmgfw.efi from your .wim image and post a copy of it somewhere?

I've extracted and uploaded it to mega:
https://mega.nz/#!9YETFDSD!xR-9WgajnmMbw...U5dc7waq_I

Thanks. That file is definitely a 32-bit UEFI executable:

Code:
[mcb30@squirrel ~]$ objdump -x ~/tmp/bootmgfw.efi
/home/mcb30/tmp/bootmgfw.efi:     file format pei-i386
/home/mcb30/tmp/bootmgfw.efi
architecture: i386, flags 0x0000012f:
HAS_RELOC, EXEC_P, HAS_LINENO, HAS_DEBUG, HAS_LOCALS, D_PAGED
start address 0x10013b80

Characteristics 0x2102
        executable
        32 bit words
        DLL

Time/Date               Fri Oct 30 02:09:32 2015
Magic                   010b    (PE32)

For reference, here's the equivalent for a 64-bit UEFI executable:

Code:
/vault/images/efi/x64/Shell.efi:     file format pei-x86-64
/vault/images/efi/x64/Shell.efi
architecture: i386:x86-64, flags 0x0000010b:
HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED
start address 0x0000000000000240

Characteristics 0x2e
        executable
        line numbers stripped
        symbols stripped
        large address aware

Time/Date               Thu Jan  1 01:00:00 1970
Magic                   020b    (PE32+)

A 32-bit UEFI executable cannot be loaded on a 64-bit UEFI system. This fully explains the error that you were seeing.

The question then becomes why would there be a 32-bit UEFI bootmgfw.efi in your apparently 64-bit WIM? I wonder if your toolchain is somehow including both 32-bit and 64-bit versions of bootmgfw.efi, and wimboot is erroneously picking up the 32-bit version. Could you post a full list of all *.efi files present within the problematic WIM?

Thanks,

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-03-15, 16:23
Post: #8
RE: ipxe uefi x64 WimBoot
(2016-03-15 16:08)mcb30 Wrote:  
(2016-03-15 15:22)Fimlore Wrote:  
(2016-03-14 18:59)mcb30 Wrote:  
(2016-03-14 16:22)Fimlore Wrote:  The WIM is definitely a x64 version, so that can't be the issue; leaves me only with the BCD and sdi files, are those platform dependent?
Could you extract the file \Windows\Boot\EFI\bootmgfw.efi from your .wim image and post a copy of it somewhere?

I've extracted and uploaded it to mega:
https://mega.nz/#!9YETFDSD!xR-9WgajnmMbw...U5dc7waq_I

Thanks. That file is definitely a 32-bit UEFI executable:

Code:
[mcb30@squirrel ~]$ objdump -x ~/tmp/bootmgfw.efi
/home/mcb30/tmp/bootmgfw.efi:     file format pei-i386
/home/mcb30/tmp/bootmgfw.efi
architecture: i386, flags 0x0000012f:
HAS_RELOC, EXEC_P, HAS_LINENO, HAS_DEBUG, HAS_LOCALS, D_PAGED
start address 0x10013b80

Characteristics 0x2102
        executable
        32 bit words
        DLL

Time/Date               Fri Oct 30 02:09:32 2015
Magic                   010b    (PE32)

For reference, here's the equivalent for a 64-bit UEFI executable:

Code:
/vault/images/efi/x64/Shell.efi:     file format pei-x86-64
/vault/images/efi/x64/Shell.efi
architecture: i386:x86-64, flags 0x0000010b:
HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED
start address 0x0000000000000240

Characteristics 0x2e
        executable
        line numbers stripped
        symbols stripped
        large address aware

Time/Date               Thu Jan  1 01:00:00 1970
Magic                   020b    (PE32+)

A 32-bit UEFI executable cannot be loaded on a 64-bit UEFI system. This fully explains the error that you were seeing.

The question then becomes why would there be a 32-bit UEFI bootmgfw.efi in your apparently 64-bit WIM? I wonder if your toolchain is somehow including both 32-bit and 64-bit versions of bootmgfw.efi, and wimboot is erroneously picking up the 32-bit version. Could you post a full list of all *.efi files present within the problematic WIM?

Thanks,

Michael


... I retraced my steps to find out where this went wrong. And i've found out where it went wrong. I extracted the x64 file from my WDS server and copied it over to my linux server.. This is where i made the big mistake.. instead of the x64 image, I took the export from the x86 folder.

I was able to trace this back because my export folder didn't contain files in the x64 folder but did in the x86.

That explains why my other images were able to boot.


Thank you for your support Michael.

Btw, what tool do you use to read the EFI files?
Find all posts by this user
Quote this message in a reply
2016-03-17, 13:25
Post: #9
RE: ipxe uefi x64 WimBoot [answered]
He used objdump, a utility part of the GCC toolchain.
Visit this user's website Find all posts by this user
Quote this message in a reply
2020-10-02, 10:00
Post: #10
RE: ipxe uefi x64 WimBoot [answered]
Hello,

only the file \Windows\Boot\EFI\bootmgfw.efi ?

regards
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)