LxRunOffline.exe 迁移wsl到D盘时报错的解决办法
当使用LxRunOffline.exe想把wsl子系统从c盘移到d盘时,遇到两个报错,如下是解决方法。迁移方法参考:Win10系统安装Ubuntu子系统 - 希望先生 - 博客园报错1:“Couldn't get the value "DistributionName" of the registry key "Software\Microsoft\Windows\CurrentVersion\L
当使用LxRunOffline.exe想把wsl子系统从c盘移到d盘时,遇到两个报错,如下是解决方法。
迁移方法参考:Win10系统安装Ubuntu子系统 - 希望先生 - 博客园
报错1:“Couldn't get the value "DistributionName" of the registry key "Software\Microsoft\Windows\CurrentVersion\Lxss\AppxInstallerCache”
解决方法:
1. win+R 输入regedit
2. 打开:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\
3. 然后右键删除AppxInstallerCache文件夹
报错2:Couldn't set the case sensitive attribute of the directory "\\?\C:\Users\xxx\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\".
Reason: Indicates that the directory trying to be deleted is not empty.
出现这个错误时使用的是官方最新版的“LxRunOffline-v3.5.0-msvc.zip”,官方LxRunOffline下载地址:https://github.com/DDoSolitary/LxRunOffline/releases
按报错搜到这篇文章
迁移WSL时的报错:0x80073d21 此应用的发布者不允许将其移动到其他位置_AYO_YO的博客-CSDN博客
按提示说出现此错误时,需要另外下一个LxRunOffline版本:https://ddosolitary-builds.sourceforge.io/LxRunOffline/LxRunOffline-v3.5.0-11-gfdab71a-msvc.zip
上面网址报错的话,在CSDN下载:https://download.csdn.net/download/miaoye520/87076953
再按之前的步骤:
查看安装的Linux版本: .\LxRunOffline.exe list 迁移: .\LxRunOffline.exe move -n Ubuntu -d D:\Ubuntu 查看迁移后的子系统安装目录: .\LxRunOffline.exe get-dir -n Ubuntu-18.04
至此,再无任何报错,并成功迁移。
再看D盘,多出一个7G多的虚拟镜像,说明迁移成功了。
迁移完成后,打开ubuntu又报错了,
报错3:拒绝访问
1. 因此还需要给迁移后的目录授权:
icacls D:\Ubuntu /grant “用户名:(OI)(CI)(F)”
上面用户名替换成自己windows的默认用户名
2. 通过任务管理器,或计算机管理>服务,右键重启LxssManager服务
之后wsl下的Ubuntu就可以正常运行了。
更多推荐
所有评论(0)