microsoft / WSL

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

Enable CONFIG_USB_STORAGE by default #9132

Open ilan-schemoul opened 2 years ago

ilan-schemoul commented 2 years ago

Is your feature request related to a problem? Please describe. See issue #8541. We need this to be able to see block devices of USB connected storages (e.g : micro sd connected through and USB reader).

Describe the solution you'd like Enable CONFIG_USB_STORAGE on the kernel

Describe alternatives you've considered I believe supporting USB devices with partitions whose format Windows does not recognize for the --mount is being discussed and might be an alternative but I'm not an expert on this topic. Otherwise one can just manually compile the kernel but it is not as handy as baked in WSL by default.

vvavrychuk commented 2 years ago

CONFIG_USB_STORAGE is useful in case Linux based tool is needed for USB masstorage, for example to partition, format it, etc.

dezza commented 1 year ago

This (+ related USB-options) and bluetooth support is highly wanted. If people are using it and it works (especially basic functionality like this), it should be enabled so rebuilds aren't necessary.

A kernel that needs to be rebuilt for functionality people use is a badly configured kernel.

koorg commented 1 year ago

Please, this is a required feature... My Linux laptop motherboard failed, and I need to access an external EXT4 drive for backup and recovery (currently attaching the drive with usbipd, but usb_storage is still required), and it feels wrong to start using a custom kernel on WSL2... I just don't want to manually follow kernel upgrades with a custom one... It has been a default feature of all Linux distributions for years and years... if there's a blocker in adding this feature in the default WSL2 kernel, please let's try to discuss it

zerodegress commented 9 months ago

Is this feature still under consideration? Or is it too difficult to implement this feature?This issue has been there for at least one year...

kingsumos commented 8 months ago

This is a matter of changing the configuration file, why it is not enabled by default? It is a must for having direct access to USB storage devices using usbipd.

--- Microsoft/config-wsl.old    2024-03-21 17:19:43.529102058 -0300
+++ Microsoft/config-wsl        2024-03-21 17:25:12.299095636 -0300
@@ -1,15 +1,15 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/x86 6.1.21.21 Kernel Configuration
+# Linux/x86 6.1.21.2 Kernel Configuration
 #
-CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.1.0-1ubuntu1~20.04) 11.1.0"
+CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
 CONFIG_CC_IS_GCC=y
-CONFIG_GCC_VERSION=110100
+CONFIG_GCC_VERSION=110400
 CONFIG_CLANG_VERSION=0
 CONFIG_AS_IS_GNU=y
-CONFIG_AS_VERSION=23400
+CONFIG_AS_VERSION=23800
 CONFIG_LD_IS_BFD=y
-CONFIG_LD_VERSION=23400
+CONFIG_LD_VERSION=23800
 CONFIG_LLD_VERSION=0
 CONFIG_CC_CAN_LINK=y
 CONFIG_CC_CAN_LINK_STATIC=y
@@ -17,7 +17,7 @@
 CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
 CONFIG_CC_HAS_ASM_INLINE=y
 CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
-CONFIG_PAHOLE_VERSION=121
+CONFIG_PAHOLE_VERSION=125
 CONFIG_IRQ_WORK=y
 CONFIG_BUILDTIME_TABLE_SORT=y
 CONFIG_THREAD_INFO_IN_TASK=y
@@ -464,6 +464,7 @@
 CONFIG_HAVE_LIVEPATCH=y
 # end of Processor type and features

+CONFIG_CC_HAS_SLS=y
 CONFIG_CC_HAS_RETURN_THUNK=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_PAGE_TABLE_ISOLATION=y
@@ -472,6 +473,7 @@
 CONFIG_CPU_UNRET_ENTRY=y
 CONFIG_CPU_IBPB_ENTRY=y
 CONFIG_CPU_IBRS_ENTRY=y
+# CONFIG_SLS is not set
 CONFIG_ARCH_HAS_ADD_PAGES=y
 CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y

@@ -2820,7 +2822,22 @@
 #
 # also be needed; see USB_STORAGE Help for more info
 #
-# CONFIG_USB_STORAGE is not set
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_REALTEK=y
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_ONETOUCH=y
+CONFIG_USB_STORAGE_KARMA=y
+CONFIG_USB_STORAGE_CYPRESS_ATACB=y
+CONFIG_USB_STORAGE_ENE_UB6250=y
+CONFIG_USB_UAS=y

 #
 # USB Imaging devices
ilan-schemoul commented 8 months ago

Alright I think there is no point in adding comments endlessly to ask why it's not done yet. If you are interested in the issue you can subscribe to it to be notify and you can add a thumb up to my original post.

I will tag some maintainers because they seem to not have this issue under the radar despite the fact we've been waiting for almost 2 years @OneBlue @craigloewen-msft @CatalinFetoiu

It's making tens of swe losing a lot of precious time. If you believe it's relevant to add CONFIG_USB_STORAGE please add the option otherwise please make a feedback telling why it's not relevant.

Also #11335 is a duplicate and maybe should be closed.