Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Filesystem version 0 is not recognized. #81

Closed
miberecz opened this issue Feb 21, 2019 · 19 comments
Closed

[ERROR] Filesystem version 0 is not recognized. #81

miberecz opened this issue Feb 21, 2019 · 19 comments

Comments

@miberecz
Copy link

E:\LxRunOffline-v3.3.3>LxRunOffline move -n Legacy -d "D:\WSL"
[ERROR] Filesystem version 0 is not recognized.

How to solve?

@DDoSolitary
Copy link
Owner

Is it a legacy distro installed by lxrun/bash?

@miberecz
Copy link
Author

Yes, it was installed by lxrun /install

DDoSolitary added a commit that referenced this issue Feb 22, 2019
@DDoSolitary
Copy link
Owner

Please try the latest dev build mentioned in readme to verify if it's been fixed.

@miberecz
Copy link
Author

miberecz commented Feb 22, 2019

E:\LxRunOffline-v3.3.3-4-gf750ada>LxRunOffline move -n Legacy -d "D:\WSL"

Okay, now it ran, gave some warnings like this:
[WARNING] Ignoring an unsupported file "\\?\C:\Users\MYUSER\AppData\Local\lxss\rootfs\dev\tty4" of type 0020000
Finished without error,
but

`E:\LxRunOffline-v3.3.3-4-gf750ada>bash.exe
Performing one-time upgrade of the Windows Subsystem for Linux file system for this distribution...
Error: 0x80070005
Press any key to continue...

E:\LxRunOffline-v3.3.3-4-gf750ada>`

Now bash.exe fails to run.

(If its a big hassle to fix it, then I can install other package, like the one from the MS Store. Probably its works with that)

@miberecz
Copy link
Author

miberecz commented Feb 22, 2019

In the meantime, I figured, that most of the files were not moved from the Appdatalocal

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 22, 2019

If there are files inside rootfs not moved, it's most likely that the program crashed during the moving operation. Unfortunately, Microsoft has removed lxrun.exe from the latest insider preview build I'm using now, so I'll have to set up a VM to try to reproduce your issue, which might take quite some time. Thus if you don't want to wait, you can use the store apps as you said, or install using the images whose download links are available in the wiki. BTW, lxrun.exe has been deprecated by Microsoft so I don't recommend using it without some particularly reason.

And could you please provide some more information, which will be helpful for me the reproduce and fix this issue:

  • Your Windows version
  • Is the distro you're moving a clean one or you have used it for some time? If not, does it work if you move a clean one?
  • What happens if you try to move a distro installed by a store app to the desired location
  • What happens if you use the duplicate command, which copies the distro, instead of move

Thanks!

@miberecz
Copy link
Author

miberecz commented Feb 22, 2019

  • Your Windows version
    W10 Pro 1803 build 17134.590

  • Is the distro you're moving a clean one or you have used it for some time? If not, does it work if you move a clean one?
    New-ish. Just installed, and set up graphic support

  • What happens if you try to move a distro installed by a store app to the desired location
    Ubuntu1804 moved like a charm

  • What happens if you use the duplicate command, which copies the distro, instead of move
    same

Now I'm out of the wood with ubuntu1804, so no hurry from my side.
But I can help to debug this if you want. Is there a point to do so, if lxrun will be removed soon?
I just found some old guide on google how to setup WSL with graphic apps, and followed that, that's how I end up here.

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 24, 2019

I just successfully reproduced this in a VM. I found out that there's a bug that the source directory isn't deleted after moving, so the files left in LOCALAPPDATA are irrelevant to this issue and can be safely delete manually. The 0x80070005 error is likely to be caused by the fact that the program actually produces filesystem v1 but the Version registry key is still 0.

@DDoSolitary
Copy link
Owner

I think it makes sense to support lxrun.exe. Although the executable has been removed since v1809, it is still present in v1803, which is stated to be supported in readme. Also it's possible that a distro created by lxrun.exe exists on a supported system which is upgraded from v1803 or even earlier.

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 24, 2019

