3

I have had the Windows Subsystem for Linux installed for a long time. Today, after a clean boot of my Windows 10, it fails to start, with the regular error message:

Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...

In my %LOCALAPPDATA%\lxss, I see that WSL is still completely there. Can I somehow still start this? If not, if I perform a new installation, can I mount the old directories somehow in such a way that not just all data, but also all permissions etc. are visible, and move them to a new installation?

I shouldn't need to spell this out, but when WSL doesn't work, any back-up utility that has to be run from WSL also won't work.

I'm hesitant to just try lxrun /install for fear that it will nuke all of my data.


For no reason that I can tell, it started working again. I'd still like to know what happened and what fixed it, so that I know what to do if this happens again in the future.

hvd
  • 358

2 Answers2

0

I understand that you have the root folder of your distribution, but you cannot run it using bash or wsl. I think you may try to register again your old installation folder using lxRunOffline


Registering an existing installation

# lxrunoffline register -n <distro name> -d <basepath>
C:> lxrunoffline register -n copy -d %LOCALAPPDATA%\Packages\...\LocalState

I think that the BasePath is the parent of your rootfs folder. For instance, if the root folder is

%LOCALAPPDATA%\Packages\...\LocalState\rootfs

The base path must be

%LOCALAPPDATA%\Packages\...\LocalState
Jaime
  • 2,259
0

I had an Ubuntu instance, and the path where I could recover my data was:

C:\Users\[username]\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_[someID]\LocalState\rootfs