Skip to content

Commit 3b0d8bc

Browse files
committed
fix OOBE locale skip + EMS-SAC install timeout
autounattend.xml: - Add SystemLocale/UserLocale=en-GB + InputLocale=0409 (US keyboard) to windowsPE pass - Fill in UILanguage/SystemLocale/UserLocale=en-GB in specialize (was UserLocale=en-US which mismatched en-GB image default) - Add Microsoft-Windows-International-Core to oobeSystem pass -- Win11 25H2 OOBE still prompts for country/keyboard unless all four locale fields are set here - Wrap EMS-SAC Add-WindowsCapability in Start-Job with 20min timeout so a hung FoD download from Windows Update cannot block the rest of FirstLogonCommands indefinitely scripts/verify.ps1: - Relax VirtIO drivers check to >=2 (Balloon only present if host exposes virtio-balloon-pci, not in standard QEMU build) - Add EMS-SAC Tools capability check scripts/remediate.ps1: - Use same Start-Job+timeout pattern for EMS-SAC re-install Built image currently in LFS has UserLocale=en-US and no EMS-SAC Tools -- needs rebuild to pick up these fixes.
1 parent 97698b6 commit 3b0d8bc

3 files changed

Lines changed: 34 additions & 6 deletions

File tree

autounattend.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<SetupUILanguage><UILanguage>en-GB</UILanguage></SetupUILanguage>
66
<InputLocale>0409:00000409</InputLocale>
77
<UILanguage>en-GB</UILanguage>
8+
<SystemLocale>en-GB</SystemLocale>
9+
<UserLocale>en-GB</UserLocale>
810
</component>
911
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1012
<DriverPaths>
@@ -53,10 +55,19 @@
5355
</component>
5456
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5557
<InputLocale>0409:00000409</InputLocale>
56-
<UserLocale>en-US</UserLocale>
58+
<SystemLocale>en-GB</SystemLocale>
59+
<UILanguage>en-GB</UILanguage>
60+
<UserLocale>en-GB</UserLocale>
5761
</component>
5862
</settings>
5963
<settings pass="oobeSystem">
64+
<!-- V11: Force locale in oobeSystem to skip OOBE country/keyboard screens (Win11 25H2) -->
65+
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
66+
<InputLocale>0409:00000409</InputLocale>
67+
<SystemLocale>en-GB</SystemLocale>
68+
<UILanguage>en-GB</UILanguage>
69+
<UserLocale>en-GB</UserLocale>
70+
</component>
6071
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6172
<OOBE><HideEULAPage>true</HideEULAPage><HideOnlineAccountScreens>true</HideOnlineAccountScreens><HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE><ProtectYourPC>3</ProtectYourPC></OOBE>
6273
<UserAccounts><LocalAccounts><LocalAccount wcm:action="add"><Name>cocoon</Name><Group>Administrators</Group><Password><Value>QwBAAGMAIwBvAG4AMQA2ADAAUABhAHMAcwB3AG8AcgBkAA==</Value><PlainText>false</PlainText></Password></LocalAccount></LocalAccounts></UserAccounts>
@@ -73,7 +84,8 @@
7384
<SynchronousCommand wcm:action="add"><Order>9</Order><CommandLine>bcdedit /ems on</CommandLine></SynchronousCommand>
7485
<SynchronousCommand wcm:action="add"><Order>10</Order><CommandLine>bcdedit /bootems on</CommandLine></SynchronousCommand>
7586
<SynchronousCommand wcm:action="add"><Order>11</Order><CommandLine>sc config TermService start=auto</CommandLine></SynchronousCommand>
76-
<SynchronousCommand wcm:action="add"><Order>12</Order><CommandLine>powershell -Command "Add-WindowsCapability -Online -Name Windows.Desktop.EMS-SAC.Tools~~~~0.0.1.0"</CommandLine></SynchronousCommand>
87+
<!-- V11: EMS-SAC wrapped in 20min timeout (FoD download from Windows Update can hang) -->
88+
<SynchronousCommand wcm:action="add"><Order>12</Order><CommandLine>powershell -Command "$j = Start-Job { Add-WindowsCapability -Online -Name Windows.Desktop.EMS-SAC.Tools~~~~0.0.1.0 }; if (Wait-Job $j -Timeout 1200) { Receive-Job $j } else { Stop-Job $j; Write-Output 'EMS-SAC install timed out after 20min' }; Remove-Job $j -Force"</CommandLine></SynchronousCommand>
7789
<!-- V10: Set network Private (required before WinRM AllowUnencrypted) -->
7890
<SynchronousCommand wcm:action="add"><Order>13</Order><CommandLine>powershell -Command "Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private"</CommandLine></SynchronousCommand>
7991
<!-- V10: WinRM for remote management -->

scripts/remediate.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,20 @@ bcdedit /bootems on
4141
Set-Service -Name TermService -StartupType Automatic
4242
Start-Service TermService -ErrorAction SilentlyContinue
4343

44-
# --- EMS-SAC tools ---
45-
$emsCap = Get-WindowsCapability -Online | Where-Object { $_.Name -match 'EMS-SAC' -and $_.State -ne 'Installed' }
46-
if ($emsCap) { Add-WindowsCapability -Online -Name Windows.Desktop.EMS-SAC.Tools~~~~0.0.1.0 }
44+
# --- EMS-SAC tools (20min timeout; FoD download can hang) ---
45+
$emsCap = Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools~~~~0.0.1.0"
46+
if ($emsCap.State -ne 'Installed') {
47+
Write-Output "Installing EMS-SAC Tools (timeout 20min)..."
48+
$j = Start-Job { Add-WindowsCapability -Online -Name Windows.Desktop.EMS-SAC.Tools~~~~0.0.1.0 }
49+
if (Wait-Job $j -Timeout 1200) {
50+
Receive-Job $j | Out-Null
51+
Write-Output "EMS-SAC Tools installed"
52+
} else {
53+
Stop-Job $j
54+
Write-Output "WARNING: EMS-SAC Tools install timed out"
55+
}
56+
Remove-Job $j -Force
57+
}
4758

4859
# --- Network profile ---
4960
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private

scripts/verify.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,19 @@ Check "shutdownwithoutlogon = 1" ($swl -eq 1)
7777
Check "Hostname = COCOON-VM" ((hostname) -eq "COCOON-VM")
7878

7979
# --- VirtIO drivers ---
80+
# Minimum 2 (viostor + NetKVM); Balloon only present if host exposes virtio-balloon device
8081
$vd = Get-WmiObject Win32_PnPSignedDriver | Where-Object { $_.DeviceName -match 'VirtIO' }
81-
Check "VirtIO drivers (>=3)" ($vd.Count -ge 3)
82+
Check "VirtIO drivers (>=2)" ($vd.Count -ge 2)
8283

8384
# --- virtio-win guest tools ---
8485
$vgt = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" |
8586
Where-Object { $_.DisplayName -match 'Virtio-win' }
8687
Check "virtio-win guest tools installed" ($null -ne $vgt)
8788

89+
# --- EMS-SAC Tools (FoD) ---
90+
$emsCap = Get-WindowsCapability -Online -Name "Windows.Desktop.EMS-SAC.Tools~~~~0.0.1.0"
91+
Check "EMS-SAC Tools capability installed" ($emsCap.State -eq "Installed")
92+
8893
# --- Install marker ---
8994
Check "C:\install.success exists" (Test-Path C:\install.success)
9095

0 commit comments

Comments
 (0)