Flash Drive detected but not mounted.

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Flash Drive detected but not mounted.

Postby hack3rcon » 2020-10-26 08:30

Hello,
I have a USB Flash Drive and Debian detected it but not mounted:
Code: Select all
$ sudo dmesg
[12733.307597] usb 2-8: USB disconnect, device number 3
[12737.031925] usb 2-8: new high-speed USB device number 4 using xhci_hcd
[12737.180398] usb 2-8: New USB device found, idVendor=abcd, idProduct=1234, bcdDevice= 1.00
[12737.180403] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12737.180405] usb 2-8: Product: UDisk           
[12737.180407] usb 2-8: Manufacturer: General
[12737.180410] usb 2-8: SerialNumber: 2010210628410258321800
[12737.181360] usb-storage 2-8:1.0: USB Mass Storage device detected
[12737.181685] scsi host6: usb-storage 2-8:1.0

$ sudo usb-devices

T:  Bus=02 Lev=01 Prnt=01 Port=07 Cnt=02 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=abcd ProdID=1234 Rev=01.00
S:  Manufacturer=General
S:  Product=UDisk           
S:  SerialNumber=2010210628410258321800
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

$ sudo sfdisk -l -uS /dev/sdc
Disk /dev/sdc: 7.8 GiB, 8309809152 bytes, 16230096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

$ sudo fsck /dev/sdc
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
/dev/sdc: clean, 11/507904 files, 52748/2028762 blocks

$ sudo e2fsck -cfk /dev/sdc
e2fsck 1.44.5 (15-Dec-2018)
Checking for bad blocks (read-only test): set_o_direct: Invalid argument/0/0 errors)
done                                                 
/dev/sdc: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdc: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdc: 11/507904 files (0.0% non-contiguous), 52748/2028762 blocks

$ sudo lsusb
Bus 002 Device 004: ID abcd:1234 Unknown

Gparted by default can't detect it, but when I use "gparted /dev/sdc" then it show me the drive.
What is USB problem?

Thank you.
hack3rcon
 
Posts: 468
Joined: 2015-02-16 09:54

Re: Flash Drive detected but not mounted.

Postby p.H » 2020-10-26 08:54

Doesn't dmesg show more messages with "sd" ?
What is the output of lsblk and blkid ?
According to your commands, it seems that the drive has no partition table and is used entirely by an ext* filesystem. It is not the most usual layout but still perfectly valid.
p.H
 
Posts: 1512
Joined: 2017-09-17 07:12

Re: Flash Drive detected but not mounted.

Postby LE_746F6D617A7A69 » 2020-10-26 10:16

p.H wrote:According to your commands, it seems that the drive has no partition table and is used entirely by an ext* filesystem. It is not the most usual layout but still perfectly valid.
I have few partition-less external drives formatted with ext4 and btrfs - no problem with mounting on Debian -> that's not the case here.
Disabled auto-mounting? ;)
... or the drive is already present in the fstab?
... or broken udev rules?
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: Flash Drive detected but not mounted.

Postby RU55EL » 2020-10-26 15:52

Have you read:
Code: Select all
man mount


Did you try mounting the USB drive?

What desktop are you using?
User avatar
RU55EL
 
Posts: 497
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Flash Drive detected but not mounted.

Postby shep » 2020-10-26 18:49

You ran a file check for ext so I'm assuming it is an ext2/3/4. Try mounting with
Code: Select all
#mount -t ext(2/3/4) /dev/sdc1 /mnt


If it does not have anything critical, consider reformatting the drive. As it is 8GB, it would either need ext2/3/4 or extended fat.
shep
 
Posts: 401
Joined: 2011-03-15 15:22

Re: Flash Drive detected but not mounted.

Postby LE_746F6D617A7A69 » 2020-10-26 20:43

I've forgot to mention an obvious possibility - the file system can be damaged (which can be a reason why Gparted does not detect it by default) - this can be verified by using f.e.:
Code: Select all
fsck.ext4 -n -v <device/path>
Flash USB devices are prone to causing errors when they are not "safely removed/disconnected" - in such cases damages of file system are very likely.

I didn't checked the gparted sources, but I'm guessing that it can use alternative FS superblocks when the primary one is inconsistent/damaged -> that would explain the behaviour described by OP.
In case of partition-less drives, Gparted normally detects the filesystem without any issues.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: Flash Drive detected but not mounted.

Postby p.H » 2020-10-26 20:54

fsck was already run in the OP.
p.H
 
Posts: 1512
Joined: 2017-09-17 07:12

Re: Flash Drive detected but not mounted.

Postby LE_746F6D617A7A69 » 2020-10-26 21:14

p.H wrote:fsck was already run in the OP.

True, but it could be run against damaged superblock - causing additional damages.
The man pages are not very verbose regarding this issue, with the exception, that it's possible to run fsck against selected superblock copy - this allows (and this is the only way) to verify if all the superblocks are consistent.

This problem should be fixed long time ago, but on the other hand - this is a task for admins/power_users, and not for beginners ;)
..and this is why i'm using btrfs for backups, and not because of that stupid checksumming, which is completely useless in most cases ;)
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 414
Joined: 2020-05-03 14:16

Re: Flash Drive detected but not mounted.

Postby hack3rcon » 2020-11-04 12:24

Hello,
The result is:
Code: Select all
$ sudo mount -t ext3 /dev/sdc /mnt/usb/
mount: /mnt/usb: WARNING: device write-protected, mounted read-only.

$ sudo fsck.ext3 -n -v /dev/sdc
e2fsck 1.44.5 (15-Dec-2018)
Warning!  /dev/sdc is mounted.
/dev/sdc: clean, 11/507904 files, 52748/2028762 blocks

And:
Code: Select all
$ sudo mount -w -t ext3 /dev/sdc /mnt/usb/
mount: /mnt/usb/: mount failed: Read-only file system.

Some information about USB:
Code: Select all
$ sudo lsusb -D /dev/bus/usb/002/045
Device: ID abcd:1234 Unknown
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0xabcd Unknown
  idProduct          0x1234
  bcdDevice            1.00
  iManufacturer           1 General
  iProduct                2 UDisk           
  iSerial                 3 2010210628410258321800
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
hack3rcon
 
Posts: 468
Joined: 2015-02-16 09:54

Re: Flash Drive detected but not mounted.

Postby p.H » 2020-11-07 07:14

hack3rcon wrote:$ sudo mount -t ext3 /dev/sdc /mnt/usb/
mount: /mnt/usb: WARNING: device write-protected, mounted read-only.

This indicates that the filesystem mount succeeded (read-only).
Check the kernel log with dmesg for more information.
p.H
 
Posts: 1512
Joined: 2017-09-17 07:12

Re: Flash Drive detected but not mounted.

Postby sgosnell » 2020-11-08 16:03

IME, the read-only mount is a sign of a failed drive. USB flash drives do fail. I recently tossed one with this same problem. It just died. I spent a lot of time trying to revive it, just for the learning experience, and nothing worked. These drives are cheap, and really not worth the time and effort to bother with. If you have important data on it that isn't backed up, you may be able to copy it to another drive, but I doubt that the drive will be useful for anything else.
Take my advice, I'm not using it.
sgosnell
 
Posts: 904
Joined: 2011-03-14 01:49


Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable