In this case I used my Win10XPE_x64.iso (builded using as source Win10 18.362.19h1)
My Win10XPE_x64.iso size is 811 MB and boot.wim size is 771 MB
From Post No. 7
Windows Preinstallation Environment (Windows PE) is a minimal operating system where you can prepare a PC for installation, deployment, and servicing of Windows. Here's how to download and install it to an internal or external hard drive.
These instructions show how to set up a basic Windows PE installation that runs from the drive. This can sometimes give you better performance than booting from memory, and can help you run Windows PE on PCs or virtual environments with low memory. This procedure is also known as a non-RAMDISK boot, or a flat boot.
Note When Windows PE is running from the drive, you must turn off the PC before disconnecting the drive to avoid losing your work.
Anyway it is not a good idea to think in use a WinPE environment for everyday use, as it is not legal, and can be prosecuted by the law.
NOTE-1: this procedure may apply to any WinPE. See on Post No. 9 a 7x64 WinPE Compact LZX mode installed on VHD.
Your Win10XPE_x64.iso, (having all programs booting from Ram) to create it see: https://github.com/ChrisRfr/Win10XPE
Procedure to install Win10XPE_x64 Flat and/or Compact LZX Mode on VHD:
1.- Create a fixed or expandable VHD of 3GB or bigger to hold following used sizes, on the root of a partition on your internal HD or USB device (in case of USB device, previously formated with USB_Format_Tool from wimb):
- Non Compacted Flat install used size of my VHD is: 2.19 GB
- Compact LZX Flat install used size of my VHD is: 1 GB
2.- VHD has to contain only a single NTFS primary active partition, Inicialized as MBR, MBR has to be 6.x and it is good (but not a requirement) to have BOOTMGR Partition Boot Record, you can verify/modify this with BootIce.
3.- Mount your Win10XPE_x64.iso or use 7-zip to extract boot.wim file from the sources folder.
EDIT: Also it is possible to install Win10XPE_x64 directly on a Compact mode VHD, using wimlib-clc and the boot.wim file, only required is edit the Wimboot attribute (Flag) of the image. As it already contains its own version of WimBootCompress.ini but we need to apply the Wimboot Flag to the boot.wim first, see post No. 3
5.- Mount again your Win10XPE_x64.iso or use 7-zip to extract to the root of the VHD:
- boot and efi folders, but not the folder sources.
- and also extract BOOTMGR, bootmgr.efi and bootmgr.exe files but DO NOT extact CDUsb.y XPEStartup.cmd and XPEStartup.ini
6.- Edit or create a new VHD entry in both BCDs located on boot partition of your HD or USB device in accordance with attached pictures External BCD.png and External BCD-2.png, look carefully this is very important:
- Edit on the Boot\BCD the bootfile to point to: \windows\system32\boot\winload.exe for MBR/CSM booting.
- Edit on the EFI\Microsoft\Boot\BCD the bootfile to point to: \windows\system32\boot\winload.efi for UEFI booting.
7.- Reboot and select the new booting option created to test the booting process and the VHD creation.
8.- If all went fine, reboot to your current OS or a WinPE, mount the new VHD and capture it by means of wimlib-imagex or wimlib-clc using Wimboot mode as on attached Wimboot mode Capture.png
9.- Create a new VHD or mount the one created before and format it to make a Compact LZX install on the VHD.
NOTE-2: Same procedure apply also to create a Wimboot mode install. But since the boot.wim boots directly on Ram, this is not a better alternative.
NOTE-3: Win10XPE should run fine with its internal WimbootCompress.ini, but our current modded WimbootCompress.ini (same used on VHD_WIMBOOT by wimb) is required on 7 and 8.x WinPEs, in this case they need to also have wofadk.sys installed, to do this see Post No.10
NOTE-4: Thanks to our fellow wimb, that was able to code all the procedures mentioned in this topic into his programs, now this long and tedious manual process can be made automatically, using his new programs mentioned on following EDIT-2 and EDIT-3.
EDIT-2: VHD_WIMBOOT_Trusted-61 and SVBus_INST_Trusted-20 programs by wimb are now available for easy Install of Win10XPE_x64 Flat in VHD, see this post.
EDIT-3: See this post for VHD_WIMBOOT_Trusted-62, and this post for my procedure and tests creating a flat Win10XPE_x64, installed on Wimboot mode on a VHD, (and also optionally externally compressed as *.lz4 and/or *.gz for big space saving and faster loading in Ram), capable to Ramboot from a 2 GB Ram PC.
Edited by alacran, 3 days ago.