Jump to content











Photo

iPXE, WImboot and multi platform (pcbios/efi/i386/x86_64)

ipxe wimboot pcbios efi

  • Please log in to reply
16 replies to this topic

#1 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 31 October 2017 - 06:52 PM

*
POPULAR

Sharing a iPXE script (using wimboot) I am using these days along with Tiny PXE Server to boot winpe over the network on multiple platform : pcbios i386, pcbios x86_64, efi i386, efi x86_64.

 

Tiny PXE Server is serving by default pcbios ipxe.pxe and also, depending on the client architecture, serving the matching ipxe efi version.

 

See below my config.ini and a custom wimboot.ipxe script.

[dhcp]
proxydhcp=1
httpd=1
bind=1
root=\files
filename=ipxe.pxe
altfilename=wimboot.ipxe
[arch] 
00006=ipxe-i386.efi 
00007=ipxe-x86_64.efi 
00009=ipxe-x86_64.efi
#!ipxe
#more about wimboot tips and tricks : http://ipxe.org/wimboot
set boot-url http://${dhcp-server}
#note : we are not going to use cpuid/arch
cpuid --ext 29 && set arch x64 || set arch x86
echo ${arch}
echo ${platform}_${buildarch}
goto ${platform}_${buildarch} || goto unknown
  :pcbios_x86_64
  kernel ${boot-url}/wimboot
  initrd ${boot-url}/BOOTMGR.EXE  bootmgr.exe
  initrd ${boot-url}/BOOT/BCD         BCD
  initrd ${boot-url}/BOOT/BOOT.SDI    BOOT.SDI
  initrd ${boot-url}/SOURCES/${buildarch}/BOOT.WIM BOOT.WIM
  boot
  :pcbios_i386
  kernel ${boot-url}/wimboot
  initrd ${boot-url}/BOOTMGR.EXE  bootmgr.exe
  initrd ${boot-url}/BOOT/BCD         BCD
  initrd ${boot-url}/BOOT/BOOT.SDI    BOOT.SDI
  initrd ${boot-url}/SOURCES/${buildarch}/BOOT.WIM BOOT.WIM
  boot
  :efi_x86_64
  kernel ${boot-url}/wimboot
  initrd ${boot-url}/bootx64.efi	bootx64.efi
  initrd ${boot-url}/EFI/MICROSOFT/BOOT/BCD         BCD
  initrd ${boot-url}/BOOT/BOOT.SDI    BOOT.SDI
  initrd ${boot-url}/SOURCES/${buildarch}/BOOT.WIM BOOT.WIM
  boot  
  :efi_i386
  kernel ${boot-url}/wimboot.i386
  initrd ${boot-url}/bootia32.efi	bootia32.efi
  initrd ${boot-url}/EFI/MICROSOFT/BOOT/BCD         BCD
  initrd ${boot-url}/BOOT/BOOT.SDI    BOOT.SDI
  initrd ${boot-url}/SOURCES/${buildarch}/BOOT.WIM BOOT.WIM
  boot    
 :unknown
 echo Unknown platform ${platform}_${buildarch}


  • ktp, ZEE and nguyentu like this

#2 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 01 November 2017 - 06:00 AM

Thanks but I failed to boot WinPE 32-bit in UEFI 32-bit mode.
 
From the answer here, I think we need to compile a 32-bit wimboot. But I do not know how to compile it. Can you help me compile it?
 

 

If your EFI is 32 bit than you must also run 32-bit efi version of wimboot.

 

 

  • erwan.l and ZEE like this

#3 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 01 November 2017 - 10:28 AM

 

Thanks but I failed to boot WinPE 32-bit in UEFI 32-bit mode.
 
From the answer here, I think we need to compile a 32-bit wimboot. But I do not know how to compile it. Can you help me compile it?
 

 

 

 

 

Good catch !

 

I have corrected the first post to reflect on wimboot.i386.

Wimboot.i386 is now also in pxesrv.zip


  • ZEE and nguyentu like this

#4 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 01 November 2017 - 11:14 AM

Not entirely related to wimboot over different platforms, but since latest wimboot version (2.6.0), you can inject files in the wim file on the fly.

 

