Dead USB. Any hope of a resurrection?

What works, and doesn't, for you. Be specific, and please include Puppy version.
Post Reply
Message
Author
ocpaul20
Posts: 260
Joined: Thu 31 Jan 2008, 08:00
Location: PRC

Dead USB. Any hope of a resurrection?

#1 Post by ocpaul20 »

Fanless PC, Debiandog Jessie.

I have a couple of Sandisk USBs which do not get recognised on the screen by any linux I have tried.
They do show up in dmesg, dfisk, etc.

Any ideas what I can do to get these back please?
I understood that the USB interface was in a hardware chip and reports a description of itself. I see this in the dmesg printout.

Can I just try to make the filesystem type decimal(hex?) 83 for linux and then maybe it will allow gparted to write a partition table?

Thanks for any help.
Paul
=================================
USB Number 1
# dmesg shows this:

Code: Select all

[14045.337369] usb 4-1.5: new high-speed USB device number 3 using ehci-pci
[14045.431043] usb 4-1.5: New USB device found, idVendor=0781, idProduct=5530
[14045.431048] usb 4-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14045.431051] usb 4-1.5: Product: Firebird6Sp9
[14045.431053] usb 4-1.5: Manufacturer: SanDisk Corporation
[14045.431055] usb 4-1.5: SerialNumber: 0123456789ABCDEF
[14045.431751] usb-storage 4-1.5:1.0: USB Mass Storage device detected
[14045.431930] scsi7 : usb-storage 4-1.5:1.0
[14046.429722] scsi 7:0:0:0: Direct-Access     SanDisk  Firebird         1.07 PQ: 0 ANSI: 2
[14046.430620] sd 7:0:0:0: Attached scsi generic sg3 type 0
[14046.432139] sd 7:0:0:0: [sdd] 131072 512-byte logical blocks: (67.1 MB/64.0 MiB)
[14046.433449] sd 7:0:0:0: [sdd] Write Protect is off
[14046.433454] sd 7:0:0:0: [sdd] Mode Sense: 03 00 00 00
[14046.434509] sd 7:0:0:0: [sdd] No Caching mode page found
[14046.434514] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[14046.474131] sd 7:0:0:0: ioctl_internal_command return code = 8070000
[14046.474136]    : Sense Key : Hardware Error [current] 
[14046.474141]    : Add. Sense: No additional sense information
[14046.479494]  sdd: unknown partition table
[14046.522108] sd 7:0:0:0: ioctl_internal_command return code = 8070000
[14046.522113]    : Sense Key : Hardware Error [current] 
[14046.522117]    : Add. Sense: No additional sense information
[14046.523086] sd 7:0:0:0: [sdd] Attached SCSI removable disk
[14046.642073] sd 7:0:0:0: ioctl_internal_command return code = 8070000
[14046.642078]    : Sense Key : Hardware Error [current] 
[14046.642083]    : Add. Sense: No additional sense information
# fdisk -l shows:

Code: Select all

Disk /dev/sdd: 64 MiB, 67108864 bytes, 131072 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
When I try to mount this

Code: Select all

mount: wrong fs type, bad option, bad superblock on /dev/sdd,
       missing codepage or helper program, or other error
I suspect all I need to do is somehow write something to it,
however when I try to use gparted to write a partition table I cannot do it.

dmesg shows more of these...

Code: Select all

[14621.295852] sd 7:0:0:0: ioctl_internal_command return code = 8070000
[14621.295858]    : Sense Key : Hardware Error [current] 
[14621.295862]    : Add. Sense: No additional sense information
[14621.313468]  sdd: unknown partition table
[14621.359858] sd 7:0:0:0: ioctl_internal_command return code = 8070000
[14621.359863]    : Sense Key : Hardware Error [current] 
[14621.359867]    : Add. Sense: No additional sense information
[14621.471853] sd 7:0:0:0: ioctl_internal_command return code = 8070000
[14621.471858]    : Sense Key : Hardware Error [current] 
[14621.471863]    : Add. Sense: No additional sense information
=====================================================

