# Want to disable usb-storage [solved]

## shrinidhi666

Hi guys. I am trying to disable the usb-storage module in my workplace . I deleted /lib/modules/2.6.34-gentoo-r1/kernel/drivers/usb/storage/usb-storage.ko . When the system is rebooted it can still mount any usb storage device .After i do a "rmmod usb-storage" i am not able to do a "modprobe usb-storage" and says that "/lib/modules/2.6.34-gentoo-r1/kernel/drivers/usb/storage/usb-storage.ko file is not found". 

blue0005: /root # rmmod usb-storage

blue0005: /root # modprobe usb-storage

FATAL: Could not open '/lib/modules/2.6.34-gentoo-r1/kernel/drivers/usb/storage/usb-storage.ko': No such file or directory

 Am i missing something here .   :Sad: Last edited by shrinidhi666 on Wed Aug 04, 2010 10:40 am; edited 2 times in total

----------

## gerard27

shrinidhi666,

If I understand your post correctly you deleted the module.

No system can load anything that's been deleted.

Gerard.

----------

## idella4

shrinidhi666,

let me get this straight.  You deleted /lib/modules/2.6.34-gentoo-r1/kernel/drivers/usb/storage/usb-storage.ko, and you're wondering why you can't now modprobe usb_storage.  At a guesrr, it's because you deleted it!!    :Sad:  ?  I have no idea why you would want to modprobe a module you selected to delete.

If the usb storage is still mounted, track the module remaining that facilitates it.  I'm no usb guru, but post

cat /etc/mtab and or mount

& lspci -k [or -v]

You can elect to blacklist the loading of a module, as opposed to outright deleting it.

----------

## shrinidhi666

Thats the whole problem  :Sad: 

blue0005: /root # lsmod | grep -i storage

usb_storage            41830  0 

usbcore               134346  7 sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd

blue0005: /root # tree -aif /lib/ | grep -i "usb-storage"

blue0005: /root #

I dont want to it load . but it does after a restart . Users can use Usb drives which I dont want them to use .

idella4, I have put it in the black list too with no luck .  :Sad:  .

----------

## idella4

shrinidhi666;

 ok, you missed the part about cat /etc/mtab and or mount 

& lspci -k [or -v] 

That's intended to inform what modules your system provides to support the usbfs.

Identify them, go to your kernel and de-select them, and recompile the kernel that can't mount usb.

If unsure, go to the kernel most upper level directory, post grep USB .config

for further support.

----------

## shrinidhi666

 *idella4 wrote:*   

> shrinidhi666;
> 
>  ok, you missed the part about cat /etc/mtab and or mount 
> 
> & lspci -k [or -v] 
> ...

 

Idella4, 

This is the cat /etc/mtab

cat /etc/mtab 

/dev/sda2 / ext4 rw,noatime 0 0

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0

udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0

devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0

/dev/sda4 /crap ext4 rw 0 0

shm /dev/shm tmpfs rw,noexec,nosuid,nodev,size=3G 0 0

usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0

binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0

blues1:/swr/prod/projdump /blueprod/projdump nfs rw,soft,sloppy,addr=192.168.1.199 0 0

lspci -k

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge

        Subsystem: Advanced Micro Devices [AMD] RS780 Host Bridge

00:03.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 1)

        Kernel driver in use: pcieport

00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)

        Kernel driver in use: pcieport

00:07.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 3)

        Kernel driver in use: pcieport

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]

        Subsystem: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]

        Kernel driver in use: ahci

        Kernel modules: ahci

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller

        Subsystem: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller

        Kernel driver in use: ohci_hcd

        Kernel modules: ohci-hcd

00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller

        Subsystem: ATI Technologies Inc SB700 USB OHCI1 Controller

        Kernel driver in use: ohci_hcd

        Kernel modules: ohci-hcd

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller

        Subsystem: ATI Technologies Inc Device 4397

        Kernel driver in use: ehci_hcd

        Kernel modules: ehci-hcd

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller

        Subsystem: ATI Technologies Inc Device 4398

        Kernel driver in use: ohci_hcd

        Kernel modules: ohci-hcd

