From 5cdcf9be618757654973224702c6ee2b8abc8a06 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Tue, 6 Oct 2026 11:21:06 +0000 Subject: [PATCH] Prover floor route 1 step 1: the elevated WSL2-enable job for PC 1 (two features, no restart inside the job) Co-Authored-By: Claude Fable 5.1 --- tools/prover-floor/pc1-wsl2-enable.ps1 | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/prover-floor/pc1-wsl2-enable.ps1 diff --git a/tools/prover-floor/pc1-wsl2-enable.ps1 b/tools/prover-floor/pc1-wsl2-enable.ps1 new file mode 100644 index 000000000..1176db656 --- /dev/null +++ b/tools/prover-floor/pc1-wsl2-enable.ps1 @@ -0,0 +1,28 @@ +# Prover floor, route 1, step 1 (6 October 2026, the project lead at 11:25Z: YES to WSL2 on PC 1, one administrator prompt plus +# a reboot). Published --elevated: the UAC prompt is the job's first step. Enables the two Windows features WSL2 +# needs, no distribution, no restart inside the job (the project lead reboots on the coordinator's word). The RESULT line says +# "reboot needed" when Windows asks for one. Touches nothing else: the installed app, the miners and the node run on. +$ErrorActionPreference = 'Continue' +function Stamp { (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') } +"RESULT start $(Stamp) machine=$env:COMPUTERNAME elevated=$(([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))" +"RESULT windows $((Get-CimInstance Win32_OperatingSystem).Caption) build $((Get-CimInstance Win32_OperatingSystem).BuildNumber)" +"RESULT gpus $((& nvidia-smi --query-gpu=index,name,memory.total,memory.used --format=csv,noheader,nounits 2>$null) -join ' | ')" +$features = @('Microsoft-Windows-Subsystem-Linux', 'VirtualMachinePlatform') +$restart = $false +foreach ($f in $features) { + $before = (Get-WindowsOptionalFeature -Online -FeatureName $f -ErrorAction SilentlyContinue).State + "RESULT feature $f before=$before" + if ("$before" -eq 'Enabled') { continue } + try { + $r = Enable-WindowsOptionalFeature -Online -FeatureName $f -NoRestart -ErrorAction Stop + $after = (Get-WindowsOptionalFeature -Online -FeatureName $f -ErrorAction SilentlyContinue).State + "RESULT feature $f enable=ok after=$after restart_needed=$($r.RestartNeeded)" + if ($r.RestartNeeded) { $restart = $true } + } catch { + "RESULT feature $f enable=FAILED $($_.Exception.Message)" + } +} +$wslState = try { (& wsl.exe --status 2>&1 | Out-String) -replace "`0", '' } catch { "wsl.exe not callable: $_" } +"RESULT wsl_status $(($wslState -split "`r?`n" | Where-Object { $_.Trim() } | Select-Object -First 3) -join ' | ')" +if ($restart) { "RESULT reboot needed: the features are enabled and Windows asks for a restart before WSL2 can start" } else { "RESULT no reboot needed (the features were already enabled or Windows asked for none)" } +"RESULT end $(Stamp)"