Another one...
USB Number 2

Code: Select all

dmesg after inserting into USB socket
[14792.918769] usb 4-1.5: USB disconnect, device number 3
[14809.398042] usb 4-1.5: new high-speed USB device number 5 using ehci-pci
[14809.490887] usb 4-1.5: New USB device found, idVendor=0781, idProduct=5567
[14809.490893] usb 4-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14809.490896] usb 4-1.5: Product: Cruzer Blade
[14809.490898] usb 4-1.5: Manufacturer: SanDisk
[14809.490901] usb 4-1.5: SerialNumber: 4C532000060810122310
[14809.491257] usb-storage 4-1.5:1.0: USB Mass Storage device detected
[14809.491566] scsi8 : usb-storage 4-1.5:1.0
[14810.490737] scsi 8:0:0:0: Direct-Access     SanDisk  Cruzer Blade     2.01 PQ: 0 ANSI: 6
[14810.491072] sd 8:0:0:0: Attached scsi generic sg3 type 0
[14810.492884] sd 8:0:0:0: [sdd] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
[14810.494397] sd 8:0:0:0: [sdd] Write Protect is off
[14810.494402] sd 8:0:0:0: [sdd] Mode Sense: 43 00 00 00
[14810.495413] sd 8:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[14810.504486]  sdd: sdd1
[14810.508383] sd 8:0:0:0: [sdd] Attached SCSI disk

fdisk -l

Code: Select all

Disk /dev/sdd: 14.9 GiB, 16008609792 bytes, 31266816 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
Disklabel type: dos
Disk identifier: 0x0009ceb5

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdd1        2048 31266815 31264768 14.9G 83 Linux
I think 14Gb is a little small. I think it should be 32 or 64Gb
So, I see this looks OK but cannot be mounted. Error message is the same as the previous one.

Code: Select all

mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
       missing codepage or helper program, or other error
=================================
==================
Running DebianDog Jessie Frugal with /live and maybe with changes or savefile or.., who knows?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#2 Post by Semme »

Paul, it harms nothing to try the Linux method described here.

Give it a shot , then remove and reinsert your stick before attempting any additional operations.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

Gordie
Posts: 153
Joined: Tue 23 Aug 2016, 15:26
Location: Nolalu, Ontario, Canada

#3 Post by Gordie »

I have restored them but it takes all night. You can't be in a hurry and you can't interrupt things. Just let it run until done.

Use the dd command to write zeros to the entire stick and then format it fat32. Make damn good and sure what disk you identify as your USB. Mine is /dev/sdb but yours is likely to be different. Copy and paste to a terminal and let er rip

Code: Select all

#
# -------------------------------------------------------------
# Commands to re-create a functional USB stick with FAT partition:
# Take care about which device actually is your USB stick !!!!!!!!!
# The next command unmounts the USB stick ESPECIALLY with KDE that automatically mounts removeable devices as fast as you can unmount them
umount /dev/sdb1
# The next commands will make all data on /dev/sdb inaccessible:
# First, wipe USB stick
wipefs -a -f /dev/sdb
#
# Next, zero the entire USB stick:
dd if=/dev/zero of=/dev/sdb status=progress
#
# Next, create a new FAT16 partition (type '6' in fdisk terminology) on the stick and write a FAT32 (vfat) filesystem on it:
fdisk /dev/sdb <<EOF   # create a FAT16 partition (type '6')
n
p
1


t
6
w
EOF
mkdosfs -F32 /dev/sdb1 # Create a FAT32 filesystem (aka 'vfat')
# set a boot flag
parted /dev/sdb set 1 boot on
# -------------------------------------------------------------
#
--
Cheers
Gordie
Slackware64-Current, Thinkpad W510, Intel i7, 8G/500G, Lilo / Legacy.
Fatdog64 + 6 Puppies on USB flash drives.
Windows 10 / Slackware64-Current, HP desktop, Intel Core2 Duo, 4G/500G/250G, Lilo / Legacy.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