00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller

        Subsystem: ATI Technologies Inc Device 4399

        Kernel driver in use: ohci_hcd

        Kernel modules: ohci-hcd

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller

        Subsystem: ATI Technologies Inc SB700/SB800 USB EHCI Controller

        Kernel driver in use: ehci_hcd

        Kernel modules: ehci-hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3a)

        Subsystem: ATI Technologies Inc SBx00 SMBus Controller

        Kernel modules: i2c-piix4

00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller

        Subsystem: ATI Technologies Inc SB700/SB800 IDE Controller

        Kernel driver in use: ATIIXP_IDE

        Kernel modules: pata_acpi, ata_generic

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

        Subsystem: Device 8357:1043

        Kernel driver in use: HDA Intel

        Kernel modules: snd-hda-intel

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller

        Subsystem: ATI Technologies Inc Device 4383

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge

00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller

        Subsystem: ATI Technologies Inc Device 4396

        Kernel driver in use: ohci_hcd

        Kernel modules: ohci-hcd

00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control

00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control

01:00.0 VGA compatible controller: nVidia Corporation G96 [Quadro FX 580] (rev a1)

        Subsystem: nVidia Corporation Device 063a

        Kernel driver in use: nvidia

        Kernel modules: nvidia

02:00.0 Ethernet controller: Attansic Technology Corp. Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller (rev b0)

        Subsystem: ASUSTeK Computer Inc. Device 831c

        Kernel driver in use: ATL1E

        Kernel modules: atl1e

03:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. Device 3403

        Subsystem: ASUSTeK Computer Inc. Device 8384

        Kernel driver in use: ohci1394

        Kernel modules: ohci1394

grep USB .config

CONFIG_USB_IRDA=m

# CONFIG_BT_HCIBTUSB is not set

CONFIG_BT_HCIBFUSB=m

# CONFIG_AT76C50X_USB is not set

CONFIG_USB_ZD1201=m

# CONFIG_USB_NET_RNDIS_WLAN is not set

CONFIG_LIBERTAS_USB=m

CONFIG_P54_USB=m

CONFIG_RT2500USB=m

CONFIG_RT73USB=m

# CONFIG_RT2800USB is not set

CONFIG_RT2X00_LIB_USB=m

# CONFIG_WIMAX_I2400M_USB is not set

# USB Network Adapters

CONFIG_USB_CATC=m

CONFIG_USB_KAWETH=m

CONFIG_USB_PEGASUS=m

CONFIG_USB_RTL8150=m

CONFIG_USB_USBNET=m

CONFIG_USB_NET_AX8817X=m

CONFIG_USB_NET_CDCETHER=m

# CONFIG_USB_NET_CDC_EEM is not set

CONFIG_USB_NET_DM9601=m

# CONFIG_USB_NET_SMSC75XX is not set

# CONFIG_USB_NET_SMSC95XX is not set

# CONFIG_USB_NET_GL620A is not set

CONFIG_USB_NET_NET1080=m

# CONFIG_USB_NET_PLUSB is not set

CONFIG_USB_NET_MCS7830=m

# CONFIG_USB_NET_RNDIS_HOST is not set

# CONFIG_USB_NET_CDC_SUBSET is not set

CONFIG_USB_NET_ZAURUS=m

# CONFIG_USB_HSO is not set

# CONFIG_USB_NET_INT51X1 is not set

# CONFIG_USB_IPHETH is not set

# CONFIG_USB_SIERRA_NET is not set

# CONFIG_MISDN_HFCUSB is not set

CONFIG_JOYSTICK_IFORCE_USB=y

CONFIG_TABLET_USB_ACECAD=m

