7

My USB stick got corrupted. I am not even able to format it as it is not found properly by my OS (Ubuntu 16.04).

What I tried:

It is found by neither fdisk -l, lsblk nor gparted.

It is shown by lsusb:

> lsusb | grep Kingston
Bus 004 Device 016: ID 0951:16a2 Kingston Technology

Logs from dmesg after plugging the stick in:

>dmesg | tail -n 11
[55597.440104] usb 4-2: new SuperSpeed USB device number 16 using xhci_hcd
[55597.466711] usb 4-2: New USB device found, idVendor=0951, idProduct=16a2
[55597.466718] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[55597.466722] usb 4-2: Product: DTR30G2
[55597.466726] usb 4-2: Manufacturer: Kingston
[55597.466729] usb 4-2: SerialNumber: 001A92053B6ABE7181348774
[55597.467697] usb-storage 4-2:1.0: USB Mass Storage device detected
[55597.469243] scsi host32: usb-storage 4-2:1.0
[55598.512257] scsi 32:0:0:0: Direct-Access     Kingston DTR30G2          PMAP PQ: 0 ANSI: 6
[55598.513179] sd 32:0:0:0: Attached scsi generic sg2 type 0
[55598.539725] sd 32:0:0:0: [sdc] Attached SCSI removable disk

usb_storage module seems to be loaded properly:

>lsmod | grep usb_storage
usb_storage            69632  1 uas

gnome-disk-utility finds the USB stick but provides only few information and does not enable formatting it :

image

Any help appreciated, thanks!

EDIT: on udevadm monitor I get following lines after plugging it in:

KERNEL[1423.875373] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2 (usb)
KERNEL[1423.876930] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0 (usb)
KERNEL[1423.877165] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19 (scsi)
KERNEL[1423.877207] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/scsi_host/host19 (scsi_host)
UDEV  [1423.903359] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2 (usb)
UDEV  [1423.910198] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0 (usb)
UDEV  [1423.912942] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19 (scsi)
UDEV  [1423.914774] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/scsi_host/host19 (scsi_host)
KERNEL[1424.921326] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0 (scsi)
KERNEL[1424.921915] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0 (scsi)
KERNEL[1424.921973] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/scsi_disk/19:0:0:0 (scsi_disk)
KERNEL[1424.922006] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/scsi_device/19:0:0:0 (scsi_device)
KERNEL[1424.922215] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/scsi_generic/sg2 (scsi_generic)
KERNEL[1424.922354] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/bsg/19:0:0:0 (bsg)
UDEV  [1424.924056] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0 (scsi)
UDEV  [1424.925759] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0 (scsi)
UDEV  [1424.927960] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/scsi_disk/19:0:0:0 (scsi_disk)
UDEV  [1424.930430] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/scsi_device/19:0:0:0 (scsi_device)
UDEV  [1424.931232] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/scsi_generic/sg2 (scsi_generic)
UDEV  [1424.931308] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/bsg/19:0:0:0 (bsg)
KERNEL[1424.945962] add      /devices/virtual/bdi/8:32 (bdi)
KERNEL[1424.946102] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/block/sdc (block)
KERNEL[1424.947369] change   /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/block/sdc (block)
UDEV  [1424.947824] add      /devices/virtual/bdi/8:32 (bdi)
UDEV  [1424.992658] add      /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/block/sdc (block)
UDEV  [1425.004852] change   /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/host19/target19:0:0/19:0:0:0/block/sdc (block)
hobil
  • 71
  • 1
  • 1
  • 3
  • 1
    Can you plug it into a Windows machine and format it there? Otherwise, you'll have to try the dd command in Ubuntu... but if used incorrectly, it can wipe your primary hard disk! Be warned. – heynnema Aug 19 '17 at 23:08
  • 1
    @heynnema the flash drive is read neither by Windows nor Mac machine. I wanted to use dd, but the problem is that dd can't find the stick where it should be (/dev/sdc) – hobil Aug 20 '17 at 09:20
  • On > dd if=/dev/zero of=/dev/sdc bs=4M I get

    dd: failed to open '/dev/sdc': No medium found

    – hobil Aug 20 '17 at 09:27
  • 1
    I'm afraid it might be defective. –  Aug 20 '17 at 09:31

1 Answers1

0

You can try according to this link: Can't format my usb drive ... Analysis of the problem

Particularly you can try the tips in the list

  • On some pendrives and on many memory cards there is a small mechanical switch for write protection, that can toggle between read/write and read-only. You might have set it read-only without intention.
  • Reboot the computer and try again to restore or wipe the first megabyte with mkusb.
  • Disconnect other USB devices. Sometimes USB devices can disturb the function for each other.
  • Try other USB ports and another computer.
  • Try another operating system (Windows, MacOS) in another computer.
  • If you still cannot wipe the first megabyte of the drive, and the drive is read-only, it is probably 'gridlocked', and the next stage is that it will be completely 'bricked'. There is a limit, when you have to accept that the pendrive is damaged beyond repair, at least with tools available to normal users like you and me. See this link: Pendrive lifetime

In your case, if you still cannot see, write to, or format/restore the USB stick as a mass storage device, as a drive, it might be damaged beyond repair.

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • I read through your article and tried everything without success (can't use mkusb as it doesn't see the flash drive). Strange, as the flash drive is only few years old (USB 3.0) and I treated it with care the whole time. – hobil Aug 20 '17 at 13:39
  • I hoped that you would be able to revive the USB stick. But it does happen, that these devices stop working. It could be wear, that more and more memory cells fail, and finally the controlling logic cannot manage the system. My experience is that it helps to wipe the whole drive, when the write speed has been reduced to half of the original speed. That way I have managed to keep USB sticks working for several years (and using them quite a lot). It could also be static electricity or damaged connectors, that cause the failure. Or simply bad luck, that your stick had a weak electronic detail. – sudodus Aug 20 '17 at 15:09