Try this:

To do this the USB flash drive can not be in use. Only accessed. Not booted from. Not being used to run Puppy.
In a console type this code and hit enter.
Important
(The code of=/dev/sdb sdb is the flash drive, yours could be sdc, sdd, etc.... adjust to match yours)
Code:

Code: Select all

dd if=/dev/zero of=/dev/sdb bs=1M count=1


This will remove all partitions, format, and data from USB flash drive.

Use Gparted to get back to normal setup.
1. Make a partition table:
GParted > Device > Create Partition Table > MS-DOS default.
2. Partition and format as you like.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

ocpaul20
Posts: 260
Joined: Thu 31 Jan 2008, 08:00
Location: PRC

#5 Post by ocpaul20 »

OK, thanks for the suggestions guys. I will try this and see what happens.
==================
Running DebianDog Jessie Frugal with /live and maybe with changes or savefile or.., who knows?

peterw
Posts: 430
Joined: Wed 19 Jul 2006, 12:12
Location: UK

USB resurrection

#6 Post by peterw »

I have gone down this route before and sometimes for expediency switched to doing the task with the HP USB formatter for speed. See: https://www.bleepingcomputer.com/downlo ... rmat-tool/ It runs in Windows (Sigh). However, I think it may run in DOS. It used to be the standard for USB sticks.

ocpaul20
Posts: 260
Joined: Thu 31 Jan 2008, 08:00
Location: PRC

#7 Post by ocpaul20 »

Well, some good news (kind of) and some bad news.

I managed to get 15Gb back on one of them and the other would not take any writing to it.

Both accepted dd commands but only wrote Mb not Gb which is what I was hoping. see the output below.

I think one has died because it will not allow writing to the partition table and the other is a shadow of its former self. (I thought it was 32 or 64Gb memory stick.)

I am not really sure what I did to make them both die like this. Maybe they were just from a bad batch.

Peter - If HP can do it in windows, then we should be able to do it in Linux. It is just a matter of finding out what commands they use perhaps. Thanks for the suggestion.

Anyway...

Thanks all.
Paul
-----------------------------
first one...
wipefs failed

dd came back with the following after less than a minute.
# dd if=/dev/zero of=/dev/sdc
dd: writing to '/dev/sdc': No space left on device
131073+0 records in
131072+0 records out
67108864 bytes (67 MB) copied, 19.2611 s, 3.5 MB/s
formatted in gparted to 14.9G which suggests something is not right with this USB as they usually provide a lot less space after formatting.

-----------------------------
second one...

Code: Select all

root@debian:~# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x8d5df80d.

Command (m for help): d
No partition is defined yet!
Could not delete partition 11

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-131071, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-131071, default 131071): 

Created a new partition 1 of type 'Linux' and of size 63 MiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@debian:~# mkfs.vfat -F 32 /dev/sdc1
mkfs.vfat 3.0.12 (29 Oct 2011)
/dev/sdc1: No such file or directory

Code: Select all

Partition table entries are not in disk order.
Disk /dev/sdc: 64 MiB, 67108864 bytes, 131072 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
==================
Running DebianDog Jessie Frugal with /live and maybe with changes or savefile or.., who knows?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#8 Post by Semme »

