microsoft / WSL

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

--mount support for USB flash drive #9290

Open byte-me-stan opened 1 year ago

byte-me-stan commented 1 year ago

Is your feature request related to a problem? Please describe. Not able to mount USB flash drive in wsl. It fails to attach to WSL 2. Same issue for NTFS, FAT and exFAT.

Describe the solution you'd like USB flash drive should be able to mount using wsl --mount command and allow to access from /dev/sdb

Describe alternatives you've considered NA

Additional context image

Windows 11 Home Version 22H2 OS build 22621.819

xiao-k233 commented 1 year ago

I have this problem too! image

zweistein22 commented 1 year ago

same error here.

Probably related to https://github.com/microsoft/WSL/issues/8885 and https://github.com/microsoft/WSL/issues/9283

zweistein22 commented 1 year ago

here is a solution: well done https://github.com/jovton/USB-Storage-on-WSL2

byte-me-stan commented 1 year ago

@zweistein22 kindly ignore my previous question. I found the answer. It doens't have an extension at all.

Cheers mate !

andrsmllr commented 1 year ago

Same here. Mounting a USB drive to WSL works with an external USB drive (ext4 FS), but does not work with an external USB flash drive (exFAT FS). Will try the workaround (use iSCSI to connect drive from Windows to WSL) mentioned above. It's not a solution imho.

williamjshipman commented 1 year ago

Mounting the root partition from a Raspberry Pi (connected via USB after running rpiboot) does not work. I get the same error code as above, even though this is an ext4 partition.

alpinemobile commented 7 months ago

I'm getting the same behavior that andrsmllr mentioned. Fix this please. Thanks

xiao-k233 commented 7 months ago

i think we can solve it use usbipd

rhubear25 commented 6 months ago

i think we can solve it use usbipd

According to thread (actually referenced above) .... https://github.com/jovton/USB-Storage-on-WSL2 .... USB/IP not yet supported on WSL2 bc of existing WSL2 limitations.

The solution in said thread is to use iSCSI emulation to get around limitations of both WSL2 & USB/IP.

ayan4m1 commented 5 months ago

Same issue. Extremely disappointing. 😭 I needed a win today, but no.

4nu81 commented 5 months ago

Same issue. Using iscsi is not a solution. It's a try to get away with bad design. Very disappointing.

pawelzwronek commented 2 weeks ago

As a workaround I cloned whole sd card to a file and mounted it with sudo losetup -fP --show /mnt/d/backup/rpi5.raw Then mount ext4 partition:

lsblk /dev/loop0
sudo mount /dev/loop0p2 /home/p/rpi_backup/ext4_mount