microsoft / WSL

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

Unable to mount a usb mass storage device #10446

Open pete-akl-nz opened 1 year ago

pete-akl-nz commented 1 year ago

Windows Version

Microsoft Windows [Version 10.0.22621.2134]

WSL Version

WSL version: 1.2.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

Kernel version: 5.15.90.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

I followed the steps on this page: https://learn.microsoft.com/en-us/windows/wsl/connect-usb

C:\Windows\System32>usbipd wsl list BUSID VID:PID DEVICE STATE 2-2 aaaa:8816 USB Mass Storage Device Attached - WSL 2-10 8087:0026 Intel(R) Wireless Bluetooth(R) Not attached

usbipd wsl attach --busid 2-2

geronimo@MSI:/dev$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID aaaa:8816 MXT MXT USB Device Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Then following the steps on this page: https://help.ubuntu.com/community/Mount/USB

sudo fdisk -l ...... Disk /dev/sda: 363.33 MiB, 380968960 bytes, 744080 sectors Disk model: Virtual Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdb: 2 GiB, 2147487744 bytes, 4194312 sectors Disk model: Virtual Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/sdc: 1 TiB, 1099511627776 bytes, 2147483648 sectors Disk model: Virtual Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

none of these are the usb storage device that I attached, which is a 32gb usb stick

Expected Behavior

I would have expected to see sd{x} as the 32gb usb stick

Actual Behavior

device not seen, see above

Diagnostic Logs

No response

Jai-GAY commented 1 year ago

Have you installed this?

guide I reference.

ubuntu18-wsl$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

pete-akl-nz commented 1 year ago

Thanks for the feedback.

Yes, usbipd-win_3.1.0 installed.

I then followed the guide you suggested, with the same result as in my original post. usbipd wsl list shows the device attached. sudo fdisk -l does not show the device, so it cannot be mounted

dawright172 commented 1 year ago

Identical behavior with usbipd_win_3.2.0 using Ubuntu 22.04 (kernel version 5.15.90.1).

The USB device shows up using "lsusb", but does not appear with "lsblk" or "sudo fdisk -l".

Use case is flashing images to embedded devices where flash is exposed as a filesystem.

ValentinTwin1206 commented 8 months ago

Did anyone made progress here?! I am facing the same issue on Windows 11 and usbipd-win 4.1.0...

xfan-hack commented 2 weeks ago

When is this issue going to be resolved?