In an attempt to keep *US* from wasting too much time on something that can be had for pennies on the dollar, read this post and the exchange that ensues between npierce and Sylvander. Both your 0781:5530 & 0781:5567 drives are listed on FlashBoot.ru. Yes, this thread results in a [SOLVED] by pages end. GOOD STUFF most of us will never have known *without* npierces`persistence.

Don't miss his "detailed" follow-up here.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#9 Post by bigpup »

when I try to use gparted to write a partition table I cannot do it.
What exactly happens?
I cannot do it, tells us nothing!
Are you trying to make a msdos partition table?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#10 Post by enrique »

sd 7:0:0:0: ioctl_internal_command return code = 8070000
: Sense Key : Hardware Error [current]


Beware that some Scandisk after hardware failur will LOCK. You caould read but you can not write anymore. They claim is a failsafe mecanisim to safegard the data in the drive!!

I personally think is crap. Ok at 1rst lock it. This is nice. But once I backup PLEASE allow me to decide for myself If I want or not trust to use it anymore. I did have a few that fail after years of use. Never to buy again from Scandisk.

Gordie
Posts: 153
Joined: Tue 23 Aug 2016, 15:26
Location: Nolalu, Ontario, Canada

#11 Post by Gordie »

With a Legacy Boot iso we never used to have such problems. UEFI boot iso's have changed all that. An iso written to the usb flashdrive creates a multiple partition filesystem with multiple partition tables. In short, a mess that no single program (either GUI or CLI) can deal with.

The best thing is to overwrite the whole of the flashdrive with zeros.

My daily driver is Slackware, not Puppy. I use the method I posted all the time with Slackware. The "wipe command don't work? Wipe is not installed on your system. No biggie, just ignore the error or comment out the line with the wipe command. I'll try and attach it for you. Rename it from .bz2 to .tgz
View the flashdrive with GParted and you can see that the usable partiton is much smaller than the original partition was. Run it again. I have tried GUI tools and end up throwing flashdrives away because the GUI fixes fail. Lately even flashdrives that fail to mount have been saved using this method

After one, two or three uses to end up in the bin is nuts. Linux destroys flashdrives. What I posted earlier works for me and I edit it as required to make it work better

Partitions and formats are all data written in 0's and 1's. Overwrite everything with zeros, repartition and reformat fat32 and the flash is just like you bought it
Attachments
wipe-2.3.1-x86_64-2_SBo.bz2
I'll try and attach &quot;wipe&quot; built on Slackware 14.2 Apparently Debian has a deb available so maybe Puppy can install and use it?
(45.48 KiB) Downloaded 90 times
Last edited by Gordie on Fri 12 Jun 2020, 04:30, edited 1 time in total.
--
Cheers
Gordie
Slackware64-Current, Thinkpad W510, Intel i7, 8G/500G, Lilo / Legacy.
Fatdog64 + 6 Puppies on USB flash drives.
Windows 10 / Slackware64-Current, HP desktop, Intel Core2 Duo, 4G/500G/250G, Lilo / Legacy.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#12 Post by Mike Walsh »

This is a long-standing issue with SanDisk flash drives.....and the Cruzer 'Blades' are among the worst-affected.

There's a long-running thread on the SanDisk forums devoted to this very issue, dating back to early 2012. It stems, apparently, from a bulk-purchase agreement between SanDisk and S K Hynix for the supply of NAND flash drive controller chips, and is the subject of a long, drawn out court battle between the two tech giants.

It seems that a disproportionate number of these controller chips were faulty, with the tendency to default to 'read-only' status as the primary symptom. SanDisk want a proportional refund; S K Hynix refuse point-blank to honour this request, taking the view that the agreement was binding at the time of purchase. The upshot being that you have two well-funded tech giants, both digging their heels in and not prepared to budge an inch. The only people who are doing well out of this are the lawyers representing the two firms.....

SanDisk manufactured literally millions of these things before the problem began to come to general public attention. It's now got so that if you've purchased one of these drives, and have encountered the problem, SanDisk tell you to return it for a replacement. Unfortunately, there's still tens of thousands of the things kicking around the supply chain, and the situation is becoming muddied by the sheer length of time this problem has been dragging on for.....

It's not 'fixable' by any conventional or even esoteric means. All you can do is get it replaced, free of charge. Either that, or steer clear of the brand, I guess.....


Mike. :wink:

Post Reply