Root caused found: v0 and v1 filesystem has different directory layouts. v1 puts everything under rootfs but v0 has other special directories like home and root placed outside of rootfs. So LxRunOffline doesn't set a required case sensitivity flag on these special folders (in fact, it doesn't even create them). When launching the distro, WSL detects this and tries to fix this: Performing one-time upgrade of the Windows Subsystem for Linux file system for this distribution..., but this operation requires a special permission which isn't granted by default on an external disk (#42) and LxRunOffline doesn't grant it as well for the same reason, so we get 0x80070005 (Access denied).

My plan is:

  • Implement a new reader for v0 filesystems, which transparently maps the special directories to rootfs for writers to use.
  • Automatically change Version from 0 to 1 after move/duplicate.

This will also fix the known bug that the contents of the home directory will be lost after manipulating on Legacy distros.

Althogh it is possible to implement a writer for v0 filesystems and leave Version to be 0, which actually obeys the semantics of "move" and "duplicate", it makes much less sense to support writing than reading for something that has been deprecated.

@mqmq0 Could you please help test it when I get the updates ready?

@miberecz
Copy link
Author

Yeah, sure. I just installed a fresh Legacy distro.
I wont update my W10 for a while, so I can help.

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 25, 2019

@mqmq0 Could you please post the names of the directories under %localappdata%\lxss so that I can determine the exact list of the directories that needs to be mapped into rootfs. (I can't access my v1803 VM in several days.)

I just figured out that it's much easier to implement this by copying the whole installation directory instead of just rootfs so this information is no longer needed 😅

@miberecz
Copy link
Author

Ok, read your edit later then generating this, so here you go nevertheless:

https://pastebin.com/AvuF5EGH

Expires in a day.

@742362144
Copy link

E:\LxRunOffline-v3.3.3-4-gf750ada>LxRunOffline move -n Legacy -d "D:\WSL"

Okay, now it ran, gave some warnings like this:
[WARNING] Ignoring an unsupported file "\\?\C:\Users\MYUSER\AppData\Local\lxss\rootfs\dev\tty4" of type 0020000
Finished without error,
but

`E:\LxRunOffline-v3.3.3-4-gf750ada>bash.exe
Performing one-time upgrade of the Windows Subsystem for Linux file system for this distribution...
Error: 0x80070005
Press any key to continue...

E:\LxRunOffline-v3.3.3-4-gf750ada>`

Now bash.exe fails to run.

(If its a big hassle to fix it, then I can install other package, like the one from the MS Store. Probably its works with that)

i have the same problem as u

@742362144
Copy link

E:\LxRunOffline-v3.3.3-4-gf750ada>LxRunOffline move -n Legacy -d "D:\WSL"

好吧,现在它跑了,给出了一些这样的警告:
[WARNING] Ignoring an unsupported file "\\?\C:\Users\MYUSER\AppData\Local\lxss\rootfs\dev\tty4" of type 0020000
完成没有错误,
但是

`E:\LxRunOffline-v3.3.3-4-gf750ada>bash.exe
Performing one-time upgrade of the Windows Subsystem for Linux file system for this distribution...
Error: 0x80070005
Press any key to continue...

E:\LxRunOffline-v3.3.3-4-gf750ada>`

现在bash.exe无法运行。

(如果解决这个问题很麻烦,那么我可以安装其他软件包,比如MS Store中的软件包。可能是它的工作原理)

i solve this problem. i just installed my ubuntu but not start and init it. i guess this tool cant't find the rootfs path if u do not init the system.

  1. start ubuntu in app store
  2. init the system (like set your username and pwd).then exit
  3. rerty the lxrunoffline move command
    everything is ok. :)

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 28, 2019

The fix is almost ready
It may take a few more days because I want to refactor the code for path processing but I have got too many things to deal with at school.

@742362144 No, even if you have initialized the legacy instance, the move operation won't work either. The real problem, as I have said in previous comments, is its inability to deal with the different directory layout of the legacy filesystem. The store apps use a newer version of filesystem so the tool just works well.

@hermanocabral
Copy link

any news on this issue?

@DDoSolitary
Copy link
Owner

DDoSolitary commented Apr 12, 2019

I'm sorry but it's only two months before the college entrance exam in China so I'm extremely busy and have little time for this. I'm still working on it but I can't give any ETA.

@DDoSolitary
Copy link
Owner

DDoSolitary commented Jun 22, 2019

The bug should have been fixed. 🎉
Please try the latest dev release and let me know if you encounter any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants