1

I accidentally deregistered the legacy wsl1 install at %APPDATA%\local\lxss (back at the time when wsl was called bash on Ubuntu on Windows and there could be only 1 rootfs which had to be installed by bash.exe).
Fortunately for the important data, the file system was untouched.

So I installed a new wsl1 using the modern method in the hope I could recover the data by moving the lxss directory into the relevant %APPDATA%\LocalPackage. But unfortunately, %APPDATA%\local\lxss is using a different mapping nearer Interix where symlinks target are stored inside file data instead of extended attributes in newer wsl1 installs also supported by ntfs-3g.

So the best option looks like to convert the relevant extended attributes to their newer equivalents but I have no ideas on how to access them on Windows and the various methods listed under Linux returns nothing through ntfs-3g including on unrelated Windows system files which normally contains some of them.

Or as an alternative, what registry keys I should use in order to reregister the legacy install again?

user2284570
  • 1,799
  • 7
  • 35
  • 62
  • 2
    Beware that NTFS has _two_ kinds of "extended attributes": OS/2-like EAs and MacOS-like Alternate Data Streams (ADS). Linux xattrs via ntfs-3g are actually mapped to alternate streams (even though xattrs are more like EAs than streams) because almost nothing uses EAs, but... the way that Microsoft doc page is written, I actually can't tell which ones it's referring to: it could be a stream name but it _could_ also be an EA name. – u1686_grawity Apr 24 '22 at 12:31
  • 1
    Could you get a dump of the file information using `ntfsinfo` on the raw block device (not through a mounted filesystem)? It would show a list of all streams and other details. Windows `fsutil file layout` might also work. – u1686_grawity Apr 24 '22 at 12:33
  • @user1686 I m intersted in the undocumented attributes used by wsl1 at the beginning. And second, yes I can use `ntfsinfo` but there are 500Gib of other data with 20,000,000 files on the same drive partition. – user2284570 Apr 24 '22 at 13:59
  • @user1686 according to ntfs-3g those attributes are stored as ea names. – user2284570 Apr 24 '22 at 14:04
  • Point `ntfsinfo` at the specific path of the one file you want to see, the other 20,000,000 files are irrelevant, and please copy the output into your post. – u1686_grawity Apr 24 '22 at 14:14
  • @user1686 Ok, in older versions, they put everything into a single long hex value stored into `$LXATTRB` ea. I ve no idea on to parse it because of the lack of official documentation on the format. – user2284570 Apr 24 '22 at 21:29

0 Answers0