Jump to content











Photo
- - - - -

Booting WinPE via HTTP

http winpe ipxe wimboot ramdisk

  • Please log in to reply
66 replies to this topic

#1 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 18 September 2012 - 02:03 PM

*
POPULAR

Hi all,

I've developed a new way of network-booting WinPE which allows you to get the speed advantages of iPXE's HTTP downloading (200MB image in ~2 seconds) without wasting any RAM (as would be the case with e.g. iPXE+memdisk).

Documentation is at http://ipxe.org/wimboot and http://ipxe.org/howto/winpe, source code (GPL) is at http://git.ipxe.org/wimboot.git and prebuilt binaries are available from http://git.ipxe.org/...boot-latest.zip.

For anyone who's interested in the technical details: this works by emulating INT 13 at the bootmgr.exe callback level (rather than at the BIOS level, as with memdisk or iPXE's SAN-booting). The pages of memory occupied by the RAM disk are known to Windows, and so can be reused after the kernel starts.

The INT 13 disk image (including the FAT32 filesystem) is constructed on-the-fly, so you can use the raw boot.wim image; there's no need to wrap the .wim image inside a disk image before booting.

Michael
  • Sha0, joakim and Libertarian like this

#2 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 18 September 2012 - 02:21 PM

Interesting. Will test it. :)

#3 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 18 September 2012 - 02:28 PM

Thanks! I've tested it on every version of WinPE I can find from Vista to Server 2012 inclusive. Please let me know if you find any bugs!

Michael

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 18 September 2012 - 02:58 PM

Hi all,

I've developed a new way of network-booting WinPE which allows you to get the speed advantages of iPXE's HTTP downloading (200MB image in ~2 seconds) without wasting any RAM (as would be the case with e.g. iPXE+memdisk).

Nice ! :)

On a Gigabit lan it must be a missile! :thumbup:

:cheers:
Wonko

#5 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 18 September 2012 - 09:19 PM

@mcb30
Could you quickly explain the correct command (ie without script) to reach wimboot from the ipxe prompt. In my current setup I either memdisk boot the ipxe.iso through pxelinux.0, or just throw undionly.kpxe on dhcp. But I cannot figure out the command to chain further..

#6 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 18 September 2012 - 09:33 PM

@mcb30
Could you quickly explain the correct command (ie without script) to reach wimboot from the ipxe prompt. In my current setup I either memdisk boot the ipxe.iso through pxelinux.0, or just throw undionly.kpxe on dhcp. But I cannot figure out the command to chain further..


iPXE scripts are just sequences of iPXE commands, so you can just type in the contents of the script, if you prefer, e.g:


iPXE> kernel wimboot

iPXE> initrd bootmg bootmgr

iPXE> iinitrd boot/bcd BCD

iPXE> initrd boot/boot.sdi boot.sdi

iPXE> initrd sources/boot.wim boot.wim

iPXE> boot


I would think it would be easier to create the "boot.ipxe" script as described on http://ipxe.org/wimboot; you can chain to the boot.ipxe script using:


iPXE> chain http://my.web.server/boot.ipxe


Michael
  • Libertarian likes this

#7 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 18 September 2012 - 10:02 PM

Thanks for that. I still face some problems. Have a script identical to yours above and chain it. Get errors like in the attached image. Typing the commands by hand produces the same. The files are in place in root dir of the server, and when I type the commands by hand, I get an "ok" for the wimboot, so at least I connect to right place. However, seems bootmgr does not get detected. Have double checked casing..

Attached Thumbnails

  • Capture.PNG


#8 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 18 September 2012 - 10:07 PM

Sorry, my mistake. Not all the files where actually available over http (only over tftp). Works fine now. :)

#9 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 19 September 2012 - 12:25 AM

Sorry, my mistake. Not all the files where actually available over http (only over tftp). Works fine now. :)


Glad you got it sorted out!

For future reference: iPXE errors (as shown in your screenshot) include an error URL which will provide further information. For example, your error message includes http://ipxe.org/2d0c613b, which takes you directly to a page explaining that the web server is returning a 404 Not Found.

Michael

#10 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 19 September 2012 - 05:57 AM

Thanks for explaining that.

The transfer speed is great. Comparing the same boot with TFTP and HTTP reveals a very noticeable difference. Simply put, it boots fast over the network.

#11 fuxxi

fuxxi

    Newbie

  • Members
  • 27 posts
  •  
    Germany

Posted 21 September 2012 - 12:18 PM

Can I chainload wimboot in any way over gpxelinux.0 from syslinux?

#12 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 21 September 2012 - 08:42 PM

I think IPXE.KRN is the file to chainload (extract it from the default iso). I suppose you could use memdisk on ipxe.iso too. Or maybe Michael could shed some light on the correct procedure.

#13 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 21 September 2012 - 11:25 PM

Can I chainload wimboot in any way over gpxelinux.0 from syslinux?


Yes, but you won't get the speed advantage. gPXE (and hence gpxelinux.0) are based on a very old version of the iPXE codebase, and can't manage anywhere near the 1000Mbps speeds you can get from the current iPXE.

