Ant*_*y_B 13 mount ubuntu dmesg wsl2 windows-11
该问题是在 Windows 10 迁移到 Windows 11 后出现的。之前我对 Ubuntu / Docker 或 Virtual Box 镜像没有任何问题。
Windows 版本:
Windows 11 版本 21H2(操作系统内部版本 22000.258)
实际行为:
Wsl-2 无法正确安装 Windows C 驱动器。
诊断日志:
我之前尝试取消选中 Windows 中的以下功能:
我重新启动以更新我的电脑。我通过 Windows PowerShell 命令安装了 wsl 功能和 Ubuntu 发行版:
PS C:\WINDOWS\system32> wsl --install -d Ubuntu
Installing: Virtual Machine Platform
Virtual Machine Platform has been installed.
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
Downloading: WSL Kernel
Installing: WSL Kernel
WSL Kernel has been installed.
Downloading: GUI App Support
Installing: GUI App Support
GUI App Support has been installed.
Downloading: Ubuntu
The requested operation is successful. Changes will not be effective until the system is rebooted.
PS C:\WINDOWS\system32>
Run Code Online (Sandbox Code Playgroud)
重启后,Ubuntu的安装自动继续:
Installing, this may take a few minutes...
An error occurred mounting one of your file systems. Please run 'dmesg' for more details.
An error occurred mounting one of your file systems. Please run 'dmesg' for more details.
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:
...
Run Code Online (Sandbox Code Playgroud)
从 dmesg 命令中提取的警报/错误消息的摘录:
[ 0.144506] Spectre V2 : Spectre mitigation: LFENCE not serializing, switching to generic retpoline
...
[ 2.415856] PCI: Fatal: No config space access function found
...
[ 2.482199] hv_utils: cannot register PTP clock: 0
...
[ 2.727920] FS-Cache: Duplicate cookie detected
[ 2.727922] FS-Cache: O-cookie c=00000000cb6e3e64 [p=00000000409df2b5 fl=222 nc=0 na=1]
[ 2.727922] FS-Cache: O-cookie d=000000006c7c1c35 n=00000000f766632e
[ 2.727923] FS-Cache: O-key=[10] '34323934393337353534'
[ 2.727925] FS-Cache: N-cookie c=00000000230327ad [p=00000000409df2b5 fl=2 nc=0 na=1]
[ 2.727925] FS-Cache: N-cookie d=000000006c7c1c35 n=0000000090d5ba24
[ 2.727925] FS-Cache: N-key=[10] '34323934393337353534'
[ 2.866581] 9pnet: Could not find request transport: virtio
[ 2.866586] init: (1) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/c (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=0;gid=0;symlinkroot=/mnt/
[ 2.866587] ) failed: 22
[ 2.925884] 9pnet: Could not find request transport: virtio
[ 2.925889] init: (1) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/c (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=0;gid=0;symlinkroot=/mnt/
[ 2.925890] ) failed: 22
Run Code Online (Sandbox Code Playgroud)
我还尝试通过命令行更新并重新启动 wsl 服务:
wsl --update
wsl --shutdown
Run Code Online (Sandbox Code Playgroud)
(内核版本:5.10.60.1)
我还尝试通过命令重新启动 LxssManager 服务:
Restart-Service -Name "LxssManager"
Run Code Online (Sandbox Code Playgroud)
我的 Ubuntu 发行版 (/etc/wsl.conf) 中没有 wsl.conf 文件 我的 .wslconfig 文件包含以下几行:
[wsl2]
kernel=C:\\Users\\Anthony\\bzImage
swap=0
localhostForwarding=true
Run Code Online (Sandbox Code Playgroud)
当我尝试直接在shell中挂载C盘时,我遇到了同样的问题
anthony@DESKTOP-3QEBOGJ:~$ sudo mount -t drvfs C: /mnt/c
[sudo] password for anthony:
<3>init: (32) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/c (cache=mmap,rw,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: 22
mount: Invalid argument
Run Code Online (Sandbox Code Playgroud)
我使用 Ubuntu,但问题与 docker 相同,返回错误或在 Oracle Virtual Box 中加载映像。
wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
Ubuntu
Run Code Online (Sandbox Code Playgroud)
我尝试的所有操作都没有解决我的问题。由于我的驱动器最初是使用 Bitlocker 服务加密的,因此我尝试推迟加密。这并没有改变问题。
有人有解决这个问题的想法吗?
预先感谢您。
Rob*_*ick 14
我通过列出发行版并选择 Ubuntu 发行版(在我的例子中称为 Ubuntu)来摆脱它。
wsl -l -v
wsl --set-default Ubuntu
Run Code Online (Sandbox Code Playgroud)
该问题是在 Windows 10 迁移到 Windows 11 后出现的。之前我对 Ubuntu / Docker 或 Virtual Box 镜像没有任何问题。
Run Code Online (Sandbox Code Playgroud)Installing, this may take a few minutes... An error occurred mounting one of your file systems. Please run 'dmesg' for more details. An error occurred mounting one of your file systems. Please run 'dmesg' for more details.
WSL 内核的路径不正确。它应该位于C:\WINDOWS\System32\lxss\tools\kernel
来源:安装您的文件系统之一时发生错误。请运行“dmesg”以获取更多详细信息。第5456章
| 归档时间: |
|
| 查看次数: |
30884 次 |
| 最近记录: |