13

I have a SanDisk 16GB USB drive that is not being detected by Ubuntu 14.04 but is detected by Windows 7.

lsusb detects it but sudo fdisk -l or blkid doesn't.
Even GParted and Disks don't detect it.

Here's some terminal output:

lsusb

Bus 002 Device 006: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E230/E270/E870 HSDPA/HSUPA Modem
Bus 002 Device 004: ID 0781:5576 SanDisk Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 1a2c:0021 China Resource Semico Co., Ltd Keyboard
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04f2:b070 Chicony Electronics Co., Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

tail -f /var/log/syslog

Sep 10 22:28:22 xhakz kernel: [ 2203.587319] usb 2-2: USB disconnect, device number 4
Sep 10 22:28:25 xhakz kernel: [ 2206.212045] usb 2-2: new high-speed USB device number 7 using ehci-pci
Sep 10 22:28:25 xhakz mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2"
Sep 10 22:28:25 xhakz kernel: [ 2206.344889] usb 2-2: New USB device found, idVendor=0781, idProduct=5576
Sep 10 22:28:25 xhakz kernel: [ 2206.344895] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 10 22:28:25 xhakz kernel: [ 2206.344897] usb 2-2: Product: Cruzer Facet
Sep 10 22:28:25 xhakz kernel: [ 2206.344900] usb 2-2: Manufacturer: SanDisk
Sep 10 22:28:25 xhakz kernel: [ 2206.344902] usb 2-2: SerialNumber: 4C532000030522108444
Sep 10 22:28:25 xhakz mtp-probe: bus: 2, device: 7 was not an MTP device

usb-devices

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0781 ProdID=5576 Rev=01.26
S:  Manufacturer=SanDisk
S:  Product=Cruzer Facet
S:  SerialNumber=4C532000030522108444
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)

I don't know what to do anymore to get it detected and I don't want to format it as it contains important data.


I backed up my data in another laptop, formatted the drive in Windows 7 but still it's not recognized. The funny thing is that Windows 7 detects it and uses it fine but it's not detected in Ubuntu except by the lsusb command. Weird.


EDIT

Requested command output:

sudo lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 149.1G  0 disk 
├─sda1   8:1    0   1.5G  0 part 
├─sda2   8:2    0  74.4G  0 part 
├─sda3   8:3    0     1K  0 part 
├─sda4   8:4    0    32G  0 part /media/kagz/New Volume
├─sda5   8:5    0   1.9G  0 part [SWAP]
└─sda6   8:6    0  39.4G  0 part /
sr0     11:0    1  1024M  0 rom

sudo lshw

http://paste.ubuntu.com/8332788/

uname -a

Linux xhakz 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:01 UTC 2014 i686 i686 i686 GNU/Linux

EDIT 2

Something interesting:
The USB DOES NOT work in guest mode but WORKS in live session mode. All running Ubuntu 14.04.
Re-installing is not an option.


EDIT 3

Other USB's don't work, this is a problem with the system not the USB.

19
  • 2
    does sudo lsblk show the device? what about sudo lshw ?
    – fossfreedom
    Sep 12, 2014 at 22:49
  • 1
    Also, how is the drive partitioned?
    – Kaz Wolfe
    Sep 12, 2014 at 22:58
  • @fossfreedom Both sudo lsblk and sudo lshw don't show the drive, just the hard drive. I can post the result here if you wish.
    – Parto
    Sep 13, 2014 at 7:00
  • @Whaaaaaat The drive is not partitioned. I just formatted it as FAT32 on windows recently.
    – Parto
    Sep 13, 2014 at 7:01
  • Weird. Fat32 should be recognized.... Please post the results. You might have just missed something (I do too all the time).
    – Kaz Wolfe
    Sep 13, 2014 at 7:01

4 Answers 4

6

It turned out the usb-storage module was not being loaded at startup and so couldn't detect any USB drives.

To try it first, I inserted my usb, opened up the terminal and typed sudo modprobe usb-storage and it was detected.

To make the changes permanent, I edited the file /etc/modules as root and added the line usb-storage

My file now looks like this:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

usb_storage
lp

Source: ubuntuforums

3
  • I am curious whether you think this could also solve my former problem described here. If yes, I would like to give it a try and install Lubuntu 14.04 once more on my laptop. Thanks for your answer in advance!
    – Rantanplan
    Jan 8, 2015 at 14:23
  • @Rantanplan Just try it and see, you never know.
    – Parto
    Jan 8, 2015 at 19:09
  • The command worked for me. But i did have that line inside my /etc/modules May 19, 2018 at 7:39
1

I think there is a problem with the ehci / high speed USB 3.0 modules in the kernel. I've read about this problem with multiple distributions and kernels, and on occasion I read that it had been patched. Early logs of the problem indicated that the kernel would not allocate enough power to deal with the new demands of the high speed USB, which might explain why it works in host mode (because the kernel didn't get a chance to limit the amount of power allocated), as well as on Windows, but not in Ubuntu.

I have also read that, despite the insufficient power allocation, if you leave the USB stick plugged in for anywhere from 5-15 minutes, it will eventually get prioritized enough to be recognized and mounted.

I'll follow up later with some links, very curious to see how this turns out.

edit: Alternatively it could be a problem with FUSE. Have you tried mounting it from the command line directly, rather than letting FUSE try and fail repeatedly to automount?

edit 2: Here is a compilation of other instances of the same problem on varying kernels at varying times. It seems to be a regression which keeps appearing in the later kernels just as it is resolved in the originally problematic ones. In each case this was a blkid/udev failure/timeout, and in each case the culprit was a USB 3.0 device being handled by ehci/some variant thereof, and in each case the device is ultimately recognized after a long string of timeouts. In all of the reported instances, forcefully mounting the device with sudo mount was successful, though this may be a fluke.

Worth noting, by the way, is that a kernel downgrade will resolve the issue. The latest release I saw mentioned as working smoothly was 3.10.7, and before that most people were only successful at <3.10.

So, without further adieu, your evidence:

Ubuntu 13.04 Does not recognize USB Drives

Can't mount specific usb device after kernel upgrade

USB device constantly being reset

Current Kernel causes blkid USB error

Selective Blindness to Certain USB Devices

2
  • Thanks for this, I'm having a problem with Huawei modem not being detected - in the sense that when you plug it in USB, there are no messages whatsoever in dmesg/syslog... Also here, its an older USB modem, and plugged into USB 3 port... and indeed, if I wait 5-10 minutes, then eventually there are messages in syslog, and the device gets recognized... Wish there was something that could force probing on usb buses...
    – sdaau
    Apr 7, 2016 at 13:03
  • I'd like to confirm that the Sandisk detection issue in Ubuntu 16.04.1 LTS with FAT32-formatted Cruzer Glide USB drives, while I don't seem to have problems with EXT4-formatted USB drives (yet, anyway, not completely sure.) Additionally the "modprobe usb-storage" fix does not work. uname -a: Linux HP-Pavilion-dv6 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux A cold reboot allows detection ONCE, then /dev/sdb disappears again.
    – user173876
    Jul 23, 2016 at 10:09
0

It sounds like it may be a Linux driver problem, as your syslog does not report what mine does when I insert a USB disk. Specifically, it is missing the line ".... usb-storage 2-1:1.0: USB Mass Storage device detected" immediately after ... not an MTP device (which it's normal to see, btw). The fact that it works in a live session would back this up. Maybe your installed system has not updated the driver correctly but the driver on a live system is later, and functional.

You can also chat with Sandisk online for free here Monday - Friday: 08:00 AM - 07:00 PM PDT . I did this recently over issues with my Sandisk SSD. Despite my using Linux, they were very helpful and solved my problem. There are issues with their drives not being recognised under some circumstances.

2
  • I have a similar problem described here on Ask Ubuntu, but there, syslog always shows some lines as ... USB Mass Storage device detected. Do you think the same solution as @Parto would work here, too? Thanks for a hint!
    – Rantanplan
    Jan 8, 2015 at 14:15
  • I cannot say for sure but I'd certainly try it.
    – Scooby-2
    Jan 10, 2015 at 20:36
-2

It seems like a driver issue. You could try:

sudo apt-get install mtp-tools mtpfs

Also, could you consider if the drive is old - it may be on it's way out.

4
  • 1
    Installed them and restarted my system - still no good.
    – Parto
    Sep 15, 2014 at 12:21
  • 1
    -1. Very unlikely, because the "was not an MTP device" triggers on every USB device you attach which isn't an MTP device. Installing MTP software doesn't make it one.
    – gertvdijk
    Sep 15, 2014 at 12:21
  • Did you try to mount manually? mount -t vfat -o rw,nosuid,nodev,quiet,shortname=mixed,uid=1001,gid=100,umask=077,iocharset=utf8 /dev/sda1 /mnt/usbstick
    – user327078
    Sep 18, 2014 at 6:44
  • Alternatively, will have to try to create some udev rules
    – user327078
    Sep 18, 2014 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .