-
Notifications
You must be signed in to change notification settings - Fork 836
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
How to update the WSL2 kernel on current Windows 10 #5650
Comments
Before installing WSL 2, you must enable the "Virtual Machine Platform" optional feature. Open PowerShell as Administrator and run:
Open PowerShell as Administrator and run this command to set WSL 2 as the default version when installing a new Linux distribution:
You might see this message after running that command:
Please follow the link (https://aka.ms/wsl2kernel) and install the MSI from that page on our documentation to install a Linux kernel on your machine for WSL 2 to use. Once you have the kernel installed, please run the command again and it should complete successfully without showing the message. My note: After completed these steps don't forget to set your distribution version to WSL 2. You don't need to reinstall the ubuntu. I used this command:
Source: https://docs.microsoft.com/en-us/windows/wsl/install-win10 |
@koraylinux , I have not asked how to install WSL2. I already have WSL2 installed and done all steps you suggest! There are posts saying there is a new version of the kernel for WSL2, so I simply asked how to upgrade it in current version of Windows 10, if one can... Current (see above) not insider or other development version of Windows. |
Could you share the link where you seen the discussion about new kernel? |
Here, for example. |
I am wondering the same thing. I have WSL2 and have made everything already to force my Ubuntu install to work with WSL2, but upon running the command: Guess we are going to have to wait for the actual update to appear on the system for itself? |
That issue didn't state build number, but did state right at the top "Windows Insider Program with Dev Channel". On 2004 aka 19041 the kernel is installed via https://aka.ms/wsl2kernel. Whether that msi package gets updated to a new kernel absent some (hard to imagine) critical bug in the kernel seems unlikely. [But I wouldn't want to jinx that with a "never".] That CUDA is not available in Win10 2004 goes without saying. |
As of 2020-10-31 the msi installs 4.19.128-microsoft-standard |
I always tried on 2 machines - the same result: WSL2 Kernel update does nothing! According to WSL documentation page, it should be already 5.4 but it uname shows 4.9. I can't accomplish some installation procedure like runc, because it explicitly requires 5.2 at least. Everything related to running OCI containers is messed - it requires cgroups v2 and checks kernel version. Is it only uname bug or normal WSL2 Linux Kernel is only a promise? |
According to Windows Command Line Blog, WSL2 kernel updates will be available through Windows Update. I got an update, a month ago, to the 4.19.128 version, but there is a new stable kernel release, 5.4.51. Unfortunately, this new version isn't available yet through Windows Update (I don't know why). |
Link to download WSL2 Linux kernel updates https://www.catalog.update.microsoft.com/Search.aspx?q=wsl |
The Microsoft catalog update contains 2 cab files for different architectures but wsl --update command ignores them and reports that the 4.19 is the recent version and nothing to update. Looks like new WSL Kernels are distributed via a different channel. I tried to install the new Kernel using cab but it installs nothing. From the wsl's point of view, the cab is empty. msi installer doesn't work too - the old Kernel version is not replaced and Kernel.rollback file is not created. |
Actually yes it does. run wsl --shutdown from an administrator upscaled window. In the location where you stored the extracted MSI kit, run that. And then restart WSL from that same window by entering wsl at the prompt and enter into its prompt the uname -a function. Restart docker if you run it as well. |
@DoctorWho8 Unfortunately |
Will this issue be solved or the WSL stopped to work forever? I already get message 'WSL requires the Kernel update from Docker Desktop installer. I don't want toinstall 3th party installer on my machine - it looks like fishing attempt. Promised wsl --update can't find a new kernel. |
@PavelSosin-320 +1 I too am encountering this issue. |
After trying to install Windows Subsystem for Linux update using the I have absolutely no idea how to fix this. Why can the older version not be removed??? These are the four distributions I have installed: C:\Users\username>wsl -l -v
|
I see something: the Kernel file is always opened by Wmwp process ( Hyper-V worker process) even after wsl --shutdown. It is a hard-to-kill process. wsl --shutdown must stop Hyper-V worker by my understanding. Otherwise, neither update procedure will replace the Kernel file. |
On a tablet with win10 Home I had to revert from wsl2 to wsl1 because I had the wake up issue. Should I remove this wsl update |
Well perhaps the fact that this OS isn't part of the Insider collection might be part of the difference. Anyway I was successful following the steps I outlined above. |
For users coming here from a Google search for WSL2 Kernel Upgrade:
This should update the kernel and show you the latest running version. |
@CaseyLabs I've tried this many times but it's blocked at:
Regardless of where I browse in my File Explorer and point to the downloaded |
Right click on it and bring up the properties dialog box. Check to see if it shows that the blocked checkbox is checked. Uncheck it and close the dialog box. Then try again. |
Turn "Receive updates for other Microsoft products when you update Windows" on in Advance options of Windows update, the WSL2 kernel will get updated automatically. |
This seems to fix the issue. After enabling that, it updated the kernel which now is 5.4.72! |
In Microsoft Catalog, the update is now 5.4.91. |
any update on this ? |
The latest WSL 2 kernel for 20H2 19042.804 is 5.4.72. Even if you install 5.4.91 from the Microsoft Catalog by hand, Windows Update (with "Receive updates for other Microsoft products when you update Windows" enabled) will attempt to downgrade you back to 5.4.72, which fails unless you uninstall the 5.4.91 kernel from Add/Remove Programs first. Apart from that, the hand-upgraded kernel seemed to work, but I didn't really put it through its paces. So it seems to be working-as-intended. @fenris What did you have in mind as an update? I expect that Windows Insiders get Linux 5.4.91 installed by WU, but don't know for sure. The Microsoft Catalog web UI doesn't tell you which Windows builds will get which updates, so I'm not sure if there's a way to confirm this, and I don't have an Insider build running. |
tl;dr the kernel-in-use appears affected by the user running the WSL instance. In my case, only the Administrator user instance of WSL was affected by the updated kernel. I updated a Windows 10 Pro host to Windows Subsystem for Linux Update - 5.10.43. My initial install of WSL used the Microsoft Store. Subsequent updates were manually downloaded and installed.
It appears only the Administrator can successfully WSL update. I suspect there is some tangled relationship (bug) among:
|
I had the same issue and I solved it by downloading the latest kernel from this site ♥
|
Hi @jtmoon79, looks like I have the same thing here
Have you figured out anything on this issue? Is it possible to update kernet for my user? |
@xDFCx I had similar issue. In my case it was caused because I had WSL in version 1. if version is 1 change it to 2 by typing: After that wsl --status in cmd and uname -r in WSL shows the same kernel version. |
On Thu, 2022-03-03 at 09:26 -0800, thething wrote:
now why is this not working?
Exactly what the error message states: the sources for kernel stated
can't be found. You may have to point the build toward the sources if
they can't be found automatically, either through ./configure options
or through flags passed directly to make.
|
on ubuntu upgrade
how upgrade kernel ? |
@stloc Depending on what version of Windows you're on, |
This link fixed my problem. 👍 |
Similar problem here. According to wsl I have the latest kernel installed, according to the linux distro I don't:
vs
I've updated wsl from 1 to 2, tried reinstalling the kernel update, running the repair tool. All doesn't solve the problem. Does anyone have other ideas? |
@rsokolewicz - it sounds like your Ubuntu installation is still running under WSL1. Even though you've set the WSL Default Version to 2, that setting doesn't get applied to machines that were originally created under WSL1. You can upgrade your Ubuntu distribution to WSL2 by running:
See here for more details: |
hi @CaseyLabs, that worked for me. thanks :) |
This page doesn't show the 5.15 kernel. https://www.catalog.update.microsoft.com/Search.aspx?q=wsl. If I try
I cannot enable automatic update since its managed by my org. So I want to install 5.15 kernel manually. How to do that? |
Updated Linux kernel is provided with WSL package https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R?hl=en-us&gl=us. Can you install that? |
@Biswa96 , is there a install without the store? I cant install stuff from the store for some reason. |
Sure. Just download the msixbundle file from here https://github.com/microsoft/WSL/releases and install it with |
@Biswa96, OK, thanks. Unfortunately, this didn't change the kernel verion it seems. I have removed the old kernel update previously. Then from admin pwsh
The output here is in german but It said there is no kernel, and then I did wsl update
And the kernel is still
My Windows version should be OK for this
|
Do you have any |
@Biswa96 , no. I dont have a .wlsconfig at all in my profile folder. I also checked the admin users profile folder. |
wsl --set-default-version 2 fails, |
Also, repos never work for me. My MS store, works about 10 percent of the time. So, I can't install ubuntu from there either. |
wsl --update just run this in windows powershell it worked for me |
The latest 5.15 series kernel release is 5.15.90.1. There's a 6.1 series release but I'm not sure why it's not yet being distributed (might still be WIP?). If you're stuck on 5.10.102.2 or older, that's the latest release from the Microsoft Update Catalog, I suspect in this case one needs to switch to the Microsoft Store version of WSL to get newer kernels. Looking at https://github.com/microsoft/WSL/releases, the 1.3 series of the Windows Store version of WSL includes Linux 5.15.90.2-3, so I'm assuming the 6.1 series is not ready yet. (That version doesn't appear on the WSL2-Linux-Kernel repo AFAICT) Anyway, since this ticket predates the Microsoft Store move, I'd suggest anyone having problems with updates after 5.10.102.2 open a new ticket, with full details, particularly |
The Microsoft Community wrote an article for upgrading to Kernel V6. Check the link below. |
Currently,
I am on current Windows 10 19041.388 and I would to know how WSL2 kernel updates. I see that
Settings Apps
hasWSL Update
package...Will it occur with Windows Update, and I have only to wait? or is there another way?
Thanks
The text was updated successfully, but these errors were encountered: