I initially had problems uninstalling a failed install and removing the lxss folder. After I successfully cleaned up the installation, I began my trials to reinstall, but the earlier problem with installing popped up. The process gets stuck Extracting Filesystem... as reported here.
After days of trial and error, I seem to have found the reason for this agony. In my case (and as reported by many others here) it is the antivirus being the spoilsport. Disabling antivirus and restarting seem to do it for me.
As silly as it sounds, Antivirus was the main cause for the pain and
Now for those who still have this error, this is should help if you try doing the following things in order:
- Disable Antivirus permanently & Restart (You can enable it after the installation is complete)
- Open Command Prompt or Windows PowerShell as admin
- Uninstall WSL by running the following command
lxrun /uninstall /full
- Now stop WSL service -
sc stop lxssmanager
- Remove App data folders -
rmdir /S %LOCALAPPDATA%\lxss. Confirm the folders have been deleted. You might need to change the ownership to delete the folder if you get any access-denied errors.
- Once the folders are deleted, try installing WSL again by running
lxrun /install /y
- Wait until it downloads from the Windows Store and Extracts the files. (You can check
%LOCALAPPDATA%\lxss\rootfs to see if the files have been extracted).
- Hopefully you shouldn't get a
Error: 0x80080005 this time.
- Enjoy Bash on Windows!
EDIT : Another reason for the error is identified as a bug when you have multiple swap files. This will be fixed in the future, but for now, remove other swap files and keep only one swapfile. This should fix it.
More details for those interested:
"Because of your trace file I have identified a bug in the installation code that is calculating the swap file size. This function is used by both the sysinfo system call and generating the contents of /proc/meminfo. This problem will happen when you have multiple pagefiles on your machine. There are three different outcomes that can happen as a result of this bug:
The swapfile size will be reported incorrectly
Our driver will dereference an invalid memory address and cause a bluescreen
The machine will enter an infinite loop when calculating the swap file size (this is the one you are seeing)
As a temporary workaround if you remove all but one of your pagefiles you should be able to use WSL. I am coding up a fix for this right now."
Reference: Bash on Ubuntu on Windows
%localappdata%\lxssthen delete it. You can then use
lxrun /installto install
Ubuntu on Windowsagain. This assumes you have developer mode enabled and have already added the (Windows Linux Subsystem) Windows Feature.