CONFIG_TABLET_USB_AIPTEK=m

CONFIG_TABLET_USB_GTCO=m

CONFIG_TABLET_USB_KBTAB=m

CONFIG_TABLET_USB_WACOM=m

CONFIG_TOUCHSCREEN_USB_COMPOSITE=m

CONFIG_TOUCHSCREEN_USB_EGALAX=y

CONFIG_TOUCHSCREEN_USB_PANJIT=y

CONFIG_TOUCHSCREEN_USB_3M=y

CONFIG_TOUCHSCREEN_USB_ITM=y

CONFIG_TOUCHSCREEN_USB_ETURBO=y

CONFIG_TOUCHSCREEN_USB_GUNZE=y

CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y

CONFIG_TOUCHSCREEN_USB_IRTOUCH=y

CONFIG_TOUCHSCREEN_USB_IDEALTEK=y

CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y

CONFIG_TOUCHSCREEN_USB_GOTOP=y

CONFIG_TOUCHSCREEN_USB_JASTEC=y

CONFIG_TOUCHSCREEN_USB_E2I=y

CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y

CONFIG_TOUCHSCREEN_USB_ETT_TC5UH=y

CONFIG_TOUCHSCREEN_USB_NEXIO=y

CONFIG_I2C_TINY_USB=m

CONFIG_V4L_USB_DRIVERS=y

# CONFIG_USB_VIDEO_CLASS is not set

CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

CONFIG_USB_GSPCA=m

# CONFIG_USB_M5602 is not set

# CONFIG_USB_STV06XX is not set

# CONFIG_USB_GL860 is not set

# CONFIG_USB_GSPCA_BENQ is not set

# CONFIG_USB_GSPCA_CONEX is not set

# CONFIG_USB_GSPCA_CPIA1 is not set

# CONFIG_USB_GSPCA_ETOMS is not set

# CONFIG_USB_GSPCA_FINEPIX is not set

# CONFIG_USB_GSPCA_JEILINJ is not set

# CONFIG_USB_GSPCA_MARS is not set

# CONFIG_USB_GSPCA_MR97310A is not set

# CONFIG_USB_GSPCA_OV519 is not set

# CONFIG_USB_GSPCA_OV534 is not set

# CONFIG_USB_GSPCA_OV534_9 is not set

# CONFIG_USB_GSPCA_PAC207 is not set

# CONFIG_USB_GSPCA_PAC7302 is not set

# CONFIG_USB_GSPCA_PAC7311 is not set

# CONFIG_USB_GSPCA_SN9C2028 is not set

# CONFIG_USB_GSPCA_SN9C20X is not set

# CONFIG_USB_GSPCA_SONIXB is not set

# CONFIG_USB_GSPCA_SONIXJ is not set

# CONFIG_USB_GSPCA_SPCA500 is not set

# CONFIG_USB_GSPCA_SPCA501 is not set

# CONFIG_USB_GSPCA_SPCA505 is not set

# CONFIG_USB_GSPCA_SPCA506 is not set

# CONFIG_USB_GSPCA_SPCA508 is not set

# CONFIG_USB_GSPCA_SPCA561 is not set

# CONFIG_USB_GSPCA_SQ905 is not set

# CONFIG_USB_GSPCA_SQ905C is not set

# CONFIG_USB_GSPCA_STK014 is not set

# CONFIG_USB_GSPCA_STV0680 is not set

# CONFIG_USB_GSPCA_SUNPLUS is not set

# CONFIG_USB_GSPCA_T613 is not set

# CONFIG_USB_GSPCA_TV8532 is not set

# CONFIG_USB_GSPCA_VC032X is not set

# CONFIG_USB_GSPCA_ZC3XX is not set

# CONFIG_VIDEO_PVRUSB2 is not set

# CONFIG_VIDEO_USBVISION is not set

# CONFIG_USB_ET61X251 is not set

# CONFIG_USB_SN9C102 is not set

