Everything was working just a day before but today my windows subsystem for linux is unable to open. When run by itself or in safe mode, it will open for just a second and then crash. Using the cmd or powershell, also unable to open as a root user and results in the
Class not registered Error code: Wsl/0x80040154
I tried a lot of things including restarts, wsl --update and sfc /scannow.
sfc did find corrupt files and repaired but not sure if that was directly related to the wsl, and it is still unable to open.
Other solutions I'm finding online basically say to delete everything and reinstall but that also would move all the data.
Is there any way to do this without loosing data?
For anyone else facing this error in future:
I finally was able to solve this with
wsl --update --pre-releaseso even though wsl --update wasn't working the pre-release had a version that did.