WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL --mount will not mount a microSD card

Open dustojnikhummer opened this issue 3 years ago • 16 comments

Version

22000.527

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.16.3

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Surface Go 1 (Yes I'm aware it doesn't officially support Windows 11)

Insert an unpartitioned microSD card Run GET-CimInstance -query "SELECT * from Win32_DiskDrive" wsl --mount \.\PHYSICALDRIVE1

Screenshot https://i.imgur.com/TqfUBoZ.png

Expected Behavior

SD card gets mounted into WSL2

Actual Behavior

The system cannot find the drive specified

Diagnostic Logs

No response

dustojnikhummer avatar Feb 25 '22 21:02 dustojnikhummer

wsl --mount feature does not support removable media, use USP/IP instead.

If you are looking for guidance on how to connect a USB device (flash drive, SD card reader, etc), see Connect USB devices. https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk https://github.com/MicrosoftDocs/WSL/commit/ea7499d84f3493590300495f003f84ffc36ffff0

0xbadfca11 avatar Feb 26 '22 03:02 0xbadfca11

I did try that before leaving this report. That does not work either. The SD card just doesn't show up in the list. And not sure if it matters, but it isn't a USB SD card reader, but a PCIe one

https://i.imgur.com/XuYNZJk.png

dustojnikhummer avatar Feb 26 '22 12:02 dustojnikhummer

I have the same issue on my laptop. SD card reader is not in the USB device list, and I can't mount it.

andyearnshaw avatar Aug 27 '22 12:08 andyearnshaw

This is due to the fact, that there are simply no USB storage drivers in the WSL Kernel. You can use usbipd for connectiong any USB devices to WSL and they will also show up under lsusb, however due to the missing drivers in the kernel, no devices will be listed under lsblk.

I'm now trying to compile my own kernel according to the usbipd docs, but it's probably faster to just flash ubuntu over your windows machine at this point.

I have really no idea why those drivers are not simply compiled into the default kernel.

See also many other issues like https://github.com/microsoft/WSL/issues/8408

SeWieland avatar May 07 '23 10:05 SeWieland

I am still running into this issue for the Broadcom SD Card reader built into my old Acer laptop.

wsl --mount \.\PHYSICALDRIVE2 reports no drive found. device appears as SCSI Disk Drive in Device Manager usbipd wsl list does not list the SD Card.

TurboVin avatar Aug 21 '23 16:08 TurboVin

I am still running into this issue for the Broadcom SD Card reader built into my old Acer laptop.

wsl --mount \.\PHYSICALDRIVE2 reports no drive found. device appears as SCSI Disk Drive in Device Manager usbipd wsl list does not list the SD Card.

i'm in the same boat now, did you ever find a fix?

ErencanPelin avatar Nov 02 '23 21:11 ErencanPelin

Same issue. I need the feature to access an SD card for a Raspberry Pi and modify some files, but it's not working :(

KhalilOuali avatar Nov 24 '23 22:11 KhalilOuali

Still no support for USB Storage in 2024 it seems.

sprsr avatar Jan 17 '24 04:01 sprsr

The only working solution is to recompile the WSL kernel (5.15.153.1 currently). It's less painful than you think. The full instructions are here: https://www.tomshardware.com/how-to/access-linux-ext4-partitions-in-windows

In addition to the instructions above, in order to read Steam Deck SD Cards, you must also enable casefolding support which requires UTF-8 character handling Under "File Systems -> UTF-8 normalization and casefolding support".

I hope Microsoft adds USB storage support to newer kernels.

ssg avatar Oct 07 '24 20:10 ssg

This may be the same issue, I've got more detail in my issue: https://github.com/microsoft/WSL/issues/12153

ccoles146 avatar Oct 11 '24 10:10 ccoles146

Until this limitation (maybe Hyper-V related?) is resolved, check out some possible workarounds here.

Ircama avatar Jan 09 '25 00:01 Ircama

same issue. windows 10, wsl, raspberry pi formatted sd car on USB-C adapter.

flowirin avatar Feb 03 '25 10:02 flowirin

I don't there are solutions but they're hacky outside of buying the right reader- I don't think recompiling the kernel is necessary.

Some usb adapters treat the sdcard as a drvfs filesystem (mass storage vs removable media). That would solve the problem I believe. My lexar sd/microsd reader treats them as drives and not removable media.

I know people hate to hear this but WSL1 may provide better access to drives that are identified as removable media. WSL1 uses api calls to the fs which makes it a lot more compatible w/o hyper-v because there's no additional virtualization layer. You'll see a lot of posts of people downgrading to WSL1.

Odd but I really like wsl2.

pinballelectronica avatar Feb 24 '25 17:02 pinballelectronica

Don't lose hope, I wrote an tutorial and it is not complex, just take 10 minutes without any sideeffects. see here: https://www.linkedin.com/pulse/wsl2-sd-card-support-fix-guide-bowen-han-34x3c/

bugparty avatar Feb 26 '25 09:02 bugparty

The only working solution is to recompile the WSL kernel (5.15.153.1 currently). It's less painful than you think. The full instructions are here: https://www.tomshardware.com/how-to/access-linux-ext4-partitions-in-windows

In addition to the instructions above, in order to read Steam Deck SD Cards, you must also enable casefolding support which requires UTF-8 character handling Under "File Systems -> UTF-8 normalization and casefolding support".

I hope Microsoft adds USB storage support to newer kernels.

thanks~~but it not works for hardisk like nvme T-T

hrply avatar Mar 03 '25 15:03 hrply

This issue is a duplicate of #6011.

SteffenSH avatar May 20 '25 20:05 SteffenSH

The only working solution is to recompile the WSL kernel (5.15.153.1 currently). It's less painful than you think. The full instructions are here: https://www.tomshardware.com/how-to/access-linux-ext4-partitions-in-windows

In addition to the instructions above, in order to read Steam Deck SD Cards, you must also enable casefolding support which requires UTF-8 character handling Under "File Systems -> UTF-8 normalization and casefolding support".

I hope Microsoft adds USB storage support to newer kernels.

wow, what an insane thing you have to do to access the steam deck sd card on Windows. MS really dropped the ball here.

vincentlarkin avatar Jun 23 '25 00:06 vincentlarkin