Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Insider Preview update causes WSL to fail to run and prevents reinstallation [Version 10.0.26100.1] #11495

Open
1 of 2 tasks
tanaous opened this issue Apr 22, 2024 · 7 comments
Labels
msix Installer issue.

Comments

@tanaous
Copy link

tanaous commented Apr 22, 2024

Windows Version

Microsoft Windows [Version 10.0.26100.1]

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

wsl --uninstall
dism /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /Remove
dism /online /disable-feature /featurename:VirtualMachinePlatform /Remove
restart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
restart
wsl --install

Expected Behavior

I originally had a normally functioning WSL environment with Ubuntu as the operating system. However, after I upgraded to the latest Windows Insider Preview (I have been on this channel for a while without any issues), WSL failed to start, indicating that I needed to reinstall it (providing an MSI file for WSL2). But the installation encountered an error (even when the required MSI file was provided). So, I used the command wsl --uninstall to remove the WSL component, disabled the Linux subsystem feature, and restarted. After re-enabling the Linux subsystem and virtual machine feature components, and another restart, the installation using the command wsl --install failed again. The issue is reproducible. The logs from the reproduction process are in the attachment.

Actual Behavior

PS C:\WINDOWS\system32> wsl --install
Downloading: Windows Subsystem for Linux 2.1.5
Installing: Windows Subsystem for Linux 2.1.5
Catastrophic failure
PS C:\WINDOWS\system32>

====="Original Output: Chinese Version"=====
PS C:\WINDOWS\system32> wsl --install
正在下载: 适用于 Linux 的 Windows 子系统 2.1.5
正在安装: 适用于 Linux 的 Windows 子系统 2.1.5
灾难性故障
PS C:\WINDOWS\system32>

Diagnostic Logs

WslLogs-2024-04-22_20-30-54.zip

Copy link

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Found '/feature', adding tag 'feature'
.wslconfig found
Appx package is not installed

@OneBlue OneBlue added msix Installer issue. and removed feature labels Apr 22, 2024
@OneBlue OneBlue assigned ghost Apr 22, 2024
@OneBlue
Copy link
Collaborator

OneBlue commented Apr 22, 2024

@pmartincic: Looks like this user is hitting the MSIX install issue. This would be a good test for the installer fixes you're working on.

Microsoft.Windows.Subsystem.Lxss	LxssException	04-22-2024 05:31:30.229	"	"	"Code: 	
File: 	D:\a\1\s\src\windows\wslinstall\DllMain.cpp
FunctionName: 	
HRESULT: 	0x80070032
Line number: 	46
Message: 	Source: unsigned int __cdecl InstallMsix(unsigned long)() - D:\a\1\s\src\windows\wslinstall\DllMain.cpp:505
Type: 	0
wslVersion: 	2.1.5.0"				11452	29356	2		2e99a5db-94ac-000b-1d61-9c2eac94da01		

@zrainbowk
Copy link

1、按win+R键打开运行,输入【gpedit.msc】,打开【本地组策略编辑器】
2、依次展开【计算机配置–>管理模板–>Windows组件–>应用程序包部署】,找到【允许开发Windows应用商店并从集成开发环境(IDE)安装】和【允许所有受信任的应用程序】,双击进入设置界面,选择【已启用】,然后后击【应用】确定即可。
3、打开管理员权限的 PowerShell。运行以下命令:
Get-AppxPackage MicrosoftCorporationII.WindowsSubsystemForLinux -AllUsers | Remove-AppxPackage
wsl --update --web-download

如果不行,尝试增加以下操作后再次运行第三步:
1、打开 设置 > 系统 > 存储。在 更多存储设置 下,点击 更改新内容的保存位置。确保 新应用将保存到 设置为系统驱动器(C:)。
2、第二步中的应用程序包部署的各项设置,都设置为不会阻止安装的状态。

@luke396
Copy link

luke396 commented Jul 15, 2024

1、按win+R键打开运行,输入【gpedit.msc】,打开【本地组策略编辑器】

新版的win11中似乎无法找到和打开策略组,我利用以下得到修复。

  1. 打开 设置 > 系统 > 存储。在 更多存储设置 下,点击 更改新内容的保存位置。确保 新应用将保存到 设置为系统驱动器(C:)。

  2. 打开管理员权限的 PowerShell。运行以下命令:
    Get-AppxPackage MicrosoftCorporationII.WindowsSubsystemForLinux -AllUsers | Remove-AppxPackage
    wsl --update --web-download

此时就已经完成新版本的安装。

一个可能潜在的问题是(不确定是否是由于上述直接引起),之后以code .方式在wsl中启动vscode会弹出
Updates are disabled because you are running the user-scope installation of Visual Studio Code as Administrator.
(在桌面上(非wsl中)启动vscode,仍然可以正常更新。)

@Hakuin123
Copy link

同样尝试前两步成功安装,感谢大佬
另外,Windows家庭版不支持组策略

@Ariesla
Copy link

Ariesla commented Jul 26, 2024

感谢大佬

@hexh250786313
Copy link

如果你的系统是家庭版,没有“本地安全策略”,可以尝试保存以下代码为 .bat 格式,然后以管理员权限运行这个 bat 文件,就可以给系统添加上“本地安全策略”了

pushd "%~dp0"
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msix Installer issue.
Projects
None yet
Development

No branches or pull requests

7 participants