DDoSolitary / LxRunOffline

A full-featured utility for managing Windows Subsystem for Linux (WSL)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during installation "The system cannot find the path"

g2proko opened this issue · comments

  • OS Versions

    10.0.19042 Build 19042

  • LxRunoffline Versions

    v3.5.0

  • Repro Steps

    1. 从 Microsoft Store 安装 “Ubuntu 20.04 LTS” 应用

    2. 使用 LxRunOffline 对该应用进行打包为 Ubuntu-20.04.tar.gz 文件

      F:\wsl\image> LxRunOffline.exe e -n Ubuntu-20.04 -f  .\Ubuntu-20.04.tar.gz
      
    3. 通过打包的文件重新创建新的WSL1实例,但在创建的过程中抛出:

      F:\wsl\image> LxRunOffline.exe i -n ub2004 -d ..\instance\ub2004 -f .\Ubuntu-20.04.tar.gz
      

      抛出如下异常:

        Couldn't create the file "\\?\F:\wsl\instance\ub2004\rootfs\usr\lib\systemd\system\system\systemd\x2dcryptsetup.slice".
        Reason: 系统找不到指定的路径。
      
  • Expected Behavior
    正常情况下应该能够创建出 WSL 实例。

  • In Addition

    1. 通过解压打包的 Ubuntu-20.04.tar.gz 文件与正常运行的 Ubuntu-20.04 实例的操作系统文件进行比较:
      image
      从上图可以看到,打包的 “Ubuntu-20.04.tar.gz“ 缺失了 system-systemd\x2dcryptsetup.slice 该文件

      应该是文件名中的 \ 字符被 Windows 当作目录来处理了

    2. 通过压缩软件查看 ”Ubuntu-20.04.tar.gz“ 打包文件,可以验证到上述现象,如下图:
      image
      image
    3. 图中的红框目录和文件在 Windows 操作系统解压时被认为是异常,从而抛错;而在 Linux 操作系统中解压,该 system-systemd 目录并不会被创建,也不会抛异常。
      image
    4. 临时解决方法是(也是为了保证系统文件完整性):手动拷贝到 rootfs 中,并且重新手动打包为 ”Ubuntu-20.04.tar.gz“,进一步的使用 LxRunOffline 运行创建实例的操作,则能够创建成功,如下图:
      image

#142
应该是修好了,但是还没发新版,请试一下开发版,链接在 readme 里有

commented

我也遇到了相同的问题,想问一下,我也是手动拷贝的也是不行,我的wsl中有这个文件的,但是在export出来的tar.gz文件中没有这个文件

commented

image
z这个是我wsl的文件夹,但是也没有这个文件。
image
我在wsl中可以查看到这个文件

commented

image
找到了这个

commented

image