microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.5k stars 822 forks source link

after wsl --update, can't mount C: windows drives in WSL2 #11812

Open cusco opened 4 months ago

cusco commented 4 months ago

Windows Version

Microsoft Windows [Version 10.0.19045.4529]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

Linux version 5.15.153.1-microsoft-standard-WSL2 (root@941d701f84f1) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Fri Mar 29 23:14:13 UTC 2024

Distro Version

Debian

Other Software

No response

Repro Steps

opening a shell provides

`<3>WSL (226) ERROR: CreateProcessParseCommon:711: Failed to translate C:\Users\Tiago

<3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\WINDOWS\system32 <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\WINDOWS <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\WINDOWS\System32\Wbem <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\WINDOWS\System32\WindowsPowerShell\v1.0\ <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\WINDOWS\System32\OpenSSH\ <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\ProgramData\chocolatey\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\ <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\dotnet\ <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files (x86)\dotnet\ <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Microsoft VS Code\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Portugal Identity Card\ <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\Tiago\AppData\Local\Microsoft\WindowsApps <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.5\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\JetBrains\PyCharm 2019.2.5\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\Tiago\OneDrive\Documents\WindowsPowerShell\Scripts <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\Tiago\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\Tiago\AppData\Local\GitHubDesktop\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\Tiago\AppData\Local\Programs\Lens\resources\cli\bin <3>WSL (226) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\Tiago\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build\bin Processing fstab with mount -a failed. Failed to mount C:\, see dmesg for more details. Failed to mount P:\, see dmesg for more details.` trying to mount provides an error: `root@DESKTOP-FFKGGLD:/home/cusco# mount -t drvfs P: /mnt/ <3>WSL (346) ERROR: UtilCreateProcessAndWait:665: /bin/mount failed with 2 <3>WSL (345) ERROR: UtilCreateProcessAndWait:687: /bin/mount failed with status 0xff00 root@DESKTOP-FFKGGLD:/home/cusco# mount -t drvfs C: /mnt/c <3>WSL (349) ERROR: UtilCreateProcessAndWait:665: /bin/mount failed with 2 <3>WSL (348) ERROR: UtilCreateProcessAndWait:687: /bin/mount failed with status 0xff00` ### Expected Behavior normal mounted drives, no errors translating paths from windows ### Actual Behavior dmesg contains `[Fri Jul 19 13:47:08 2024] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [Fri Jul 19 13:47:08 2024] sd 0:0:0:0: Attached scsi generic sg0 type 0 [Fri Jul 19 13:47:08 2024] sd 0:0:0:0: [sda] 795856 512-byte logical blocks: (407 MB/389 MiB) [Fri Jul 19 13:47:08 2024] sd 0:0:0:0: [sda] Write Protect is on [Fri Jul 19 13:47:08 2024] sd 0:0:0:0: [sda] Mode Sense: 0f 00 80 00 [Fri Jul 19 13:47:08 2024] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [Fri Jul 19 13:47:08 2024] sd 0:0:0:0: [sda] Attached SCSI disk [Fri Jul 19 13:47:08 2024] EXT4-fs (sda): mounted filesystem without journal. Opts: (null). Quota mode: none. [Fri Jul 19 13:47:08 2024] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [Fri Jul 19 13:47:08 2024] hv_pci 6e11ff5c-e492-4c64-bb40-0c3fb213662d: PCI VMBus probing: Using version 0x10003 [Fri Jul 19 13:47:08 2024] hv_pci 6e11ff5c-e492-4c64-bb40-0c3fb213662d: PCI host bridge to bus e492:00 [Fri Jul 19 13:47:08 2024] pci_bus e492:00: root bus resource [mem 0xc00000000-0xe00001fff window] [Fri Jul 19 13:47:08 2024] pci_bus e492:00: No busn resource found for root bus, will use [bus 00-ff] [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: [1af4:105a] type 00 class 0x088000 [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: reg 0x10: [mem 0xe00000000-0xe00000fff 64bit] [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: reg 0x18: [mem 0xe00001000-0xe00001fff 64bit] [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: reg 0x20: [mem 0xc00000000-0xdffffffff 64bit] [Fri Jul 19 13:47:08 2024] pci_bus e492:00: busn_res: [bus 00-ff] end is updated to 00 [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: BAR 4: assigned [mem 0xc00000000-0xdffffffff 64bit] [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: BAR 0: assigned [mem 0xe00000000-0xe00000fff 64bit] [Fri Jul 19 13:47:08 2024] pci e492:00:00.0: BAR 2: assigned [mem 0xe00001000-0xe00001fff 64bit] [Fri Jul 19 13:47:08 2024] virtiofs virtio1: Cache len: 0x200000000 @ 0xc00000000 [Fri Jul 19 13:47:08 2024] memmap_init_zone_device initialised 2097152 pages in 20ms [Fri Jul 19 13:47:08 2024] FS-Cache: Duplicate cookie detected [Fri Jul 19 13:47:08 2024] FS-Cache: O-cookie c=00000004 [p=00000002 fl=222 nc=0 na=1] [Fri Jul 19 13:47:08 2024] FS-Cache: O-cookie d=00000000358687d2{9P.session} n=00000000dd256b37 [Fri Jul 19 13:47:08 2024] FS-Cache: O-key=[10] '34323934393337333534' [Fri Jul 19 13:47:08 2024] FS-Cache: N-cookie c=00000005 [p=00000002 fl=2 nc=0 na=1] [Fri Jul 19 13:47:08 2024] FS-Cache: N-cookie d=00000000358687d2{9P.session} n=000000005aab0707 [Fri Jul 19 13:47:08 2024] FS-Cache: N-key=[10] '34323934393337333534' [Fri Jul 19 13:47:08 2024] FS-Cache: Duplicate cookie detected [Fri Jul 19 13:47:08 2024] FS-Cache: O-cookie c=00000006 [p=00000002 fl=222 nc=0 na=1] [Fri Jul 19 13:47:08 2024] FS-Cache: O-cookie d=00000000358687d2{9P.session} n=00000000ad00d342 [Fri Jul 19 13:47:08 2024] FS-Cache: O-key=[10] '34323934393337333535' [Fri Jul 19 13:47:08 2024] FS-Cache: N-cookie c=00000007 [p=00000002 fl=2 nc=0 na=1] [Fri Jul 19 13:47:08 2024] FS-Cache: N-cookie d=00000000358687d2{9P.session} n=000000006a8354bd [Fri Jul 19 13:47:08 2024] FS-Cache: N-key=[10] '34323934393337333535' [Fri Jul 19 13:47:08 2024] scsi 0:0:0:1: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: Attached scsi generic sg1 type 0 [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: [sdb] 536870912 512-byte logical blocks: (275 GB/256 GiB) [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: [sdb] 4096-byte physical blocks [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: [sdb] Write Protect is off [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: [sdb] Mode Sense: 0f 00 00 00 [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [Fri Jul 19 13:47:08 2024] sd 0:0:0:1: [sdb] Attached SCSI disk [Fri Jul 19 13:47:08 2024] EXT4-fs (sdb): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered. Quota mode: none. [Fri Jul 19 13:47:08 2024] FS-Cache: Duplicate cookie detected [Fri Jul 19 13:47:08 2024] FS-Cache: O-cookie c=0000000b [p=00000002 fl=222 nc=0 na=1] [Fri Jul 19 13:47:08 2024] FS-Cache: O-cookie d=00000000358687d2{9P.session} n=00000000b29d1f54 [Fri Jul 19 13:47:08 2024] FS-Cache: O-key=[10] '34323934393337343031' [Fri Jul 19 13:47:08 2024] FS-Cache: N-cookie c=0000000c [p=00000002 fl=2 nc=0 na=1] [Fri Jul 19 13:47:08 2024] FS-Cache: N-cookie d=00000000358687d2{9P.session} n=000000002d8a6634 [Fri Jul 19 13:47:08 2024] FS-Cache: N-key=[10] '34323934393337343031' [Fri Jul 19 13:47:08 2024] WSL (2) ERROR: UtilCreateProcessAndWait:665: /bin/mount failed with 2 [Fri Jul 19 13:47:08 2024] WSL (1) ERROR: UtilCreateProcessAndWait:687: /bin/mount failed with status 0xff00 [Fri Jul 19 13:47:08 2024] WSL (1) ERROR: ConfigMountFsTab:2589: Processing fstab with mount -a failed. [Fri Jul 19 13:47:08 2024] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e206d05276, max_idle_ns: 440795217445 ns [Fri Jul 19 13:47:08 2024] clocksource: Switched to clocksource tsc [Fri Jul 19 13:47:09 2024] WSL (1) WARNING: /etc/resolv.conf updating disabled in /etc/wsl.conf [Fri Jul 19 13:47:09 2024] WSL (4) ERROR: UtilCreateProcessAndWait:665: /bin/mount failed with 2 [Fri Jul 19 13:47:09 2024] WSL (1) ERROR: UtilCreateProcessAndWait:687: /bin/mount failed with status 0xff00 [Fri Jul 19 13:47:09 2024] WSL (5) ERROR: UtilCreateProcessAndWait:665: /bin/mount failed with 2 [Fri Jul 19 13:47:09 2024] WSL (1) ERROR: UtilCreateProcessAndWait:687: /bin/mount failed with status 0xff00 [Fri Jul 19 13:47:09 2024] WSL (1) WARNING: /etc/hosts updating disabled in /etc/wsl.conf [Fri Jul 19 13:47:09 2024] WSL (1) WARNING: /etc/resolv.conf updating disabled in /etc/wsl.conf [Fri Jul 19 13:47:11 2024] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22 [Fri Jul 19 13:47:11 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [Fri Jul 19 13:47:11 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [Fri Jul 19 13:47:11 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [Fri Jul 19 13:47:11 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2` ### Diagnostic Logs https://ovh.tretas.eu/~cusco/WslLogs-2024-07-19_13-58-16.zip
github-actions[bot] commented 4 months ago

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0

OneBlue commented 4 months ago

Thank you for reporting this @cusco. Can you share the content of /etc/wsl.conf ?

cusco commented 4 months ago

Within wsl Debian? Sure. I’m not at that computer right now but should be able to reply back in the next 2 or 3 Days

cusco commented 3 months ago

etc/wsl.conf

[network]
generateResolvConf = false
generateHosts = false

[interop]
enabled = true
appendWindowsPath = true

[automount]
enabled = true
options = "metadata,umask=22,fmask=11"
mountFsTab = true

[wsl2]
virtio9p=false

I was reading stuff online and changed several options within that file... the only think I had, was the [network] stanza

OneBlue commented 3 months ago

Thank you. Can you also share the content of /etc/fstab ?

cusco commented 3 months ago

It’s empty.

I used to get fstab failed to mount, because it was empty.

But always had /mnt/c and /mnt/p mounted …