# CONFIG_USB_ZC0301 is not set

CONFIG_USB_PWC_INPUT_EVDEV=y

# CONFIG_USB_ZR364XX is not set

# CONFIG_USB_STKWEBCAM is not set

# CONFIG_USB_S2255 is not set

# Supported USB Adapters

# CONFIG_DVB_USB is not set

# CONFIG_DVB_TTUSB_BUDGET is not set

# CONFIG_DVB_TTUSB_DEC is not set

CONFIG_USB_DABUSB=m

CONFIG_SND_USB=y

CONFIG_SND_USB_AUDIO=m

# CONFIG_SND_USB_UA101 is not set

CONFIG_SND_USB_USX2Y=m

CONFIG_SND_USB_CAIAQ=m

CONFIG_SND_USB_CAIAQ_INPUT=y

CONFIG_SND_USB_US122L=m

# USB Input Devices

CONFIG_USB_HID=m

CONFIG_USB_HIDDEV=y

CONFIG_USB_SUPPORT=y

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB_ARCH_HAS_EHCI=y

CONFIG_USB=m

# CONFIG_USB_DEBUG is not set

# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set

# Miscellaneous USB options

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_DEVICE_CLASS is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

# CONFIG_USB_MON is not set

# CONFIG_USB_WUSB is not set

# CONFIG_USB_WUSB_CBAF is not set

# USB Host Controller Drivers

# CONFIG_USB_C67X00_HCD is not set

CONFIG_USB_XHCI_HCD=m

# CONFIG_USB_XHCI_HCD_DEBUGGING is not set

CONFIG_USB_EHCI_HCD=m

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set

# CONFIG_USB_EHCI_TT_NEWSCHED is not set

# CONFIG_USB_OXU210HP_HCD is not set

CONFIG_USB_ISP116X_HCD=m

# CONFIG_USB_ISP1760_HCD is not set

# CONFIG_USB_ISP1362_HCD is not set

CONFIG_USB_OHCI_HCD=m

CONFIG_USB_OHCI_HCD_SSB=y

# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set

# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set

CONFIG_USB_OHCI_LITTLE_ENDIAN=y

CONFIG_USB_UHCI_HCD=m

CONFIG_USB_U132_HCD=m

CONFIG_USB_SL811_HCD=m

CONFIG_USB_SL811_CS=m

CONFIG_USB_R8A66597_HCD=m

# CONFIG_USB_WHCI_HCD is not set

# CONFIG_USB_HWA_HCD is not set

# CONFIG_USB_GADGET_MUSB_HDRC is not set

# USB Device Class drivers

CONFIG_USB_ACM=m

CONFIG_USB_PRINTER=m

# CONFIG_USB_WDM is not set

# CONFIG_USB_TMC is not set

# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may

# also be needed; see USB_STORAGE Help for more info

CONFIG_USB_STORAGE=m

# CONFIG_USB_STORAGE_DEBUG is not set

CONFIG_USB_STORAGE_DATAFAB=m

CONFIG_USB_STORAGE_FREECOM=m

CONFIG_USB_STORAGE_ISD200=m

CONFIG_USB_STORAGE_USBAT=m

CONFIG_USB_STORAGE_SDDR09=m

CONFIG_USB_STORAGE_SDDR55=m

CONFIG_USB_STORAGE_JUMPSHOT=m

CONFIG_USB_STORAGE_ALAUDA=m

# CONFIG_USB_STORAGE_ONETOUCH is not set

CONFIG_USB_STORAGE_KARMA=m

# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set

# CONFIG_USB_LIBUSUAL is not set

# USB Imaging devices

# CONFIG_USB_MDC800 is not set

# CONFIG_USB_MICROTEK is not set

# USB port drivers

CONFIG_USB_USS720=m

CONFIG_USB_SERIAL=m

CONFIG_USB_EZUSB=y

CONFIG_USB_SERIAL_GENERIC=y

