Skip to content

Commit dee2bf2

Browse files
Ben Hillislicanhuacraigloewen-msftmattwojoBen Hillis
authored
Add release notes for 20226 (#939)
* command not found * Update WSL/troubleshooting.md * Update WSL/troubleshooting.md * Apply suggestions from code review * Update troubleshooting.md * Add release notes for 20226 * On branch edburns-msft-diskpart-expand-improvement Fixes #951 resize improvement (#952) modified: WSL/compare-versions.md * Update virtualization not enabled error section (#949) Updating section describing what to do when virtualization not enabled to include error message and error code. * Fix typo (whats → what's) (#947) * Updated troubleshooting.md (#958) * Remove admin recommendation where unnecessary (#966) * Capitalize “Linux” in doc title (#962) * Replace kernel link (#967) * Adding more emphasis one when to Restart through the process (#961) * Update install-win10.md (#942) Co-authored-by: Canhua Li <[email protected]> Co-authored-by: Craig Loewen <[email protected]> Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Ben Hillis <[email protected]> Co-authored-by: Ed Burns <[email protected]> Co-authored-by: Ben Randall <[email protected]> Co-authored-by: Andrea Spadaccini <[email protected]> Co-authored-by: Adolfo Jayme-Barrientos <[email protected]> Co-authored-by: Pablo Espinosa <[email protected]> Co-authored-by: Miklos Cari <[email protected]>
1 parent b15b847 commit dee2bf2

6 files changed

Lines changed: 124 additions & 48 deletions

File tree

WSL/compare-versions.md

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Comparing WSL 2 and WSL 1
3-
description: Compare version 1 and version 2 of the Windows Subsystem for Linux. Learn whats new in WSL 2 - actual Linux kernel, faster speed, full system call compatibility. WSL 1 works better if your storing files across operating file systems. You can expand the size of your WSL 2 Virtual Hardware Disk (VHD).
4-
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, gnu, linux, ubuntu, debian, suse, windows 10, UX changes, WSL 2, linux kernel, network applications, localhost, IPv6, Virtual Hardware Disk, VHD, VHD limitations, VHD error
3+
description: Compare version 1 and version 2 of the Windows Subsystem for Linux. Learn whats new in WSL 2 - actual Linux kernel, faster speed, full system call compatibility. WSL 1 works better if your storing files across operating file systems. You can expand the size of your WSL 2 Virtual Hard Disk (VHD).
4+
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, gnu, linux, ubuntu, debian, suse, windows 10, UX changes, WSL 2, linux kernel, network applications, localhost, IPv6, Virtual Hard Disk, VHD, VHD limitations, VHD error
55
ms.date: 09/15/2020
66
ms.topic: conceptual
77
ms.localizationpriority: high
@@ -51,7 +51,7 @@ WSL 2 is only available in Windows 10, Version 1903, Build 18362 or higher. Chec
5151
> [!NOTE]
5252
> WSL 2 will work with [VMware 15.5.5+](https://blogs.vmware.com/workstation/2020/05/vmware-workstation-now-supports-hyper-v-mode.html) and [VirtualBox 6+](https://www.virtualbox.org/wiki/Changelog-6.0). Learn more in our [WSL 2 FAQs.](./wsl2-faq.md#will-i-be-able-to-run-wsl-2-and-other-3rd-party-virtualization-tools-such-as-vmware-or-virtualbox)
5353
54-
## Whats new in WSL 2
54+
## What's new in WSL 2
5555

5656
WSL 2 is a major overhaul of the underlying architecture and uses virtualization technology and a Linux kernel to enable new features. The primary goals of this update are to increase file system performance and add full system call compatibility.
5757

@@ -155,11 +155,11 @@ netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 conne
155155

156156
WSL 2 distributions currently cannot reach IPv6-only addresses. We are working on adding this feature.
157157

158-
## Expanding the size of your WSL 2 Virtual Hardware Disk
158+
## Expanding the size of your WSL 2 Virtual Hard Disk
159159

160-
WSL 2 uses a Virtual Hardware Disk (VHD) to store your Linux files. If you reach its max size you may need to expand it.
160+
WSL 2 uses a Virtual Hard Disk (VHD) to store your Linux files. In WSL 2, a VHD is represented on your Windows hard drive as a *.vhdx* file.
161161

162-
The WSL 2 VHD uses the ext4 file system. This VHD automatically resizes to meet your storage needs and has an initial maximum size of 256GB. If your distribution grows in size to be greater than 256GB, you will see errors stating that you've run out of disk space. You can fix this error by expanding the VHD size.
162+
The WSL 2 VHD uses the ext4 file system. This VHD automatically resizes to meet your storage needs and has an initial maximum size of 256GB. If the storage space required by your Linux files exceeds this size you may need to expand it. If your distribution grows in size to be greater than 256GB, you will see errors stating that you've run out of disk space. You can fix this error by expanding the VHD size.
163163

164164
To expand your maximum VHD size beyond 256GB:
165165

@@ -174,18 +174,54 @@ To expand your maximum VHD size beyond 256GB:
174174

175175
4. Resize your WSL 2 VHD by completing the following commands:
176176
- Open Windows Command Prompt with admin privileges and enter:
177-
- `diskpart`
178-
- `Select vdisk file="<pathToVHD>"`
179-
- `expand vdisk maximum="<sizeInMegaBytes>"`
177+
178+
```powershell
179+
diskpart
180+
DISKPART> Select vdisk file="<pathToVHD>"
181+
DISKPART> detail vdisk
182+
```
183+
184+
- Examine the output of the **detail** command. The output will include a value for **Virtual size**. This is the current maximum. Convert this value to megabytes. The new value after resizing must be greater than this value. For example, if the **detail** output shows **Virtual size: 256 GB**, then you must specify a value greater than **256000**. Once you have your new size in megabytes, enter the following command in **diskpart**:
185+
186+
```powershell
187+
DISKPART> expand vdisk maximum=<sizeInMegaBytes>
188+
```
189+
190+
- Exit **diskpart**
191+
192+
```powershell
193+
DISKPART> exit
194+
```
180195
181196
5. Launch your WSL distribution (Ubuntu, for example).
182197
183-
6. Make WSL aware that it can expand its file system's size by running these commands from your Linux distribution command line:
184-
- `sudo mount -t devtmpfs none /dev`
185-
- `mount | grep ext4`
186-
- Copy the name of this entry, which will look like: `/dev/sdXX` (with the X representing any other character)
187-
- `sudo resize2fs /dev/sdXX`
188-
- Use the value you copied earlier. You may also need to install resize2fs: `apt install resize2fs`
198+
6. Make WSL aware that it can expand its file system's size by running these commands from your Linux distribution command line.
199+
200+
> [!NOTE]
201+
> You may see this message in response to the first **mount** command: **/dev: none already mounted on /dev**. This message can safely be ignored.
202+
203+
```powershell
204+
sudo mount -t devtmpfs none /dev
205+
mount | grep ext4
206+
```
207+
208+
Copy the name of this entry, which will look like: `/dev/sdX` (with the X representing any other character). In the following example the value of **X** is **b**:
209+
210+
```powershell
211+
sudo resize2fs /dev/sdb <sizeInMegabytes>M
212+
```
213+
214+
> [!NOTE]
215+
> You may need to install **resize2fs**. If so, you can use this command to install it: `sudo apt install resize2fs`.
216+
217+
The output will look similar to the following:
218+
219+
```bash
220+
resize2fs 1.44.1 (24-Mar-2018)
221+
Filesystem at /dev/sdb is mounted on /; on-line resizing required
222+
old_desc_blocks = 32, new_desc_blocks = 38
223+
The filesystem on /dev/sdb is now 78643200 (4k) blocks long.
224+
```
189225

190226
> [!NOTE]
191227
> In general do not modify, move, or access the WSL related files located inside of your AppData folder using Windows tools or editors. Doing so could cause your Linux distribution to become corrupted.

WSL/install-win10.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Open PowerShell as Administrator and run:
2323
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
2424
```
2525

26-
We recommend now moving on to step #2, updating to WSL 2, but if you wish to only install WSL 1, you can now restart your machine and move on to [Step 6 - Install your Linux distribution of choice](./install-win10.md#step-6---install-your-linux-distribution-of-choice). To update to WSL 2, wait to restart your machine and move on to the next step.
26+
We recommend now moving on to step #2, updating to WSL 2, but if you wish to only install WSL 1, you can now **restart** your machine and move on to [Step 6 - Install your Linux distribution of choice](./install-win10.md#step-6---install-your-linux-distribution-of-choice). To update to WSL 2, **wait to restart** your machine and move on to the next step.
2727

2828
## Step 2 - Update to WSL 2
2929

@@ -69,7 +69,7 @@ Once the installation is complete, move on to the next step - setting WSL 2 as y
6969
7070
## Step 5 - Set WSL 2 as your default version
7171

72-
Open PowerShell as Administrator and run this command to set WSL 2 as the default version when installing a new Linux distribution:
72+
Open PowerShell and run this command to set WSL 2 as the default version when installing a new Linux distribution:
7373

7474
```powershell
7575
wsl --set-default-version 2
@@ -155,7 +155,7 @@ Below are related errors and suggested fixes. Refer to the [WSL troubleshooting
155155

156156
- **Installation failed with error 0x80070003**
157157
- The Windows Subsystem for Linux only runs on your system drive (usually this is your `C:` drive). Make sure that distributions are stored on your system drive:
158-
- Open **Settings** -> **Storage** -> **More Storage Settings: Change where new content is saved**
158+
- Open **Settings** -> **System --> **Storage** -> **More Storage Settings: Change where new content is saved**
159159
![Picture of system settings to install apps on C: drive](media/AppStorage.png)
160160

161161
- **WslRegisterDistribution failed with error 0x8007019e**
@@ -193,4 +193,4 @@ Below are related errors and suggested fixes. Refer to the [WSL troubleshooting
193193
3. After you enabled WSL, a reboot is required for it to take effect, reboot your machine and try again.
194194

195195
- **Error: WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel .**
196-
- If the Linux kernel package is missing in the %SystemRoot%\system32\lxss\tools folder, you will encounter this error. Resolve it by installing the Linux kernel update MSI package in step #4 of these installation instructions. You may need to uninstall the MSI from ['Add or Remove Programs'](ms-settings:appsfeatures-app), and install it again.
196+
- If the Linux kernel package is missing in the %SystemRoot%\system32\lxss\tools folder, you will encounter this error. Resolve it by installing the Linux kernel update MSI package in step #4 of these installation instructions. You may need to uninstall the MSI from ['Add or Remove Programs'](ms-settings:appsfeatures-app), and install it again.

WSL/release-notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ ms.localizationpriority: high
1010

1111
# Release Notes for Windows Subsystem for Linux
1212

13+
## Build 20226
14+
For general Windows information on build 20226 visit the [Windows blog](https://blogs.windows.com/windows-insider/2020/09/10/announcing-windows-10-insider-preview-build-20226/).
15+
16+
* Fix crash in LxssManager service. [GH 5902]
17+
1318
## Build 20211
1419
For general Windows information on build 20211 visit the [Windows blog](https://blogs.windows.com/windows-insider/2020/09/10/announcing-windows-10-insider-preview-build-20211/).
1520

WSL/troubleshooting.md

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,21 @@ ms.localizationpriority: high
99

1010
# Troubleshooting Windows Subsystem for Linux
1111

12-
For support with issues related to WSL, please see our GitHub repo: https://github.com/Microsoft/wsl/issues
12+
For support with issues related to WSL, please see our [WSL product repo on GitHub](https://github.com/Microsoft/wsl/issues).
1313

1414
## Search for any existing issues related to your problem
1515

16-
For technical issues, use the product repo: https://github.com/Microsoft/wsl/issues
16+
For technical issues, use the [product repo](https://github.com/Microsoft/wsl/issues).
1717

18-
For issues related to the contents of this documentation, use the docs repo: https://github.com/MicrosoftDocs/wsl/issues
18+
For issues related to the contents of this documentation, use the [docs repo](https://github.com/MicrosoftDocs/wsl/issues).
1919

2020
## Submit a bug report
2121

2222
For bugs related to WSL functions or features, file an issue in the product repo: https://github.com/Microsoft/wsl/issues
2323

2424
## Submit a feature request
2525

26-
To request a new feature related to WSL functionality or compatibility, file an issue in the product repo:
27-
https://github.com/Microsoft/wsl/issues
26+
To request a new feature related to WSL functionality or compatibility, [file an issue in the product repo](https://github.com/Microsoft/wsl/issues).
2827

2928
## Contribute to the docs
3029

@@ -36,42 +35,46 @@ Lastly, if your issue is related to the Windows Terminal, Windows Console, or th
3635

3736
## Common issues
3837

39-
### I'm on Windows 10 version 1903 and I still do not see options for WSL 2.
38+
### I'm on Windows 10 version 1903 and I still do not see options for WSL 2
4039

41-
This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking 'Check for Updates' to install the latest updates on your system. You can view the full instructions on taking the backport [here](https://devblogs.microsoft.com/commandline/wsl-2-support-is-coming-to-windows-10-versions-1903-and-1909/#how-do-i-get-it).
40+
This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking 'Check for Updates' to install the latest updates on your system. See [the full instructions on taking the backport](https://devblogs.microsoft.com/commandline/wsl-2-support-is-coming-to-windows-10-versions-1903-and-1909/#how-do-i-get-it).
4241

43-
If you hit 'Check for Updates' and still do not receive the update you can install KB KB4566116 manually by [following this link](https://www.catalog.update.microsoft.com/Search.aspx?q=KB4566116).
42+
If you hit 'Check for Updates' and still do not receive the update you can [install KB KB4566116 manually](https://www.catalog.update.microsoft.com/Search.aspx?q=KB4566116).
4443

4544
### Error: 0x1bc when `wsl --set-default-version 2`
45+
4646
This may happen when 'Display Language' or 'System Locale' setting is not English.
47-
```
47+
48+
```powershell
4849
wsl --set-default-version 2
4950
Error: 0x1bc
5051
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
5152
```
5253

5354
THe actual error for `0x1bc` is:
54-
```
55+
56+
```powershell
5557
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
5658
```
5759

5860
For more information, please refer to issue [5749](https://github.com/microsoft/WSL/issues/5749)
5961

60-
6162
### Cannot access WSL files from Windows
63+
6264
A 9p protocol file server provides the service on the Linux side to allow Windows to access the Linux file system. If you cannot access WSL using `\\wsl$` on Windows, it could be because 9P did not start correctly.
6365

64-
To check this, you can check the start up logs using: `dmesg |grep 9p`, and this will show you any errors. A successfull output looks like the following:
66+
To check this, you can check the start up logs using: `dmesg |grep 9p`, and this will show you any errors. A successfull output looks like the following:
6567

66-
```
68+
```bash
6769
[ 0.363323] 9p: Installing v9fs 9p2000 file system support
6870
[ 0.363336] FS-Cache: Netfs '9p' registered for caching
6971
[ 0.398989] 9pnet: Installing 9P2000 support
7072
```
7173

7274
Please see [this Github thread](https://github.com/microsoft/wsl/issues/5307) for further discussion on this issue.
7375

74-
### Can't start WSL 2 distro and only see 'WSL 2' in output
76+
### Can't start WSL 2 distribution and only see 'WSL 2' in output
77+
7578
If your display language is not English, then it is possible you are seeing a truncated version of an error text.
7679

7780
```powershell
@@ -81,17 +84,49 @@ WSL 2
8184

8285
To resolve this issue, please visit `https://aka.ms/wsl2kernel` and install the kernel manually by following the directions on that doc page.
8386

84-
### Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
87+
### `command not found` when executing windows .exe in linux
8588

86-
1. Check the [Hyper-V system requirements](/windows-server/virtualization/hyper-v/system-requirements-for-hyper-v-on-windows#:~:text=on%20Windows%20Server.-,General%20requirements,the%20processor%20must%20have%20SLAT.)
87-
2. If your machine is a VM, please enable [nested virtualization](./wsl2-faq.md#can-i-run-wsl-2-in-a-virtual-machine) manually. Launch powershell with admin, and run:
89+
Users can run Windows executables like notepad.exe directly from Linux. Sometimes, you may hit "command not found" like below:
8890

89-
```powershell
90-
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
91+
```Bash
92+
$ notepad.exe
93+
-bash: notepad.exe: command not found
9194
```
9295

93-
3. Please follow guidelines from your PC's manufacturer on how to enable virtualization. In general, this can involve using the system BIOS to ensure that these features are enabled on your CPU.
94-
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
96+
If there are no win32 paths in your $PATH, interop isn't going to find the .exe.
97+
You can verify it by running `echo $PATH` in Linux. It's expected that you will see a win32 path (for example, /mnt/c/Windows) in the output.
98+
If you can't see any Windows paths then most likely your PATH is being overwritten by your Linux shell.
99+
100+
Here is a an example that /etc/profile on Debian contributed to the problem:
101+
102+
```Bash
103+
if [ "`id -u`" -eq 0 ]; then
104+
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
105+
else
106+
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
107+
fi
108+
```
109+
110+
The correct way on Debian is to remove above lines.
111+
You may also append $PATH during the assignment like below, but this lead to some [other problems](https://salsa.debian.org/debian/WSL/-/commit/7611edba482fd0b3f67143aa0fc1e2cc1d4100a6) with WSL and VSCode..
112+
113+
For more information, see issue [5296](https://github.com/microsoft/WSL/issues/5296) and issue [5779](https://github.com/microsoft/WSL/issues/5779).
114+
115+
### Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS
116+
117+
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
118+
119+
1. Check the [Hyper-V system requirements](/windows-server/virtualization/hyper-v/system-requirements-for-hyper-v-on-windows#:~:text=on%20Windows%20Server.-,General%20requirements,the%20processor%20must%20have%20SLAT.)
120+
121+
2. If your machine is a VM, please enable [nested virtualization](./wsl2-faq.md#can-i-run-wsl-2-in-a-virtual-machine) manually. Launch powershell with admin, and run:
122+
123+
```powershell
124+
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
125+
```
126+
127+
3. Please follow guidelines from your PC's manufacturer on how to enable virtualization. In general, this can involve using the system BIOS to ensure that these features are enabled on your CPU. Instructions for this process can vary from machine to machine, please see [this article](https://www.bleepingcomputer.com/tutorials/how-to-enable-cpu-virtualization-in-your-computer-bios/) from Bleeping Computer for an example.
128+
129+
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
95130
96131
### Bash loses network connectivity once connected to a VPN
97132
@@ -309,7 +344,7 @@ This error is related to being in a bad install state. Please complete the follo
309344

310345
If you're seeing this error:
311346

312-
```
347+
```bash
313348
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
314349
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
315350
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -318,10 +353,10 @@ Permissions 0777 for '/home/artur/.ssh/private-key.pem' are too open.
318353

319354
To fix this, append the following to the the ```/etc/wsl.conf``` file:
320355

321-
```
356+
```bash
322357
[automount]
323358
enabled = true
324359
options = metadata,uid=1000,gid=1000,umask=0022
325360
```
326361

327-
Please note that adding this command will include metadata and modify the file permissions on the Windows files seen from WSL. Please see the [File System Permissions](./file-permissions.md) for more information.
362+
Please note that adding this command will include metadata and modify the file permissions on the Windows files seen from WSL. Please see the [File System Permissions](./file-permissions.md) for more information.

0 commit comments

Comments
 (0)