Topic: Win10XPE, iPXE, and DISM...  (Read 336 times)

Win10XPE, iPXE, and DISM...
« on: November 24, 2020, 04:37:21 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
Just a public service announcement:

I have been using the various Winbuilder projects for years.  I've recently been forced to move all Win8.1SE projects into Win10XPE (driver requirements).  I also used to use the sysconfig/pxelinux environment to enable the PXE boot environment on my older builds (Win8.1SE).  However, I've now switched to iPXE to provide my PXE services so I can support both BIOS and UEFI PXE boot environments on my systems.  iPXE appears to be a lot more capable and cleaner PXE boot service...

Anyway...

iPXE (wimboot) attempts to patch the boot.wim as part of the PXE boot process.  Unfortunately, this fails do to a "unknown compression format" error when trying to process the boot.wim generated by Win10XPE.  All that needs to be done is to recompress the boot.wim file and everything works fine:

     dism /export-image /sourceimagefile:boot.wim /sourceindex:1 /destinationimagefile:boot.wim.new /compress:max


Feature Request:  I've built a PostBuild.bat file to do this (and a few other things) after my build is complete but it should be simple enough to implement inside the Win10XPE project itself.  I think this would save some folks lots of time researching this failure and implementing a solution on their own.

Re: Win10XPE, iPXE, and DISM...
« Reply #1 on: November 24, 2020, 09:25:34 PM »

ChrisR

  • Moderator, XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
I saw similar messages on the iPXE forum. I don't use.
This is something that should rather be fixed on the iPXE side. wimlib-imagex.exe capture should be supported
Does it work if you change in CreateISO.script line 130

Code: [Select]
If,%CompressMax_CheckBox%,Equal,True,ShellExecute,%OpenHideOutput%,cmd.exe,"/D /C Echo Packing boot.wim image file, Be patient...&Echo.&wimlib-imagex.exe capture #$q%GTarget%#$q #$q%GISO%\sources\boot.wim#$q #$q%ImageName%#$q #$q%ImageName%#$q --boot --flags=9 --compress=LZX --verbose",%GTools%
Else,ShellExecute,%OpenHideOutput%,cmd.exe,"/D /C Echo Packing boot.wim image file, Be patient...&Echo.&wimlib-imagex.exe capture #$q%GTarget%#$q #$q%GISO%\sources\boot.wim#$q #$q%ImageName%#$q #$q%ImageName%#$q --boot --flags=9 --compress=XPRESS --verbose",%GTools%
==>
Code: [Select]
If,%CompressMax_CheckBox%,Equal,True,ShellExecute,%OpenHideOutput%,cmd.exe,"/D /C Echo Packing boot.wim image file, Be patient...&Echo.&dism.exe /Capture-Image /ImageFile:#$q%GISO%\sources\boot.wim#$q /CaptureDir:#$q%GTarget%#$q /Name:#$q%ImageName%#$q /Description:#$q%ImageName%#$q /Bootable /Compress:max",%GTools%\%Architecture%\DISM
Else,ShellExecute,%OpenHideOutput%,cmd.exe,"/D /C Echo Packing boot.wim image file, Be patient...&Echo.&dism.exe /Capture-Image /ImageFile:#$q%GISO%\sources\boot.wim#$q /CaptureDir:#$q%GTarget%#$q /Name:#$q%ImageName%#$q /Description:#$q%ImageName%#$q /Bootable /Compress:fast",%GTools%\%Architecture%\DISM


Re: Win10XPE, iPXE, and DISM...
« Reply #2 on: November 24, 2020, 09:53:29 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
I don't think this is a iPXE thing...

It process part of the boot.wim before it fails.  This indicates to me that part of the boot.wim is compressed using multiple algorithms.

In any case, a simple option (checkbox) for DISM to recompress the image with max compression would be helpful.  Not only does it solve this inconsistency issue, but it also reduces the size of the boot.wim file.  My last project is being reduced from 829K to 761K.

I will updating line 130 in the CreateISO.script file and get back with the answer.

Thanks for the code snippet!

Re: Win10XPE, iPXE, and DISM...
« Reply #3 on: November 24, 2020, 10:14:08 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
Making that code change did not resolve the issue.

Re: Win10XPE, iPXE, and DISM...
« Reply #4 on: November 24, 2020, 11:12:33 PM »

ChrisR

  • Moderator, XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
it also reduces the size of the boot.wim file.  My last project is being reduced from 829K to 761K.
It's because you didn't use "Max Compression" on Create ISO

In any case, a simple option (checkbox) for DISM to recompress the image with max compression would be helpful
I'm going to see, in any case, the compression would be the one defined in Create ISO.

Re: Win10XPE, iPXE, and DISM...
« Reply #5 on: November 25, 2020, 12:10:57 PM »

ericgl

  • Jr. Chef
  • **
  • Date Registered: Dec 2015
  • Posts: 71
@evanevery,

Thanks, noted.

Re: Win10XPE, iPXE, and DISM...
« Reply #6 on: November 25, 2020, 01:38:38 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
I didn't notice the "Max Compression" option in the GUI.  I'll give it a try...

Re: Win10XPE, iPXE, and DISM...
« Reply #7 on: November 25, 2020, 01:52:33 PM »

ChrisR

  • Moderator, XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
if you give a try, try this one.
I added an option for export, it is hidden by default behind the small button "Show Avanced Options", below the Rufus download link.

* CreateISO.script (61.45 kB - downloaded 11 times.)

Re: Win10XPE, iPXE, and DISM...
« Reply #8 on: November 25, 2020, 02:03:51 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
First, I tried the "Max Compression" option (without updating the CreateISO.script file).  This, all by itself, seems to solve the wimboot decompression issues!

I will also try replacing the script since you asked me to do this, but it doesn't appear necessary as long as "Max Compression" is selected.

Re: Win10XPE, iPXE, and DISM...
« Reply #9 on: November 25, 2020, 02:20:48 PM »

ChrisR

  • Moderator, XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Great, no need for the new script then :thumbsup:
It will be faster, without having to export after the capture.
I will add a note in the tooltip.

ps: So iPXE could probably be improved to also support the Fast (XPRESS) compression in addition to the Max (LZX) compression.
It would be good to inform them

Re: Win10XPE, iPXE, and DISM...
« Reply #10 on: November 25, 2020, 02:26:22 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
I tried the updated CreateISO.script.  It only works if you check BOTH "Max Compression" and "Export Boot.Win for iPXE Booting".  The "Export..." switch all by itself does not seem to make any difference.  (It appears this option puts the exported boot.wim in the ISO/sources folder as before...)

It appears we do not need the new "Export..." option as long as "Max Compression" works all by itself.  My suggestion, moving forward, would simply be to update the label on the "Max Compression" checkbox to say "Max Compression (required for iPXE)"

Thanks for working with me on this.  Please let me know if you want me to do any additional testing.  I'm happy to support this project any way I can!

>---

I have been trying to get on the iPXE message forum but I am unable to do so.  It looks like they have it locked for internal use only.  I have sent email directly to the moderators (weeks ago) but have not received any reply.  I will continue to try and establish a presence...

Re: Win10XPE, iPXE, and DISM...
« Reply #11 on: November 25, 2020, 03:11:48 PM »

Jimehc

  • Chef
  • ***
  • Date Registered: Jan 2015
  • Posts: 134
Quote
My suggestion, moving forward, would simply be to update the label on the "Max Compression" checkbox to say "Max Compression (required for iPXE)"
:thumbsup:

As the stated use of the "Export" command is and I primarily use "Export" for Image Cleanup
Quote
The source and destination files must use the same compression type.
You can optimize an image by exporting to a new image file.
Exporting the image will remove unnecessary resource files.
So not sure helpful as we are not cleaning up a mounted image - but rather capturing a Newly Applied Image
Now if user was to Mount & Modify an existing Boot.wim - then export to cleanup image

Re: Win10XPE, iPXE, and DISM...
« Reply #12 on: November 25, 2020, 03:46:49 PM »

Malok

  • Chef
  • ***
  • Location: Canada
  • Date Registered: Aug 2016
  • Posts: 202
Yes LZX compression is required to boot over IPXE.

http://theoven.org/index.php?topic=2925.msg34616#msg34616