CONFIG_USB_SERIAL_AIRCABLE=m

CONFIG_USB_SERIAL_ARK3116=m

# CONFIG_USB_SERIAL_BELKIN is not set

CONFIG_USB_SERIAL_CH341=m

CONFIG_USB_SERIAL_WHITEHEAT=m

# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set

# CONFIG_USB_SERIAL_CP210X is not set

# CONFIG_USB_SERIAL_CYPRESS_M8 is not set

# CONFIG_USB_SERIAL_EMPEG is not set

# CONFIG_USB_SERIAL_FTDI_SIO is not set

CONFIG_USB_SERIAL_FUNSOFT=m

# CONFIG_USB_SERIAL_VISOR is not set

# CONFIG_USB_SERIAL_IPAQ is not set

# CONFIG_USB_SERIAL_IR is not set

# CONFIG_USB_SERIAL_EDGEPORT is not set

# CONFIG_USB_SERIAL_EDGEPORT_TI is not set

# CONFIG_USB_SERIAL_GARMIN is not set

CONFIG_USB_SERIAL_IPW=m

# CONFIG_USB_SERIAL_IUU is not set

# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set

# CONFIG_USB_SERIAL_KEYSPAN is not set

# CONFIG_USB_SERIAL_KLSI is not set

# CONFIG_USB_SERIAL_KOBIL_SCT is not set

# CONFIG_USB_SERIAL_MCT_U232 is not set

CONFIG_USB_SERIAL_MOS7720=m

CONFIG_USB_SERIAL_MOS7840=m

# CONFIG_USB_SERIAL_MOTOROLA is not set

CONFIG_USB_SERIAL_NAVMAN=m

# CONFIG_USB_SERIAL_PL2303 is not set

CONFIG_USB_SERIAL_OTI6858=m

# CONFIG_USB_SERIAL_QCAUX is not set

# CONFIG_USB_SERIAL_QUALCOMM is not set

# CONFIG_USB_SERIAL_SPCP8X5 is not set

# CONFIG_USB_SERIAL_HP4X is not set

# CONFIG_USB_SERIAL_SAFE is not set

# CONFIG_USB_SERIAL_SIEMENS_MPI is not set

# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set

# CONFIG_USB_SERIAL_SYMBOL is not set

# CONFIG_USB_SERIAL_TI is not set

# CONFIG_USB_SERIAL_CYBERJACK is not set

# CONFIG_USB_SERIAL_XIRCOM is not set

CONFIG_USB_SERIAL_OPTION=m

CONFIG_USB_SERIAL_OMNINET=m

# CONFIG_USB_SERIAL_OPTICON is not set

# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set

# CONFIG_USB_SERIAL_DEBUG is not set

# USB Miscellaneous drivers

# CONFIG_USB_EMI62 is not set

# CONFIG_USB_EMI26 is not set

CONFIG_USB_ADUTUX=m

# CONFIG_USB_SEVSEG is not set

# CONFIG_USB_RIO500 is not set

# CONFIG_USB_LEGOTOWER is not set

# CONFIG_USB_LCD is not set

# CONFIG_USB_LED is not set

# CONFIG_USB_CYPRESS_CY7C63 is not set

# CONFIG_USB_CYTHERM is not set

# CONFIG_USB_IDMOUSE is not set

CONFIG_USB_FTDI_ELAN=m

CONFIG_USB_APPLEDISPLAY=m

CONFIG_USB_SISUSBVGA=m

CONFIG_USB_SISUSBVGA_CON=y

# CONFIG_USB_LD is not set

CONFIG_USB_TRANCEVIBRATOR=m

CONFIG_USB_IOWARRIOR=m

# CONFIG_USB_TEST is not set

# CONFIG_USB_ISIGHTFW is not set

CONFIG_USB_ATM=m

CONFIG_USB_SPEEDTOUCH=m

CONFIG_USB_CXACRU=m

