There were two attempts of mine to install something on my USB stick, both times this resulted in a, what I call, "complete destruction" of my USB stick.
Why I think that it is not a hardware problem: I tried to install a Nextcloud docker container passing the USB stick as storage location. In both cases the scenario was absolutely identical: The first installation attempt failed I retried after modifying the permissions of a folder on the USB stick with chmod, but it failed again. I retried and it was stuck in the process forever and claimed there was a process writing to the USB stick when I tried to unmount it. After a considerable amount of time I forced a restart after which the sticks were not recognised anymore.
I tried to rescue it with Gparted but unfortunately the stick is not recognised anymore. However, execution of usb-devices
once with the USB stick plugged in and once without it being plugged in, reveals that the following entry is associated to one of the broken sticks, herafter referred to as stick 1 (for the other one, stick 2, there is nothing found):
T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=058f ProdID=1234 Rev=00.02
S: Manufacturer=ALCOR
S: Product=AU87101A UFDISK
S: SerialNumber=123456789ABCDEF
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
For stick 1 execution of
sudo lsblk -o model,name,size,fstype,label,mountpoint
yields:
USB Remove DIS sda 29.8G
For stick 2 nothing is returned.
My question: What can I do to repair the sticks (I do not care about any data on them)?
Update: I managed to overwrite stick 1 with zeros now by:
sudo dd if=/dev/zero of/dev/sda
After doing so I tried to create a new data partition on it with
sudo mkfs.ext4 /dev/sda
which gave the following output (UUID replaced by X...X
):
mke2fs 1.43.4 (31-Jan-2017)
Discarding device blocks: done
Creating filesystem with 467512 1k blocks and 116928 inodes
Filesystem UUID: XXXXXXXXXXXXXXXXXXXXX
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
Gparted then shows an entry for /dev/sda with file System unknown
and a size of 456.55 MiB
(compare the result of the lsblk command above). Still the stick is not recognised as USB stick properly if I plug it into an arbitrary computer (including the one I have gparted on).
lsblk
command line, there is nothing we can do with the tools available to normal users to recover that drive. But the other pendrive should be possible to use (can be restored according to the tips in the link). – sudodus Aug 30 '20 at 20:01sudo dd if=/dev/zero of=/dev/sda
, which gave the following output for both of the sticks: ```dd: writing to '/dev/sda': No space left on device 935025+0 records in 935024+0 records out 478732288 bytes (479 MB, 457 MiB) copied, 5.17719 s, 92.5 MB/s – DonkeyKong Aug 30 '20 at 20:19dd
finds the end of the drive at 479 MB, there might be a severe damage in the drive, but the problem might also be a fake drive (pretending to be bigger than it is). Sometimes pendrives and memory cards get 'gridlocked', the hardware gets read-only. It looks like you can write to it, but after unplugging and replugging or rebooting, the content is the same as before you wrote to it. And i mean writing a file as well as writing a partition table and file system. – sudodus Aug 31 '20 at 06:54