#14 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 22 September 2012 - 06:40 AM

@mcb30
There seems to be something strange going on when bootgmr of Windows 8 is used. My test case uses version 6.2.9200.16384. As soon as boot.wim is fully extracted and transfer of execution is to be passed to winload.exe, the machine reboots instantly without any error message. Maybe worth noting that my setup uses VMware Player version 4.0.2. The fonts are in place too.

Using Windows 7 versions of bootmgr and boot.wim succeeds.

Using Windows 8 bootmgr and Windows 7 boot.wim fails similarly as when Windows 8 version of both bootmgr and boot.wim are used.

There is no difference using x86 or x64 version WinPE.

Has wimboot been verified working on this latest version of Windows 8?

#15 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 22 September 2012 - 07:05 AM

In addition, it seems bootmgr from 6.2.9200.16384 is the only one that can be extracted/loaded. Earlier versions like 8102 or 8250 will fail with a message similar to to the attached image.

Attached Thumbnails

  • Capture.PNG


#16 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 22 September 2012 - 07:39 AM

With version 6.2.8250 the error message says: "Too many Huffman symbols with lengths <=1".

See attached image.

Edit: The attached image in my previous post, was from a custom made bootmgr (that boots fine in any other scenario though).

Attached Thumbnails

  • Capture8250.PNG


#17 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 22 September 2012 - 07:45 AM

And the exact error message with version 6.2.8102:

Attached Thumbnails

  • Capture8102.PNG


#18 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 22 September 2012 - 08:18 AM

wimboot has been tested with the released versions of Windows 8 (and Windows Server 2012). Could you give me a source for the versions of bootmgr with which you are finding problems?

Thanks,

Michael

#19 fuxxi

fuxxi

    Newbie

  • Members
  • 27 posts
  •  
    Germany

Posted 22 September 2012 - 09:20 AM

Yes, but you won't get the speed advantage. gPXE (and hence gpxelinux.0) are based on a very old version of the iPXE codebase, and can't manage anywhere near the 1000Mbps speeds you can get from the current iPXE.

Thank You for this. Since Iam an absolutely linux noob, I have no clue about compiling undionly.kpxe. Is there a website which do that for me or where I can always get the latest compiled binaries? Why are compiled binaries not available on ipxe.org? In worst case: Could someone compile the latest source for me please?

#20 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 22 September 2012 - 09:27 AM

fuxxi: you can get the latest binary for undionly.kpxe from http://boot.ipxe.org/undionly.kpxe

#21 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 22 September 2012 - 10:07 AM

What I've found is that my bootmgr 6.2.9200 (latest release of Windows 8) was from a checked build. Switching to a non-checked build of bootmgr from the same version works fine.

So it therefore seems that:
  • the wimboot code does not handle checked builds of bootmgr good enough.
  • the wimboot code does not handle decompression of bootmgr correctly.
If boot.wim is taken from a checked build, it still works fine as long as bootmgr is not from a checked build. Note that the errors with previous versions of bootmgr Windows 8, all came from non-checked builds. So it is the handling of bootmgr that seems to be the issue.

#22 fuxxi

fuxxi

    Newbie

  • Members
  • 27 posts
  •  
    Germany

Posted 23 September 2012 - 09:17 AM

fuxxi: you can get the latest binary for undionly.kpxe from http://boot.ipxe.org/undionly.kpxe

Easy, thank You! But why is this not mentioned on the website? Or am I just blind?

#23 fuxxi

fuxxi

    Newbie

  • Members
  • 27 posts
  •  
    Germany

Posted 24 September 2012 - 06:14 AM

Easy, thank You! But why is this not mentioned on the website? Or am I just blind?

Yes, Iam blind. Its right here:

http://ipxe.org/howto/chainloading

:o

#24 mcb30

mcb30

    Newbie

  • Members
  • 22 posts
  •  
    United Kingdom

Posted 26 September 2012 - 10:56 AM

What I've found is that my bootmgr 6.2.9200 (latest release of Windows 8) was from a checked build. Switching to a non-checked build of bootmgr from the same version works fine.

So it therefore seems that:

  • the wimboot code does not handle checked builds of bootmgr good enough.
  • the wimboot code does not handle decompression of bootmgr correctly.
If boot.wim is taken from a checked build, it still works fine as long as bootmgr is not from a checked build. Note that the errors with previous versions of bootmgr Windows 8, all came from non-checked builds. So it is the handling of bootmgr that seems to be the issue.


joakim: if you are able to e-mail me copies of the failing versions of bootmgr, I will fix up wimboot to handle them correctly. There's a heuristic involved in locating the compressed bootmgr.exe within the bootmgr binary, and it sounds as though this heuristic is breaking on the checked builds.

Thanks,

Michael

#25 fuxxi

fuxxi

    Newbie

  • Members
  • 27 posts
  •  
    Germany

Posted 26 September 2012 - 12:21 PM

Do I need a special bootmgr for not wasting the ram? Because Iam still missing the ~200mb of the wim file when booting via wimboot.





Also tagged with one or more of these keywords: http, winpe, ipxe, wimboot, ramdisk

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users