Installing Windows 10X (from cabs) on real hardware
Created: January 18, 2021 | Last Update: January 18, 2021 |
---|---|
Authors: | NT Authority, Albacore, Gustave Monce, Rafael Rivera, Daniel Kornev |
Status: | Draft |
Overview
Here's some quick notes on installing Windows 10X on real hardware from cabs. For this example, we're assuming a system with no other critical disks installed, and a helpful host system being around to set up the initial image.
This guide has been created for the 20279 version of Windows 10X.
Prerequisites
Host
- Windows 10 Iron or Cobalt (20279 or 21xxx+) - though 20H2 can also work just fine
- Utility USB flash drive of ~8GB+
Target
- Graphics card with DCHU drivers available
- UEFI system firmware with the ability to disable Secure Boot
- Boot drive larger than 100 GiB
- Learn how to disable Secure Boot in your device, and change its boot order to allow booting from the USB Flash Drive
Peripherals
Note: If your device doesn't have a built-in Ethernet adapter, prepare an external Ethernet adapter (USB/USB-C/USB-C Hub with Ethernet). You won't be able to pass through the OOBE without internet connection.
Common: Files & Tools
Workspace
- Create a folder called 10X in the root of your drive, e.g,
C:\10X
- Create a subfolder called
Sources
- Create a subfolder called
DCHUDrivers
- Download bits (e.g., by using Gus's UUPMediaCreator)
- Put them into
Sources
folder (e.g.,C:\10X\Sources
) - Make sure that bits are in
Sources
folder directly (\10X\Sources\*compdb*.cab
should be at this level) - Download
overlay.zip
from Rafael - Unpack it to your
Sources
folder (e.g.,C:\10X\Sources
) - Open command line in the
Sources
folder and runfixup.cmd
in it - Move
FM
folder from\10X\Sources
to\10X
- Move
OEMInput.xml
from\10X\Sources
to\10X
- Your resulting folder structure should look like this:
(disk root)
|
-----10X
|
------DCHUDrivers
------FM
------Sources
|
-----appx (includes folders for each AppX)
-----Retail
|
-----%Architecture_Name% (e.g., AMD64)
|
-----fre (includes the rest of the cabs)
-----(several top-most cabs with compdb in the name, and .uupmcreplay file)
------OEMInput.xml
Install Tools
Note: Both ADK and WinPE should have the same or higher version as your Windows 10X Image.
- [Optional] If you have previous kits (e.g., WP8 Tools), remove them
-
Download the ADK Insider Preview ISO for your host OS version (only tested with
Windows_InsiderPreview_ADK_en-us_20279.iso
) - Install Deployment Tools, ICD, Configuration Designer, and uncheck the rest if possible/as needed
- Download the Windows Preinstallation Environment ISO for your host OS version (only tested with 20279 version)
- Install Windows Preinstallation Environment
Configure Your BSP
Board Support Packages (BSP) is a collection of drivers/settings required to run Windows 10X on a hardware platform. The BSP also includes a set of device drivers that are specific to the components/silicon used in the device, mostly in the form of .inf files and their associated .sys/.dll files.
You will need a BSP for your device if you want it to use all of its devices (WiFi, Cameras, etc.).
To configure your BSP, you need to obtain DCH (Universal) Drivers for your device, and then prepare the OEMDriversFM.xml
feature manifest XML file with the links to your drivers.
Prepare DCHU Drivers for Your Hardware
- Obtain DCHU Drivers for your hardware (especially GPU)
- Find all infs that contain "firmware update" in them and remove them
- Copy all remaining drivers to your
DCHUDrivers
subfolder (\10X\DCHUDrivers
)
Form A BSP for Your Hardware
- Use
OEMDriversFM.xml
example from Albacore
<?xml version="1.0" encoding="utf-8"?>
<FeatureManifest Revision="1" SchemaVersion="1.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/embedded/2004/10/ImageUpdate">
<Drivers>
<BaseDriverPackages>
<DriverPackageFile Path="C:\10X\DCHUDrivers\WcosGraphicsDriver.Intel\bin\Drivers\iigd_oc" Name="iigd_dc_base.inf"/>
</BaseDriverPackages>
</Drivers>
</FeatureManifest>
- For each of your drivers put a link to it in the form like one above.
Configure Your Image
- Edit
OEMInput.xml
(remove VM_*, uncomment UEFI_Hardware line, add/remove features etc.) - Add a link to your BSP (
OEMDriversFM.xml
) to yourOEMInput.xml
like this:
<?xml version="1.0" encoding="utf-8"?>
<OEMInput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/embedded/2019/06/ImageUpdate">
<Description></Description>
<DeviceLayoutType>GPT_SPACES_512</DeviceLayoutType>
<SV>Microsoft</SV>
<Device>GenericUEFIDevice</Device>
<ReleaseType>Test</ReleaseType>
<BuildType>fre</BuildType>
<Languages>
<Language Default="true">en-us</Language>
</Languages>
<AdditionalFMs>
<!--Windows 10X Feature Manifests-->
<AdditionalFM>c:\10X\FM\WindowsCoreProductionFM.xml</AdditionalFM>
<!-- Your BSMBSP -->
<AdditionalFM>c:\10X\OEMDriversFM.xml</AdditionalFM>
</AdditionalFMs>
</OEMInput>
Build Your Image
- Prepare your environment:
Start > open elevated *Deployment and Imaging Tools Environment
- In that window, type this (where
C:\10X
is your actual folder):
> cd C:\10X
- Unless you use a non-prod machine, run this command to unregister the imaging toolchain overrides:
> "%ProgramFiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\%PROCESSOR_ARCHITECTURE%\DISM\wimmountadksetup%PROCESSOR_ARCHITECTURE%.exe" /q /uninstall
- Run
IMGGEN
in your Command Prompt window (give a name to your ffu, e.g.,SurfaceGo.ffu
if your device is Surface Go). Important: Use absolute paths both in files (OEMInput.xml
&OEMDriversFM.xml
) AND in the command line:
> imggen c:\10X\SurfaceGo.ffu C:\10X\OEMInput.xml C:\10X\Sources AMD64
Prepare USB Drive for Flashing
Note: You can follow Microsoft docs (Part I: Create Multipartition USB Drive, Part II: Install WinPE), or you can follow these instructions (taken from the docs):
- Get an empty Flash drive (with size at least 8GB)
- In the same Deployment and Imaging Tools Environment's elevated Command Prompt window open diskpart and press
Enter
- Follow these instructions to create two disks:
List disk
select disk X (where X is your USB drive)
clean
create partition primary size=2048
active
format fs=FAT32 quick label="WinPE"
assign letter=P
create partition primary
format fs=NTFS quick label="Images"
assign letter=I
exit
- Create Working WinPE files by using this command (where
C:\WinPE_amd64
is the location of your choice):
copype amd64 C:\WinPE_amd64
- Create bootable media with it (where
P:
is the letter of the FAT32 partition of your USB Flash drive):
MakeWinPEMedia /UFD C:\WinPE_amd64 P:
- Copy your Image (
.ffu
file) to theI:
drive (the second partition of your Flash drive formatted with NTFS)
Apply Your Image
Apply Your Image on Machine Without Windows 10X Installed On It
- Boot from WinPE drive
- Open diskpart
- Type this:
list disk
Take a note of the name of your device's main disk drive, e.g., disk 0
4. Type exit to leave diskpart
5. Use this command (and specify the correct path to the ffu that you created above, as well the number of the physical drive):
dism /apply-ffu /imagefile:C:\YourDevice.ffu /applydrive:\\.\PHYSICALDRIVE0
- Once complete, remove your USB flash drive
- Type exit in the Command Prompt window
Apply Your Image on Machine With Windows 10X Installed On It
- Boot from WinPE drive
- Type this:
spaceutil get-drive -poolname ospool
- Take a note of the name of your device's main disk drive, e.g.,
disk 0
- Use this command (and specify the correct path to the ffu that you created above, as well the number of the physical drive):
dism /apply-ffu /imagefile:C:\YourDevice.ffu /applydrive:\\.\PHYSICALDRIVE0
- Once complete, remove your USB flash drive
- Type exit in the Command Prompt window
Load Windows 10X
At this time, your Windows 10X will boot. If everything is correct you should see the OOBE.