From b4d303cbaa24836cf0f28b192f1cce102644266f Mon Sep 17 00:00:00 2001 From: sysadmin Date: Mon, 8 Jun 2026 21:55:47 +0100 Subject: [PATCH] =?UTF-8?q?feat(windows):=20unattended=20install=20?= =?UTF-8?q?=E2=80=94=20noprompt=20boot=20+=20disk=20config=20(M2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VM boot test proved the ISO boots under UEFI+SecureBoot+TPM2 but stopped at the "press any key" prompt and (post-boot) the disk screen. Enable hands-off install: - build.ps1: use efisys_noprompt.bin (fall back to efisys.bin) so the ISO boots without a keypress. - autounattend.xml: add GPT/UEFI DiskConfiguration (wipe disk 0 -> EFI/MSR/Win), ImageInstall index 1, AcceptEula (eval = no key). Bootstrap local-admin pw is a PLACEHOLDER the SKU pipeline must replace. Co-Authored-By: Claude Opus 4.8 --- .../installer/autounattend/autounattend.xml | 59 +++++++++++++------ windows/installer/build.ps1 | 7 ++- 2 files changed, 47 insertions(+), 19 deletions(-) diff --git a/windows/installer/autounattend/autounattend.xml b/windows/installer/autounattend/autounattend.xml index af356e5..42bf809 100644 --- a/windows/installer/autounattend/autounattend.xml +++ b/windows/installer/autounattend/autounattend.xml @@ -2,12 +2,14 @@ @@ -24,10 +26,35 @@ - + + OnError + + 0 + true + + 1EFI300 + 2MSR16 + 3Primarytrue + + + 11FAT32 + 22 + 33NTFSC + + + + + + 03 + + + /IMAGE/INDEX1 + + + + - + true @@ -38,28 +65,26 @@ publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> true - true + true true - 3 + 3 - silvermetal Administrators SilverMetal + SM-setup-CHANGEME-1!true</PlainText></Password> </LocalAccount> </LocalAccounts> </UserAccounts> - <!-- - Hardening runs from C:\Windows\Setup\Scripts\SetupComplete.cmd, which - Windows Setup executes automatically (as SYSTEM) at the end of setup, - before first interactive logon. build.ps1 stages it + the hardening/ - modules into the image. No FirstLogonCommands needed (avoids a double-run). - --> <RegisteredOwner>SilverMetal</RegisteredOwner> <RegisteredOrganization>SilverLABS</RegisteredOrganization> + <!-- + Hardening runs from C:\Windows\Setup\Scripts\SetupComplete.cmd, which + Windows Setup executes automatically (as SYSTEM) at the end of setup. + --> </component> </settings> diff --git a/windows/installer/build.ps1 b/windows/installer/build.ps1 index eb151b6..7872397 100644 --- a/windows/installer/build.ps1 +++ b/windows/installer/build.ps1 @@ -142,8 +142,11 @@ function Invoke-Brand { Write-Stage 'Stage 5: branding'; Write-Warning ' defer function Invoke-Repack { Write-Stage 'Stage 6: repack UEFI-bootable ISO (oscdimg)' $etfs = Join-Path $isoRoot 'boot\etfsboot.com' - $efi = Join-Path $isoRoot 'efi\microsoft\boot\efisys.bin' - if (-not (Test-Path $efi)) { throw "missing UEFI boot image: $efi" } + # Prefer the no-prompt UEFI boot image so the ISO boots hands-off (no "press + # any key"); fall back to the prompt variant if absent. + $efi = Join-Path $isoRoot 'efi\microsoft\boot\efisys_noprompt.bin' + if (-not (Test-Path $efi)) { $efi = Join-Path $isoRoot 'efi\microsoft\boot\efisys.bin' } + if (-not (Test-Path $efi)) { throw "missing UEFI boot image under efi\microsoft\boot\" } # Work paths have no spaces (SYSTEM TEMP / runner temp), so omit oscdimg's # inner quotes around the boot images -- otherwise PowerShell mangles the # native -bootdata arg into doubled quotes (oscdimg Error 123).