OS Deployment Fails at CopyWindowsRE After Upgrading to 6.7.109
Problem
Section titled “Problem”After upgrading to CapaInstaller 6.7.109, OS deployment shows an error dialog partway through the deployment:
Failed to copy Windows RE Tools!
Could not find a part of the path 'R:\Recovery\WindowsRE'.The client log shows the failure at step 19, CopyWindowsRE:
Inf RunInternal : ================ Step 19 - start: CopyWindowsRE ================Inf CopyWindowsRE : Copy RE ToolsInf Copy tools to the Windows RE Tools partitionErr deployprocess failed with task: CopyWindowsRE System.Reflection.TargetInvocationException:Exception has been thrown by the target of an invocation.---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'R:\Recovery\WindowsRE'. at Core.Deploy.CopyWindowsRE()Err ShowMsgBoxOnFailure: Failed to copy Windows RE Tools!Client logs are in C:\Program Files\CapaInstaller\Client\Logs on the endpoint. You can also open
them from the error dialog with Open client log.
The issue appears on every machine you deploy, not on one model, and it starts immediately after the upgrade to 6.7.109.
CapaInstaller 6.7.109 added the Microsoft-recommended partition layout for UEFI devices. CapaInstaller now creates all four partitions itself — System/EFI, MSR, Windows, and Recovery — in the correct order and sizes. See the CapaInstaller changelog.
Before 6.7.109, a common workaround for a too-small EFI partition was a custom DiskPart.txt file
placed on the OSD point and called from the Pre diskpart script. That file takes over
partitioning, so the Recovery partition is never created. Step 19 then has no R: drive to copy
the Windows RE tools to, and fails.
The workaround is no longer needed. 6.7.109 already creates the EFI partition at the recommended size.
Solution
Section titled “Solution”Remove the legacy DiskPart.txt and the call to it, then rebuild the boot image.
-
In the CapaInstaller Console, right-click your OS Deployment point and select Open in Windows Explorer.
-
Browse to the
CUSTOMfolder on the OSD point:<OSD POINT>\MediaMaster\Kit\uefi\amd64\extra\CUSTOM\DiskPart.txt -
Delete
DiskPart.txt. Check both your Dev and Prod OSD points — the file is often present on both. -
Open the Pre diskpart script for the OSD point and remove or comment out the line that calls
DiskPart.txt. See Scripts for where the script types live. -
Rebuild the boot image: right-click the OSD point → Boot Image → Create boot file…. The
CUSTOMfolder is baked intoboot.wimwhen the image is built, so deleting the file only takes effect after a rebuild. -
When the build finishes, click Update servers to push the new
boot.wimto all OSD and PXE servers. You can also do this later with Boot Image → Update OSDClient Bootfiles on all Servers…. -
Promote the change from Dev to Prod.
Deploy a test machine. Step 19 now completes and no error dialog appears.
Verify the Recovery partition
Section titled “Verify the Recovery partition”On a freshly deployed endpoint, confirm the Windows Recovery Environment is in place:
reagentc /infoWindows RE status should be Enabled, with a Windows RE location pointing at a recovery
partition. If the status is Disabled or the location is empty, the endpoint was deployed before
the fix and needs redeploying.
Related
Section titled “Related”- CapaInstaller 6.7.109 Known Issues and Fixes — the other known issues in this release
- OS Deployment and PXE Boot Issues — other real-world OSD and PXE boot problems
- Disk configuration — the partition layouts an OSD point can use
- Scripts — the OSD script types, including Pre diskpart script
- How to Add a NIC Driver to boot.wim for PXE Boot Failures — the boot image rebuild procedure in full
- CapaInstaller changelog — what changed in 6.7.109