You can provide additional files to wimboot. These files will appear within the X:\Windows\System32 directory. For example:

kernel wimboot
initrd winpeshl.ini winpeshl.ini
initrd startup.bat startup.bat

initrd boot/bcd BCD
initrd boot/boot.sdi boot.sdi
initrd sources/boot.wim boot.wim
boot

You can use this to control the boot process after Windows PE has started. For example, you can use a startup batch file to automatically start the Windows installer from a network share.


  • ZEE likes this

#5 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 01 November 2017 - 11:51 AM

Good catch !

 

I have corrected the first post to reflect on wimboot.i386.

Wimboot.i386 is now also in pxesrv.zip

I do not look at the src directory because I think it's just source code.
Thank you!

  • ZEE likes this

#6 ZEE

ZEE

    Member

  • Members
  • 91 posts
  •  
    Portugal

Posted 17 January 2018 - 02:56 AM

Hi Erwan...

 

Using grub4dos (no ipxe)

 

# With wimboot 2.00 I used this menu entry... and worked OK (notice the bootmgr)

title WinPE32
    kernel /sys/wimboot
    initrd @bootmgr=/boot/bootmgr @boot.sdi=/boot/boot.sdi @bcd=/boot/wimboot-bcd @boot.wim=WinPE32.wim
 

 

# moving to wimboot 2.60 i had to change to

title WinPE32
    kernel /sys/wimboot
    initrd @bootmgr.exe=/boot/bootmgr.exe @boot.sdi=/boot/boot.sdi @bcd=/boot/wimboot-bcd @boot.wim=WinPE32.wim

 

* had to find a bootmgr.exe (used the one from spam)

* and now I get some random problems (freezing, etc.) when winpe gui appears

 

?any thoughts on why bootmgr does not work as used to??

?does this bootmgr.exe works also for a 64 bit winPE ??

?is there any advantage booting ipxe and then wimboot instead of the above (simple) format ??

?any advices (always welcome) on this kind of pxe boot ??



#7 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 January 2018 - 11:54 AM

@ZEE

Bootmgr and bootmgr.exe are actually (almost) the SAME file.

BOOTMGR is bootmgr.exe with pre-pended a real mode stub.

 

Basically if you have BOOTMGR you can make a bootmgr.exe from it by simply removing this stub, see (reading between the lines):

http://reboot.pro/fi...ls-bootmgrntfs/

 

AND read the documentation:

http://ipxe.org/appn...ot_architecture

 

 

Extracting bootmgr.exe

As wimboot reads each file from the CPIO archive, the file's virtual filename is matched against a list of special names to see if it needs special treatment:

bootmgr.exe: Set this as the file to execute at the end of the boot-loader initialization.

bootmgr: Try to extract bootmgr.exe from this compressed bootmgr file, unless a bootmgr.exe was already supplied.

*.wim: Try to extract bootmgr.exe from the static path \Windows\Boot\PXE\bootmgr.exe within the supplied WIM image, unless a bootmgr.exe was already supplied.

NOTE: The ability to extract bootmgr.exe from the WIM image was added to wimboot v2.2.0. It is a very convenient feature that lets you skip having to explicitly supply the bootmgr.exe file explicitly.

NOTE: If no bootmgr.exe is found, wimboot exits.

 

Since 2.2.0 Winboot should be able to get the bootmgr.exe from within the .wim (of course if it is there).

 

:duff:

Wonko


  • ZEE likes this

#8 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 17 January 2018 - 12:51 PM

Wimboot had some issues in the past with the latest bootmgr format but latest versions should be able to handle it all.

 

As for iPxe versus Grub4Dos boot loaders : they are just both great.

But iPxe focus is about netbooting while Grub4Dos "only" provides pxe support.

 

If you are all about net boot, iPxe should be the preferred choice.

Not saying it will address your issues (i.e wimboot 2.x working vs wimboot 2.6 not working).

 

Note that there could be a similar discussion between wimboot versions and pxelinux : not that simple.


  • ZEE likes this

#9 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 January 2018 - 02:07 PM