Re: Win10XPE, iPXE, and DISM...
« Reply #13 on: November 25, 2020, 03:54:13 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
I revisited trying to contact the iPXE devs.  I finally reached them on an IRC channel (#ipxe).  (Apparently their discussion forum has been decommissioned and is awaiting a replacement). 

I gave them the details and passed on the suggestion to add XPRESS compression support to wimboot and they opened up a ticket for it (https://github.com/ipxe/wimboot/issues/5).  Overall, very receptive (like yourself!)

Open Source Rules!

Re: Win10XPE, iPXE, and DISM...
« Reply #14 on: November 25, 2020, 07:25:44 PM »

ChrisR

  • Moderator, XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
My suggestion, moving forward, would simply be to update the label on the "Max Compression" checkbox to say "Max Compression (required for iPXE)"
Done, thanks evanevery :thumbsup:

* CreateISO.script (58.93 kB - downloaded 9 times.)


Thanks for your "PXE booting PE trough HTTP…" post Malok, I missed it.
« Last Edit: November 25, 2020, 07:31:17 PM by ChrisR »

Re: Win10XPE, iPXE, and DISM...
« Reply #15 on: November 25, 2020, 07:46:14 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
Yes, I am also booting Win10XPE via PXE (iPXE) over HTTP.

I have my DHCP server (linux) configured to allow me to easily switch between several PXE boot environments:

- BIOS/iPXE/HTTP -> Win10XPE
- BIOS/iPXE/TFTP -> Win10XPE
- UEFI/iPXE/HTTP -> Win10XPE
- UEFI/iPXE/TFTP -> Win10XPE
- BIOS/PXELINUX/TFTP -> Win10XPE

I can also easily swap back to Win8.1SE simply by changing the boot.wim file...

Right now all the options seem to be working fine for most of my platforms.  However, I am having some memory issues (Bootmgr.exe RAMDisk Error 0x17) when trying to boot my X299 systems via BIOS/iPXE to Win10XPE.  (Win8.1SE seems to work fine in this config.  I have also yet to try using PXELinux as my boot environment...)

Pretty sure this is an iPXE "thing" so I'll be working with the iPXE devs to see if this issue is ultimately resolvable...


Re: Win10XPE, iPXE, and DISM...
« Reply #16 on: November 26, 2020, 07:14:43 PM »

Malok

  • Chef
  • ***
  • Location: Canada
  • Date Registered: Aug 2016
  • Posts: 202
Syslinux offers a component named Vesamenu and with a little practice it can create nice looking menus.

ila_rendered
ila_rendered
ila_rendered
ila_rendered
ila_rendered
ila_rendered
ila_rendered

If you want to give it a try. Here is the code used in pxelinux.cfg

Code: [Select]
DEFAULT vesamenu.c32
ALLOWOPTIONS 0
PROMPT 0
NOESCAPE 1

MENU COLOR BORDER 0 #00000000 #e0000000 std
MENU COLOR TITLE 0 #ff6666ff #e0000000 std
MENU COLOR SEL 0 #ffffcc00 #85000000 std
MENU COLOR UNSEL 0 #ffc0c0c0 #e0000000 std
MENU COLOR PWDHEADER 0 #ff000000 #99ffffff rev
MENU COLOR PWDBORDER 0 #ff000000 #99ffffff rev
MENU COLOR PWDENTRY 0 #ff000000 #99ffffff rev
MENU COLOR HOTKEY 0 #ff00ff00 #e0000000 std
MENU COLOR HOTSEL 0 #ffffffff #85000000 std

MENU TITLE <<< PXE Boot Menu >>>
MENU BACKGROUND jpg/rock1.jpg
MENU WIDTH 71
MENU MARGIN 21
MENU ROWS 13
MENU HSHIFT 3
MENU VSHIFT 6
MENU CLEAR

LABEL BootNormal
MENU LABEL Boot From Hard Disk
LOCALBOOT 0

LABEL
MENU COLOR DISABLED 0 #ffffffff #e0000000 std
MENU DISABLE

LABEL pe10
MENU DEFAULT
MENU LABEL Windows PE 10
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/win10se/boot.ipxe

MENU SEPARATOR

MENU BEGIN Live CD`s
MENU COLOR TITLE 0 #ffcc0000 #e0000000 std
MENU BACKGROUND jpg/rock2.jpg
MENU ROWS 12
MENU HSHIFT 24
MENU VSHIFT 2
MENU TITLE Live CD`s
LABEL Backup
MENU LABEL < Main Menu
MENU GOTO .top
MENU SEPARATOR
LABEL Hirens
MENU LABEL Hiren`s Boot CD
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/Hiren/boot.ipxe
LABEL trinity
MENU LABEL Trinity Rescue Disk
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/trinity/boot.ipxe
LABEL ubcd
MENU LABEL Ultimate Boot CD
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/ubcd/boot.ipxe
LABEL F4ubcd
MENU LABEL Falcon 4 Boot CD
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/f4ubcd/boot.ipxe
LABEL SRD
MENU LABEL Symantec Recovery Disk
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/srd/boot.ipxe
LABEL acronisaio
MENU LABEL Acronis all in One
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/acronisAIO/boot.ipxe
LABEL Lucid Puppy
MENU LABEL Lucid Puppy
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/lupu/boot.ipxe
LABEL Slacko Puppy
MENU LABEL Slacko Puppy
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/slacko/boot.ipxe
LABEL ocxp
MENU LABEL Ophcrack XP
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/Ophtcrk/Ocxp.ipxe
LABEL ocvista
MENU LABEL Ophcrack Vista
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/Ophtcrk/Ocvista.ipxe
MENU END

MENU BEGIN Hard Disk Tools
MENU COLOR TITLE 0 #ff9966ff #e0000000 std
MENU BACKGROUND jpg/rock3.jpg
MENU ROWS 11
MENU WIDTH 34
MENU MARGIN 2
MENU HSHIFT 1
MENU VSHIFT 2
MENU TITLE Hard Disk Tools
LABEL Backup
MENU LABEL < Main Menu
MENU GOTO .top
MENU SEPARATOR
LABEL spinrite60
MENU LABEL SpinRite 6.0
KERNEL memdisk
APPEND initrd=images/hdd/spinrite.imz
LABEL dft
MENU LABEL Drive Fitness Test
KERNEL memdisk
APPEND initrd=images/hdd/dft.imz
LABEL diskcheck
MENU LABEL Disk Checker
KERNEL memdisk
APPEND iso raw initrd=images/hdd/diskcheck.iso
LABEL pqMagic8
MENU LABEL Partition Magic 8
KERNEL memdisk
APPEND initrd=images/sys/pqpm80.imz
LABEL PartWiz
MENU LABEL Partition Wizard 9
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/PartWiz/boot.ipxe
LABEL hdm8
MENU LABEL Hard Disk Manager 8
KERNEL memdisk
APPEND initrd=images/hdd/hdm8.imz
LABEL hdm14
MENU LABEL Hard Disk Manager 14
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/HDM14/boot.ipxe
LABEL hdm15
MENU LABEL Hard Disk Manager 15
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/HDM15/boot.ipxe
LABEL PBR
MENU LABEL Paragon Backup & Recovery
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/PBR/boot.ipxe
MENU END

MENU BEGIN Disk Imaging
MENU COLOR TITLE 0 #ffcc9933 #e0000000 std
MENU BACKGROUND jpg/rock4.jpg
MENU ROWS 6
MENU HSHIFT 24
MENU VSHIFT 17
MENU TITLE Disk Imaging
LABEL Backup
MENU LABEL < Main Menu
MENU GOTO .top
MENU SEPARATOR
LABEL Ghost8
MENU LABEL Ghost 8
KERNEL memdisk
APPEND keeppxe initrd=images/sys/ghost83.imz
LABEL Ghost11
MENU LABEL Ghost 11
KERNEL memdisk
APPEND iso raw initrd=images/sys/ghost11.iso
LABEL CZx64
MENU LABEL CloneZilla x64
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/clonezilla/x64.ipxe
LABEL hdclone
MENU LABEL HD Clone
KERNEL memdisk
APPEND iso raw initrd=images/sys/hdclone.iso
MENU END

MENU BEGIN Hard Disk Test
MENU COLOR TITLE 0 #ff993333 #e0000000 std
MENU BACKGROUND jpg/rock5.jpg
MENU ROWS 13
MENU WIDTH 30
MENU MARGIN 2
MENU HSHIFT 2
MENU VSHIFT 10
MENU TITLE Hard Disk Test
LABEL Backup
MENU LABEL < Main Menu
MENU GOTO .top
MENU SEPARATOR
LABEL hddMaxtor
MENU LABEL Maxtor
KERNEL memdisk
APPEND initrd=images/hddtest/hddMaxtor.imz
LABEL hddIBMhita
MENU LABEL IBM - Hitachi
KERNEL memdisk
APPEND initrd=images/hddtest/hddIBMhita.imz
LABEL hddFujitsu
MENU LABEL Fujitsu
KERNEL memdisk
APPEND initrd=images/hddtest/hddFujitsu.imz
LABEL hddSamsung
MENU LABEL Samsung
KERNEL memdisk
APPEND initrd=images/hddtest/hddSamsung.imz
LABEL hddWD
MENU LABEL Western Digital
KERNEL memdisk
APPEND bigraw initrd=images/hddtest/hddWD.imz
LABEL hddSeagate
MENU LABEL Seagate
KERNEL memdisk
APPEND initrd=images/hddtest/hddSeagate.imz
LABEL datalife
MENU LABEL WD Data Life Tool
  KERNEL memdisk
APPEND initrd=images/hdd/datalife.imz
LABEL gac
MENU LABEL GAC Boot Manager
KERNEL memdisk
APPEND initrd=images/hdd/gac.imz
LABEL dban
MENU LABEL DBan HDD Eraser
KERNEL memdisk
APPEND initrd=images/hdd/dban.imz
LABEL hft
MENU LABEL Hitachi Feature Tool
KERNEL memdisk
APPEND initrd=images/hdd/ibmft.imz
LABEL SEdskmgr
MENU LABEL Seagate HDM
KERNEL memdisk
APPEND initrd=images/hdd/diskmgr.igz
MENU END

MENU BEGIN Memory Utilities
MENU COLOR TITLE 0 #ff669999 #e0000000 std
MENU BACKGROUND jpg/rock6.jpg
MENU ROWS 7
MENU WIDTH 30
MENU MARGIN 2
MENU HSHIFT 2
MENU VSHIFT 8
MENU TITLE Memory Utilities
LABEL Backup
MENU LABEL < Main Menu
MENU GOTO .top
MENU SEPARATOR
LABEL windiag
MENU LABEL Windiag
KERNEL memdisk
APPEND iso raw initrd=images/mem/windiag.iso
LABEL Gold Memory
MENU LABEL Gold Memory
KERNEL memdisk
APPEND iso raw initrd=images/mem/goldmem.iso
LABEL memtest71
MENU LABEL MemTest86 7.1
KERNEL memdisk
APPEND iso raw initrd=images/mem/memtest71.iso
LABEL memtest
MENU LABEL Memtest86 3.2
KERNEL images/mem/memtest
LABEL memtestp
MENU LABEL MemTest86 1.65
KERNEL images/mem/memtestp
MENU END

MENU BEGIN System Tools
MENU COLOR TITLE 0 #ff00ff99 #e0000000 std
MENU BACKGROUND jpg/rock7.jpg
MENU ROWS 6
MENU WIDTH 24
MENU MARGIN 0
MENU HSHIFT 50
MENU VSHIFT 9
MENU TITLE System Tools
LABEL Backup
MENU LABEL < Main Menu
MENU GOTO .top
MENU SEPARATOR
LABEL ipxe
MENU LABEL Boot iPXE
KERNEL ipxe.krn
LABEL chntpw
MENU LABEL Change NT Password
KERNEL memdisk
APPEND iso raw initrd=/images/sys/chntpw.iso
LABEL Avg
MENU LABEL AVG Rescue Disk
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/avg/boot.ipxe
LABEL Comodo
MENU LABEL Comodo Rescue Disk
KERNEL ipxe.krn
APPEND dhcp && chain http://boot.eridu.local/comodo/boot.ipxe
MENU END

MENU SEPARATOR

LABEL ReBoot
MENU LABEL Reboot
KERNEL Com32/reboot.c32

Re: Win10XPE, iPXE, and DISM...
« Reply #17 on: November 30, 2020, 01:45:38 PM »

evanevery

  • Jr. Chef
  • **
  • Date Registered: Jan 2017
  • Posts: 37
I have been running text based menu's from Syslinux for years.  Its very functional and straight forward.

Right now, I'm simply trying to move away from that environment into iPXE.  iPXE is a lot more flexible, cleaner, and significantly faster (if you configure to boot via HTTP instead of TFTP).

My UEFI environments work fine with iPXE but one of my BIOS systems seems to have a "memory challenge" with it...

 

Powered by EzPortal