WSL: External drive --mount in WSL2 yields "The system cannot find the file specified."
Windows Build Number
10.0.21370.1 (ARM64 / Surface Pro X)
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.4.72
Distro Version
No response
Other Software
No response
Repro Steps
C:\> wmic diskdrive list brief
Caption DeviceID Model Partitions Size
WDC WD64 00BEVT-22A0RT0 USB Device \\.\PHYSICALDRIVE1 WDC WD64 00BEVT-22A0RT0 USB Device 3 640132416000
HFM512GDGTNG-87A0A \\.\PHYSICALDRIVE0 HFM512GDGTNG-87A0A 3 512105932800
C:\>wsl --mount \\.\PHYSICALDRIVE1 --bare
The system cannot find the file specified.
Expected Behavior
A mounted block device in WSL
Actual Behavior
WSL returns The system cannot find the file specified.
Diagnostic Logs
ETL-file captured logs: etl-file.zip
The specific error from the ETL-file seems Hyper-V related:
[
{
"ResourcePath": "VirtualMachine/Devices/Scsi/0/Attachments/2",
"RequestType": "Add",
"Settings": {
"Type": "PassThru",
"Path":"\\\\.\\PHYSICALDRIVE1"
}
},
{
"Error": -2147024894,
"ErrorMessage": "The system cannot find the file specified.",
"ErrorEvents": [
{
"Message": "'Virtual Machine': Attachment '\\\\?\\usbstor#disk&ven_wdc_wd64&prod_00bevt-22a0rt0&rev_#20151222&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}' could not be found due to error: 'The system cannot find the file specified.' (0x80070002). (Virtual machine ID A1BB5BC7-228E-4484-83F3-21AC60FADE15)",
"Provider": "edacd782-2564-4497-ade6-7199377850f2",
"EventId": 12240,
"Flags": 5,
"Data": [
{
"Type": "String",
"Value": "Virtual Machine"
},
{
"Type":"String",
"Value": "A1BB5BC7-228E-4484-83F3-21AC60FADE15"
},
{
"Type": "String",
"Value":"\\\\?\\usbstor#disk&ven_wdc_wd64&prod_00bevt-22a0rt0&rev_#20151222&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}"
},
{
"Type":"String",
"Value":"%%2147942402"
},
{
"Type":"String",
"Value":"0x80070002"
},
{
"Type":"String",
"Value":"Hyper-V Virtual Machine Management service"
},
{
"Type":"String",
"Value":""
}
]
}
]
}
]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 25
- Comments: 49 (1 by maintainers)
Using this alternative worked for me: https://www.scivision.dev/mount-usb-drives-windows-subsystem-for-linux/
This exact issue has been reported in various places for over 2 years. It’s clear most of these folks are dealing with a Raspberry Pi (SD card, 2 partitions, fat32 and ext4). It’s ludicrous that someone in Redmond hasn’t taken the 10 minutes necessary to repro this issue then step their code to see what’s broken. Of course, fixing it would enable all these people to successfully and easily use a different device with a different OS, so after 40 years, Microsoft is still…Microsoft.
Why was this issue closed? It’s still a problem. I can’t mount/access an SD Card with wsl. Logs attached.
WslLogs-2023-02-14_16-52-38.zip
How the fuck has this still not been fixed?
Same problem here. Surface Pro 7 Windows 11 22000.556
@dmitry-ovon You can bring back the drive using following command:
Set-Disk $n -IsOffline 0Replace$nwith your disk numberSame problem here…
Windows 10.0.22000 WSL2 5.10.60.1-microsoft-standard-WSL2
On top of command not working, it also “Ejects” the drive as a side effect. Any solutions to this?
Why on Earth was it closed?
Unfortunately, this is currently unsupported. From https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk:
Which indicates the use of a third-party open source utility called usbipd-win.
Tagging @OneBlue here for visibility!
i overcome it by making image if the drive i want to modify (HddRawCopy), mount it in loop in WSL/Ubuntu, modify, unmount, reimage. What a pain in the ass. Trying to leave windows now, going to macOS or ubuntu.
Same issue, disappointing it hasn’t been fixed in three years.
Same problem with RPi image…damn, why its closed…
I’m getting the same problem trying to mount an SD card over USB in Windows 11 22000.593
I’m using it here to decrypt a LUKS-encrypted USB stick. It works good. The only downside is having to compile the WSL kernel with USB storage support.
Yes, exact same issue here. Raspberry Pi SD card and
The system cannot find the drive specified.This issue has been automatically closed since it has not had any author activity for the past 7 days. If you’re still experiencing this issue please re-open it.
Thank you!