As for iPxe versus Grub4Dos boot loaders : they are just both great.

But iPxe focus in around netbooting while Grub4Dos "only" provides pxe support.

It's curious how I would say that Grub4dos is a general, all round, boot manager (though limited to BIOS) while iPxe is focused "only" on netbooting. :dubbio:

 

To me having command line access to the (pd) device is a good half of the fun:

http://diddy.boot-la...s/files/pxe.htm

 

iPXE (besides the specific wimboot tool, that provides a nice way of booting PE's) has IMHO (besides the support for stupid UEFI) the advantage of using other protocols (faster) than TFTP like, HTTP, iSCSI, AOE.

 

The other advantage (capability of booting off the Internet) is IMHO only a (nice :) BTW) useless feature that noone (or next to noone) in his right mind will ever use, set apart for fun experiments, compare with the recent (only seemingly unrelated) topic about Astralboot:

 

http://reboot.pro/to...as-boot-server/

 

:duff:

Wonko


  • ZEE likes this

#10 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 17 January 2018 - 02:34 PM

It's curious how I would say that Grub4dos is a general, all round, boot manager (though limited to BIOS) while iPxe is focused "only" on netbooting. :dubbio:

 

To me having command line access to the (pd) device is a good half of the fun:

http://diddy.boot-la...s/files/pxe.htm

 

iPXE (besides the specific wimboot tool, that provides a nice way of booting PE's) has IMHO (besides the support for stupid UEFI) the advantage of using other protocols (faster) than TFTP like, HTTP, iSCSI, AOE.

 

The other advantage (capability of booting off the Internet) is IMHO only a (nice :) BTW) useless feature that noone (or next to noone) in his right mind will ever use, set apart for fun experiments, compare with the recent (only seemingly unrelated) topic about Astralboot:

 

http://reboot.pro/to...as-boot-server/

 

:duff:

Wonko

 

Indeed, it was my point : these days, IMHO, iPxe is "THE" bootloader you want to use if you are after booting over the network.

The (pd) device is a nice to have but still of limited use (compared to iPxe).

 

Now about Astraboot, I did not have time yet to comment : yes booting of the internet is "bold" to say the least but actually when about installing over the network, these days, I myself spare myself the download of the whole ISO and install it straight over internet combined with pxe boot.

 

Tiny PXE server can help you do that (amongst other similar software I guess): no files (i.e not a few files but actually 0 files) need to sit on your LAN to install a few linux distros.

Fire up TPS, setup a few fields, boot your "to be installed" device and go thru the (netboot) installation steps, all over HTTP.

 

This way you always use an online, trusted, and updated repo and I am not worrying about these important repo's such as http://releases.ubuntu.com/ : they will just not disappear from planet earth.

I trust these to be always up in the air, hosted by some resilient cloud service provider.

 

but I am deviating from the main topic there...


  • ZEE likes this

#11 ZEE

ZEE

    Member

  • Members
  • 91 posts
  •  
    Portugal

Posted 18 January 2018 - 01:08 AM

@ZEE

Bootmgr and bootmgr.exe are actually (almost) the SAME file.

BOOTMGR is bootmgr.exe with pre-pended a real mode stub.

 

Thx  wonko... good info... 



#12 ZEE

ZEE

    Member

  • Members
  • 91 posts
  •  
    Portugal

Posted 18 January 2018 - 01:20 AM

Indeed, it was my point : these days, IMHO, iPxe is "THE" bootloader you want to use if you are after booting over the network.

The (pd) device is a nice to have but still of limited use (compared to iPxe).

 

Thx erwan... always good info... I'm using yours excelent tinypxe server for wimboot... 



#13 ktp

ktp

    Silver Member

  • Advanced user
  • 758 posts

Posted 28 January 2018 - 03:37 PM

Hello,

 

During Wimboot booting a WinPESE10x64 wim, I got the message: "Could not patch WIM boot.wim" (see screen capture). The wim is taken from ISO made with WinBuilder.

 

How can I handle this error? Is there a way to make the wim compatible with wimboot?

 

Thank you.

Attached Files



#14 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 28 January 2018 - 04:11 PM

Hello,

 

During Wimboot booting a WinPESE10x64 wim, I got the message: "Could not patch WIM boot.wim" (see screen capture). The wim is taken from ISO made with WinBuilder.

 

How can I handle this error? Is there a way to make the wim compatible with wimboot?

 

Thank you.

 

"unknwon compression scheme".

 

I dont know which tool you use to generate this WIM file but if using wimlib, it may be worth changing the compression type.

More here.

If using DISM, look at the [/Compress:{max|fast|none}] parameter.

 

EDIT : same error reported here from Sebus (a member on this forum as well).

Quoting "Just had to redo the compression with DISM.EXE /Export-Image /Compress:max & it does work (at least the part which finds bootmgr.exe)".


  • ktp likes this

#15 ktp

ktp

    Silver Member

  • Advanced user
  • 758 posts

Posted 28 January 2018 - 06:56 PM

@erwan.l
 
I tried to rebuild the WIM with different compression types, and even with no compression using wimlib utilities, but the problem remains :-(.
Same error message, same offsets.
 
Apply:
wimapply  s:\WIM\Win10PE_x64.wim d:\dl\wim_mount
Capture (rebuild):
wimcapture  d:\dl\wim_mount d:\dl\Win10PE_x64.wim --compress=none
 
Any other idea?


#16 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2278 posts
  • Location:Nantes - France
  •  
    France

Posted 28 January 2018 - 07:04 PM

 

@erwan.l
 
I tried to rebuild the WIM with different compression types, and even with no compression using wimlib utilities, but the problem remains :-(.
Same error message, same offsets.
 
Apply:
wimapply  s:\WIM\Win10PE_x64.wim d:\dl\wim_mount
Capture (rebuild):
wimcapture  d:\dl\wim_mount d:\dl\Win10PE_x64.wim --compress=none
 
Any other idea?

 

 

have you tried different versions of wimboot from 2.0 onward?



#17 ktp

ktp

    Silver Member

  • Advanced user
  • 758 posts

Posted 28 January 2018 - 08:15 PM

@erwan.l
 
Thanks for your suggestion to investigate on wimboot instead of wimlib. I tried several older wimboot versions (older than the latest version 2.6.0-latest-signed that I use), and they all give me error message about lack of memory to create ramdisk device (error 0xc0000017). This triggers sparkle in my head since my Virtualbox machine used to test has only 2 GB RAM, and my WIM (with max (= default = LZX) compression) is about 1 GB.
Without compression its size is 2.5 GB.
 
 
With VirtualBox machine with 2GB RAM:
wimboot-2.0.0 not enough memory to create a ramdisk device
wimboot-2.1.0 not tested
wimboot-2.2.0 not tested
wimboot-2.2.1 not tested
wimboot-2.2.3 not tested
wimboot-2.2.4 not enough memory to create a ramdisk device
wimboot-2.2.5 not tested
wimboot-2.3.0 not tested
wimboot-2.4.0 not tested
wimboot-2.4.1 not tested
wimboot-2.5.0 not enough memory to create a ramdisk device
wimboot-2.5.1 not tested
wimboot-2.5.2 not enough memory to create a ramdisk device 
wimboot-2.6.0 unknown compression scheme (note: the error never mentions lack of memory)
 
 
So I increase RAM size and:
With VirtualBox machine with 4GB RAM:
wimboot-2.0.0 ok
wimboot-2.1.0 not tested
wimboot-2.2.0 not tested
wimboot-2.2.1 not tested
wimboot-2.2.3 not tested
wimboot-2.2.4 ok
wimboot-2.2.5 not tested
wimboot-2.3.0 not tested
wimboot-2.4.0 not tested
wimboot-2.4.1 not tested
wimboot-2.5.0 ok
wimboot-2.5.1 not tested
wimboot-2.5.2 ok
wimboot-2.6.0 unknown compression scheme
 
Hence there is something broken with wimboot-2.6.0 because even if you give 8 GB RAM to Virtual Box, it still fails with same error. It never complaints about lack of memory, so I was not capable to understand the problem.
 
So now I am happy using wimboot-2.5.2!
 
Thank you again erwan.l !





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users