Open HoFamilyMaker opened 4 years ago
Two years later, still not fixed.
PS C:\Users\Loong> wsl --mount \\.\PHYSICALDRIVE2 --bare 系统找不到指定的驱动器。 Error code: Wsl/Service/AttachDisk/0x8007000f
It's a feature request. It can't be 'fixed' because it was never broken.
@ndemarco, it’s broken because it’s not only about flash drives. i can’t even mount my hdd.
@absolutelynothelix this issue relates to mounting USB flash drives, not hdd / ssd.
@ndemarco, ~it's just a user assumption that the issue is related to a particular kind of drives. we don't know how it's implemented and we can't say that the issue is in the type of a drive being mounted.~ my bad, read the thread carefully. can't find an issue that covers my problem, so i'll probably create a new one when i'll be on windows.
Is anyone at Microsoft aware of this issue?
Probably. But clearly they don't care about it.
Would really like to see this functionality implemented soon
Leaving a comment to get notifications for this, till now, I've tried recompiling the kernel using the guide from this link https://www.youtube.com/watch?v=iyBfQXmyH4o , but this does not work for my internal sd-card reader which shows up as this when usbpid is used and the command usb-devices is run in Ubuntu (or kali)
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=0177 Rev=77.11 S: Manufacturer=Generic S: Product=USB2.0-CRW S: SerialNumber=20121112761000000 C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
@Animesh-Thakur Nice, so is USB support working now in your WSL distros and kernel?
Leaving a comment to get notifications for this, till now, I've tried recompiling the kernel using the guide from this link https://www.youtube.com/watch?v=iyBfQXmyH4o , but this does not work for my internal sd-card reader which shows up as this when usbpid is used and the command usb-devices is run in Ubuntu (or kali)
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=0177 Rev=77.11 S: Manufacturer=Generic S: Product=USB2.0-CRW S: SerialNumber=20121112761000000 C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I had to look around the menuconfig for a bit and set another flag for my internal card reader to work, and yes, it does work, unfortunate it isn't the default behaviour though
I found what worked for me best was to delete windows and install ubuntu
Great, can you share your kernel so that I can quickly check if it works for me? Later will build it for myself.
I found what worked for me best was to delete windows and install ubuntu
I found what worked for me best was to delete windows and install ubuntu
🤣 True
Great, can you share your kernel so that I can quickly check if it works for me? Later will build it for myself.
I found what worked for me best was to delete windows and install ubuntu
Can't upload kernel to something which I'll feel comfortable sharing, might write my step by step when I have time, but that'll have to wait, hope you can work it out without my help, because I won't count on it.
PS. can't upload it on GH, size too large
Ok, I'll try this weekend.
If you write your tutorial in between, then let me know.
On 3/27/2023 10:07 PM, Animesh Thakur wrote:
Great, can you share your kernel so that I can quickly check if it works for me? Later will build it for myself. I found what worked for me best was to delete windows and install ubuntu
Can't upload kernel to something which I'll feel comfortable sharing, might write my step by step when I have time, but that'll have to wait, hope you can work it out without my help, because I won't count on it.
— Reply to this email directly, view it on GitHub https://github.com/microsoft/WSL/issues/6011#issuecomment-1485463262, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQWBM3EIA5HWH63IG3UZXTW6G64XANCNFSM4SAKTF3Q. You are receiving this because you commented.Message ID: @.***>
Just wanting to clarify here and maybe help serve as a reminder for anyone else coming to this thread that hasn't read all the way through:
Waited well over a year for the following issue to be resolved and "mount" ported from insider builds to the wslstore release: https://github.com/microsoft/WSL/issues/7940
Now that wsl --mount can be used on Windows 10 natively, I get:
The system cannot find the drive specified
This is because , according to this issue, USB flash drives (which is what I needed to mount all along) are still not supported even after almost 3 years of this issue being open?! (I can't be sure, but it also appears that the built-in mount option also does not support mounting non-windows formatted filesystems???)
Instead, Microsoft directs us to use usbipd-win which is what was required as the workaround for any --mount options on Windows 10 until this was finally ported!
The usbipd-win solution worked fine for mounting USB flash disks formatted with EXT3/EXT4 file systems. The only concern is back when I implemented it required building a custom kernel with USB support because according to usbipd-win page:
Currently, WSL 2 does not support USB devices by default.
However, their support wiki page also states:
Recent versions of Windows running WSL kernel 5.10.60.1 or later already include support for common scenarios like USB-to-serial adapters and flashing embedded development boards. If you're trying to do one of these tasks on Ubuntu, you can avoid recompiling the kernel by following the WSL Setup instructions at the top of this page. If you require special drivers, you'll need to build your own kernel for WSL 2.
I'm still running off the kernel I compiled with no issues, but it seems that some users may not need to compile their own kernels.
In short, it seems that the "wsl --mount" option is still severely lacking in functionality and that usbipd-mount may be the preferable solution.
Is there any advantage, if USB support is now compiled into WSL kernel and therefore usbipd-win setup is very easy to use "wsl --mount" over usbipd-win?
With usbupd-win I was able to perform block-level operations against a mounted USB flash drive. I would think that most other operations would build on top of that and not have issues.
If it were up to me, at this point, I would recommend the use of usbipd-win in any scenario due to my experience and the limitations of "wsl --mount". With the exception of 5 minutes of setup, there seems to me no disadvantage. However I am but one user and admittedly do not understand the full scope of the underlying architecture between the two choices.
Can anyone speak to how/why/when "wsl --mount" would be a superior option?
The same here,Looking forward to deal with it early
@OneBlue @craigloewen-msft Hey folks, what ever became of this issue? I just plopped the SD card from one of my Rasp Pi's into a card reader and thought I'd be able to access its contents from WSL to move some stuff around. That feels like a pretty basic and common use-case for WSL to me if one does not have some flavor of Linux on hand to access non-NTFS / FAT formatted drives. I'm guessing this is very difficult feature to implement, given how long this ticket has been open?
for what it's worth, I was able to access a luks partition on a USB drive by using usbipd approach. I needed to rebuild my kernel with CONFIG_USB_STORAGE
, everything else was already enabled by default. I followed the steps here to rebuild, additionally configuring CONFIG_USB_STORAGE
as the steps only mention CONFIG_USB
and other basic USB driver configuration.
if that works with devmapper and encrypted partitions, I imagine it would cover most scenarios, which probably also explains the relative low priority/long issue age.
@alexeldeib I also managed this by the method you link to, on Windows 11. However the external SD card reader I wanted to talk to is on a USB-C dock that is also driving my 2 external monitors. I got control of the SD card, but in doing so, I lost the displays. This condition persists after reboot. The PC is no longer able to use the dock to drive the external monitors. So I'll have to roll back to the standard wsl kernel. Using a raspberry pi for this kind of work is still the most sensible answer.
Still can't edit SD-Card in a USB-Adapter. Trying it with a LibreElec ext4 partition.
PS C:\Users\Xeno> wsl --mount \\.\PHYSICALDRIVE2 --bare
Das System kann das angegebene Laufwerk nicht finden.
Error code: Wsl/Service/AttachDisk/0x8007000f
Disappointing this is still an issue. Recommended friend to use WSL to set up an SD card for Arch for Raspberry Pi, since I assumed this would just work, unfortunately just get the same issue as described numerous times in this thread.
+1 for "just install Linux" gang
for what it's worth, I was able to access a luks partition on a USB drive by using usbipd approach. I needed to rebuild my kernel with
CONFIG_USB_STORAGE
, everything else was already enabled by default. I followed the steps here to rebuild, additionally configuringCONFIG_USB_STORAGE
as the steps only mentionCONFIG_USB
and other basic USB driver configuration.
Wouldn't it make sense to release the stock builds with CONFIG_USB_STORAGE. Then usbipd.exe would be a method to access a USB stick. This is what I was initially trying, before I heard of the '--mount' option to wsl. Is this is a real overhead in the kernel. At the very least it could be a module supplied with the distro releases. It is clear lots of people desire this feature and MS has probably wasted more time responding to this thread than the time it would take to bundle USB_STORAGE.
I alway just revert to using a Linux box instead trying to use WSL2 for this issue. Compiling custom WSL2 kernels is too much effort.
It's 2024 and still...
$/ GET-WMIOBJECT -query "SELECT * from Win32_DiskDrive"
....
Partitions : 0
DeviceID : \\.\PHYSICALDRIVE2
Model : Mass Storage Device USB Device
Size : 128042933760
Caption : Mass Storage Device USB Device
$/ wsl --mount \\.\PHYSICALDRIVE2
The system cannot find the drive specified.
Same error here.
PS C:\Windows\system32> GET-CimInstance -query "SELECT * from Win32_DiskDrive"
DeviceID Caption Partitions Size Model
-------- ------- ---------- ---- -----
\\.\PHYSICALDRIVE1 SDXC Card 1 128042933760 SDXC Card
\\.\PHYSICALDRIVE0 SAMSUNG MZFLV256HCHP-000MV 3 256052966400 SAMSUNG MZFLV256HCHP-000MV
PS C:\Windows\system32> wsl --mount \\.\PHYSICALDRIVE1 --bare
Le lecteur spécifié est introuvable.
Error code: Wsl/Service/AttachDisk/HCS/0x8007000f
It's been 4 years, Microsoft, c'mon...
PS C:\Windows\system32> GET-CimInstance -query "SELECT * from Win32_DiskDrive"
DeviceID Caption Partitions Size Model
-------- ------- ---------- ---- -----
\\.\PHYSICALDRIVE0 SAMSUNG MZVL4512HBLU-00BLL 3 512105932800 SAMSUNG MZVL4512HBLU-00BLL
\\.\PHYSICALDRIVE1 NORELSYS 1081CS0 USB Device 0 NORELSYS 1081CS0 USB Device
\\.\PHYSICALDRIVE4 Microsoft Virtual Disk 1 1099506078720 Microsoft Virtual Disk
\\.\PHYSICALDRIVE2 NORELSYS 1081CS1 USB Device 2 64083156480 NORELSYS 1081CS1 USB Device
\\.\PHYSICALDRIVE3 Kingston UHS-II SD Reader USB Device 0 15924142080 Kingston UHS-II SD Reader USB Device
PS C:\Windows\system32> wsl --mount \\.\PHYSICALDRIVE2 --bare
The system cannot find the drive specified.
Error code: Wsl/Service/AttachDisk/0x8007000f
See also many other issues like #8090 and #8408.
me too
need solution
Come on MS please make this work!
Another 6 month go by. Why is this so hard to implement, MS?
In case anyone else also only needs to read files from a Linux-formatted microSD card, I will share a Hyper-V-based workaround (which, again, only works for reading; it does not work for writing).
Rather than installing third-party software and opening up a port to my local subnet (!), I was able to inconveniently work around the lack of built-in USB drivers (in WSL 2.2.4.0, kernel 5.15.153.1-2) using Hyper-V by:
wsl --mount <path to VHD> --vhd
/dev/sdd2
) from within WSLNote that this copies the whole drive, so it's quite slow--but still faster than figuring out how to recompile the WSL2 kernel to add the usb-storage
module--at least for me!
I followed this guide but got the same error as others.
EDIT: NVM, I just forgot to specify the partition that I want to mount to.
As this isuue is so utility for embedded developers, could MS work harder on it?
I hit this too. May be not related to embedded development, but I have a secondary 512GB Flash drive and SSD 2230 disk, and I would very much like to move all my WSL distros to disk instead of using VHDs on Windows System disk. I'm also trying to see if I can merge both desktop and WSL editions into one partition so that I can use the same image for Azure, Hyper-V, Bare metal boot and WSL scenarios.
upgrade to build 20226 run this command wsl --mount receive the error 'The remote procedure call failed'
Originally posted by @HoFamilyMaker in https://github.com/microsoft/WSL/issues/6008#issuecomment-702081473