mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 16:30:30 -06:00
Updated Ship WSL 2 Linux Kernel (markdown)
parent
2ac2797013
commit
f3746a4d16
@ -9,6 +9,7 @@ The whole serving story is divided into three steps:
|
||||
2. Remove Linux kernel from Windows. When you see `WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel`, that means you are in this step.
|
||||
3. Linux kernel update is delivered to your machine automatically by Microsoft Update.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Windows Subsystem for Linux Update (MSI installer)
|
||||
@ -38,11 +39,30 @@ If Linux kernel is removed from Windows image, you will see this error message:
|
||||
---
|
||||
|
||||
## Deliver Kernel by Microsoft Update
|
||||
### Design of Kernel update
|
||||
Kernel is delivered by Microsoft Update, and two version of kernels are kept in tools: `kernel` and `kernel.rollback`. You are able to rollback to previous version by `wsl --update --rollback`, but
|
||||
wsl.exe doesn't provide public interface to revert the rollback. It's by design.
|
||||
|
||||
TBD
|
||||
When rollback happens, it's assumed that this version is bad and user should not pickup this version again.
|
||||
Assume Microsoft shipped three versions of version:
|
||||
|
||||
**A(.104) -> B(.121) -> C(.1xy)**
|
||||
|
||||
User hits problem on version B(.121), then user rolled back to A(.104). So no public interface is provided for you to revert the rollback. Here is the status of kernel:
|
||||
| kernel | kernel.rollback |
|
||||
|---|---|
|
||||
| B(.121) | A(.104) |
|
||||
|
||||
When bug fix for B is ready and C is shipped, user picks up C automatically by Windows Update. Since B is assumed bad and A is good, user is not allowed to rollback to B too but A. Here is the actual mapping after user updates to C:
|
||||
|
||||
| kernel | kernel.rollback |
|
||||
|---|---|
|
||||
| C(.1xy) | A(.104) |
|
||||
|
||||
version B(.121) is dropped because it's assumed bad and it's only allowed to rollback from C to A(.104)
|
||||
|
||||
---
|
||||
## Troubleshooting
|
||||
## Troubleshooting and How to
|
||||
#### `This update only applies to machines with the Windows Subsytem for Linux`
|
||||
|
||||
see Pre-Check Step
|
||||
@ -63,3 +83,26 @@ Not matter what reason, there is no `%SystemRoot%\system32\lxss\tools\kernel` ex
|
||||
- `msiexec /a "wsl_update_x64.msi" /qb TARGETDIR="C:\temp"`
|
||||
- copy the kernel file from C:\temp to `%SystemRoot%\System32\lxss\tools`
|
||||
|
||||
### How to rollback kernel
|
||||
MSI installer keeps two version of kernel, if you find `kernel.rollback` in tools, then you are able to rollback to an old version of kernel.
|
||||
`
|
||||
dir %SystemRoot%\system32\lxss\tools\kernel*
|
||||
`
|
||||
|
||||
You can rollback the kernel with below command which requires admin permission.
|
||||
```
|
||||
wsl.exe --update --rollback
|
||||
wsl --shutdown
|
||||
```
|
||||
|
||||
Please note that `--shutdown` stops both WSL 1 and WSL 2 instances.
|
||||
|
||||
After `wsl --update --rollback`, the running instance doesn't pick up the kernel immediately, you have to save your work, then shutdown and restart the Linux.
|
||||
|
||||
### How to revert the kernel rollback
|
||||
wsl doesn't provides public interface for you to revert the rollback, but you still be able to do it manually:
|
||||
|
||||
```
|
||||
deleting RollbackKernel in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
|
||||
wsl --shutdown
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user