CONFIG_USB_UEAGLEATM=m

CONFIG_USB_XUSBATM=m

CONFIG_USB_GADGET=m

# CONFIG_USB_GADGET_DEBUG is not set

# CONFIG_USB_GADGET_DEBUG_FILES is not set

CONFIG_USB_GADGET_VBUS_DRAW=2

CONFIG_USB_GADGET_SELECTED=y

# CONFIG_USB_GADGET_AT91 is not set

# CONFIG_USB_GADGET_ATMEL_USBA is not set

# CONFIG_USB_GADGET_FSL_USB2 is not set

# CONFIG_USB_GADGET_LH7A40X is not set

# CONFIG_USB_GADGET_OMAP is not set

# CONFIG_USB_GADGET_PXA25X is not set

# CONFIG_USB_GADGET_R8A66597 is not set

# CONFIG_USB_GADGET_PXA27X is not set

# CONFIG_USB_GADGET_S3C_HSOTG is not set

# CONFIG_USB_GADGET_IMX is not set

# CONFIG_USB_GADGET_S3C2410 is not set

CONFIG_USB_GADGET_M66592=y

CONFIG_USB_M66592=m

# CONFIG_USB_GADGET_AMD5536UDC is not set

# CONFIG_USB_GADGET_FSL_QE is not set

# CONFIG_USB_GADGET_CI13XXX is not set

# CONFIG_USB_GADGET_NET2280 is not set

# CONFIG_USB_GADGET_GOKU is not set

# CONFIG_USB_GADGET_LANGWELL is not set

# CONFIG_USB_GADGET_DUMMY_HCD is not set

CONFIG_USB_GADGET_DUALSPEED=y

# CONFIG_USB_ZERO is not set

CONFIG_USB_AUDIO=m

CONFIG_USB_ETH=m

CONFIG_USB_ETH_RNDIS=y

# CONFIG_USB_ETH_EEM is not set

CONFIG_USB_GADGETFS=m

CONFIG_USB_FILE_STORAGE=m

# CONFIG_USB_FILE_STORAGE_TEST is not set

# CONFIG_USB_MASS_STORAGE is not set

# CONFIG_USB_G_SERIAL is not set

# CONFIG_USB_MIDI_GADGET is not set

CONFIG_USB_G_PRINTER=m

# CONFIG_USB_CDC_COMPOSITE is not set

# CONFIG_USB_G_NOKIA is not set

# CONFIG_USB_G_MULTI is not set

# CONFIG_NOP_USB_XCEIV is not set

----------

## shrinidhi666

Hey guys . Damn it . i figured it out !!  :Smile:  . the usb_storage module is automatically loaded through initramfs generated by genkernel   :Sad:  .  and the initramfs has  a copy of that module . So its useless even if i delete it from the modules direcotry in /lib/ . I dont want to disable it from the kernel since i need the power to use it when i want it . Any suggestions? . how can i prevent it from loading from the initramfs ?

----------

## wjb

How about adding usb-storage to /etc/modprobe.d/blacklist.conf?

Something done with udev might be more flexible. You should be able to set something up so that only members of a certain group can use memory sticks.

Doesn't really help though if your users can boot off a live cd and remove the restrictions.

----------

## shrinidhi666

wjb . I added it to the black list . nothing works since its loaded through initramfs . But now i figured it out. 

Here is what i did

# open /usr/share/genkernel/defaults/linuxrc 

# add  the following line

rmmod usb-storage 

# just before this line

exec /sbin/switch_root ..... 

Run "genkernel all" once u r done . 

Now i can disable usb-storage by deleting or renaming the 

/lib/modules/(uname -r)/kernel/drivers/usb/storage/usb-storage.ko 

and restart . 

And with this i get full control on which host can recongnize usb drives   :Twisted Evil: 

And regarding live cds. I dont have to worry coz there is no cdrom or dvdrom drives in any hosts 

thanks for all the help

----------

