diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index fb49057f..0cae0143 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -166,6 +166,16 @@ $null = New-Module { Copy-Item -Recurse -Force (Get-AppxPackage "*Ubuntu*").InstallLocation $wslLocation; Set-UserPermissions $wslLocation; & "$wslLocation\ubuntu.exe" install --root; + wsl --shutdown; + + & { + $tempDisk = New-TemporaryFile; + Move-Item $wslDisk $tempDisk; + wsl --deregister Ubuntu; + Move-Item $tempDisk $wslDisk; + wsl --import-in-place $distribution $wslDisk; + }; + continue; }