How to save this Flash drive?

New to Debian (Or Linux in general)? Ask your questions here!

How to save this Flash drive?

Postby hack3rcon » 2020-08-01 08:45

Hello,
I have a flash drive that I can't copy files from it because it detached suddenly. How can I solve it?
I tried and got below result:
Code: Select all
$ sudo ddrescue -n -v -T 30 --min-read-rate=50k /dev/sdc1 image.dd
GNU ddrescue 1.23
About to copy 32237 MBytes from '/dev/sdc1' to 'image.dd'
    Starting positions: infile = 0 B,  outfile = 0 B
    Copy block size: 128 sectors       Initial skip size: 1954 sectors
Sector size: 512 Bytes

Press Ctrl-C to interrupt
     ipos:    2798 MB, non-trimmed:    7595 kB,  current rate:    147 kB/s
     opos:    2798 MB, non-scraped:        0 B,  average rate:    287 kB/s
non-tried:   32213 MB,  bad-sector:        0 B,    error rate:   7595 kB/s
  rescued:   15810 kB,   bad areas:        0,        run time:         54s
pct rescued:    0.04%, read errors:      281,  remaining time:  1d 16h 54m
 slow reads:        0,        time since last successful read:         n/a
Copying non-tried blocks... Pass 1 (forwards)
ddrescue: Input file disappeared: No such file or directory

And:
Code: Select all
$ sudo safecopy /dev/sdc1 out -M CoRrUpTeD
Low level device calls enabled mode: 1
Reported hw blocksize: 4096
Reported low level blocksize: 4096
Filesize not reported by stat(), trying seek().
File size: 32237420544
Blocksize: 4096
Fault skip blocksize: 65536
Resolution: 4096
Min read attempts: 3
Head moves on read error: 1
Marker string: CoRrUpTeD
Starting block: 0
Source: /dev/sdc
Destination: out
......!*** buffer overflow detected ***: safecopy terminated
Aborted

https://imgur.com/dTAfVHa
Thank you.
hack3rcon
 
Posts: 416
Joined: 2015-02-16 09:54

Re: How to save this Flash drive?

Postby pylkko » 2020-08-07 05:13

What does the kernel log say when it detaches?
User avatar
pylkko
 
Posts: 1780
Joined: 2014-11-06 19:02

Re: How to save this Flash drive?

Postby hack3rcon » 2020-08-12 13:07

pylkko wrote:What does the kernel log say when it detaches?

Is you mean the output of "dmsg" command?
hack3rcon
 
Posts: 416
Joined: 2015-02-16 09:54

Re: How to save this Flash drive?

Postby pylkko » 2020-08-12 14:04

yes, but logs in general might contain something useful
User avatar
pylkko
 
Posts: 1780
Joined: 2014-11-06 19:02

Re: How to save this Flash drive?

Postby pcalvert » 2020-08-13 08:14

Were you able to successfully copy the entire partition using ddrescue? And what is the filesystem on that partition?

Phil
“Property is the fruit of labor; property is desirable; it is a positive good
in the world. That some should be rich shows that others may become
rich, and hence is just encouragement to industry and enterprise.”
— Abraham Lincoln
pcalvert
 
Posts: 1902
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: How to save this Flash drive?

Postby hack3rcon » 2020-08-17 12:29

pylkko wrote:yes, but logs in general might contain something useful

The log is:
Code: Select all
$ sudo dmesg
[30547.621717] usb 2-8: device descriptor read/64, error -110
[30547.857754] usb 2-8: reset high-speed USB device number 36 using xhci_hcd
[30547.985787] usb 2-8: device descriptor read/64, error -71
[30548.221767] usb 2-8: device descriptor read/64, error -71
[30548.457760] usb 2-8: reset high-speed USB device number 36 using xhci_hcd
[30548.457870] usb 2-8: Device not responding to setup address.
[30548.665823] usb 2-8: Device not responding to setup address.
[30548.873709] usb 2-8: device not accepting address 36, error -71
[30549.001740] usb 2-8: reset high-speed USB device number 36 using xhci_hcd
[30549.001878] usb 2-8: Device not responding to setup address.
[30549.209837] usb 2-8: Device not responding to setup address.
[30549.417705] usb 2-8: device not accepting address 36, error -71
[30549.417834] usb 2-8: USB disconnect, device number 36
[30549.417863] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK
[30549.417869] sd 6:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 78 c0 00 00 01 00
[30549.417872] print_req_error: I/O error, dev sdc, sector 30912
[30549.417954] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[30549.417961] sd 6:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 78 c1 00 00 1f 00
[30549.417964] print_req_error: I/O error, dev sdc, sector 30913
[30549.417988] print_req_error: I/O error, dev sdc, sector 30914
[30549.418009] print_req_error: I/O error, dev sdc, sector 30912
[30549.418026] FAT-fs (sdc1): Directory bread(block 30816) failed
[30549.418069] print_req_error: I/O error, dev sdc, sector 30913
[30549.418090] FAT-fs (sdc1): Directory bread(block 30817) failed
[30549.418109] print_req_error: I/O error, dev sdc, sector 30914
[30549.418119] FAT-fs (sdc1): Directory bread(block 30818) failed
[30549.418133] print_req_error: I/O error, dev sdc, sector 30915
[30549.418139] FAT-fs (sdc1): Directory bread(block 30819) failed
[30549.418146] print_req_error: I/O error, dev sdc, sector 30916
[30549.418151] FAT-fs (sdc1): Directory bread(block 30820) failed
[30549.418157] print_req_error: I/O error, dev sdc, sector 30917
[30549.418162] FAT-fs (sdc1): Directory bread(block 30821) failed
[30549.418169] print_req_error: I/O error, dev sdc, sector 30918
[30549.418173] FAT-fs (sdc1): Directory bread(block 30822) failed
[30549.418183] FAT-fs (sdc1): Directory bread(block 30823) failed
[30549.418192] FAT-fs (sdc1): Directory bread(block 30824) failed
[30549.418201] FAT-fs (sdc1): Directory bread(block 30825) failed
[30549.418352] FAT-fs (sdc1): error, corrupted directory (invalid entries)
[30549.418354] FAT-fs (sdc1): Filesystem has been set read-only
[30549.418404] Buffer I/O error on dev sdc1, logical block 32, lost async page write
[30549.418462] Buffer I/O error on dev sdc1, logical block 15408, lost async page write
[30549.418576] Buffer I/O error on dev sdc1, logical block 1, lost async page write
[30549.605719] usb 2-8: new high-speed USB device number 37 using xhci_hcd
[30549.733815] usb 2-8: device descriptor read/64, error -71
[30549.969749] usb 2-8: device descriptor read/64, error -71
[30550.205700] usb 2-8: new high-speed USB device number 38 using xhci_hcd
[30550.333751] usb 2-8: device descriptor read/64, error -71
[30550.569708] usb 2-8: device descriptor read/64, error -71
[30550.677717] usb usb2-port8: attempt power cycle
[30551.329689] usb 2-8: new high-speed USB device number 39 using xhci_hcd
[30551.329795] usb 2-8: Device not responding to setup address.
[30551.537784] usb 2-8: Device not responding to setup address.
[30551.745651] usb 2-8: device not accepting address 39, error -71
[30551.873695] usb 2-8: new high-speed USB device number 40 using xhci_hcd
[30551.873832] usb 2-8: Device not responding to setup address.
[30552.081858] usb 2-8: Device not responding to setup address.
[30552.289702] usb 2-8: device not accepting address 40, error -71
[30552.289749] usb usb2-port8: unable to enumerate USB device
hack3rcon
 
Posts: 416
Joined: 2015-02-16 09:54

Re: How to save this Flash drive?

Postby hack3rcon » 2020-08-17 12:32

pcalvert wrote:Were you able to successfully copy the entire partition using ddrescue? And what is the filesystem on that partition?

Phil

Not matter.
hack3rcon
 
Posts: 416
Joined: 2015-02-16 09:54

Re: How to save this Flash drive?

Postby hack3rcon » 2020-08-23 17:41

Any idea?
hack3rcon
 
Posts: 416
Joined: 2015-02-16 09:54

Re: How to save this Flash drive?

Postby pcalvert » 2020-08-23 19:54

hack3rcon wrote:Not matter.

^^^ This answer led me to believe that the problem was solved (or you gave up). Why does it not matter?

Phil
“Property is the fruit of labor; property is desirable; it is a positive good
in the world. That some should be rich shows that others may become
rich, and hence is just encouragement to industry and enterprise.”
— Abraham Lincoln
pcalvert
 
Posts: 1902
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: How to save this Flash drive?

Postby hack3rcon » 2020-08-27 09:46

pcalvert wrote:
hack3rcon wrote:Not matter.

^^^ This answer led me to believe that the problem was solved (or you gave up). Why does it not matter?

Phil

Because, I got the same error.
hack3rcon
 
Posts: 416
Joined: 2015-02-16 09:54

Re: How to save this Flash drive?

Postby pcalvert » 2020-08-27 12:58

hack3rcon wrote:
pcalvert wrote:
hack3rcon wrote:Not matter.

^^^ This answer led me to believe that the problem was solved (or you gave up). Why does it not matter?

Phil

Because, I got the same error.


Please answer these questions using at least one whole sentence, and with no important details left out:
pcalvert wrote:Were you able to successfully copy the entire partition using ddrescue? And what is the filesystem on that partition?


Added question:
Have you tried using a different computer?

Phil
Last edited by pcalvert on 2020-08-30 07:10, edited 1 time in total.
“Property is the fruit of labor; property is desirable; it is a positive good
in the world. That some should be rich shows that others may become
rich, and hence is just encouragement to industry and enterprise.”
— Abraham Lincoln
pcalvert
 
Posts: 1902
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: How to save this Flash drive?

Postby cuckooflew » 2020-08-27 17:04

Were you able to successfully copy the entire partition using ddrescue?

Is easy to answer, it is a yes or no question.
And what is the filesystem on that partition?

Is clear, it would even translate clearly in a translator. But since the flash drive is corrupted, maybe it is not possible to know what the file system is on that partition, however if the flash drive is the OP's, one would think they know what file system is on it.
How ever, this particular entity is not likely to give a straight forward response, it has exhibited bot like behaviour in many of it's other posts, but of course denies being a bot,..in any event, you might want to review all the posts made by hack3rcon and then if you still want to continue, all I can say is Good Luck !
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to save this Flash drive?

Postby pcalvert » 2020-09-02 14:54

Most flash drives have a FAT32 filesystem. So if you didn't reformat it with a new filesystem, the file system on that flash drive is most likely FAT32.

Phil
“Property is the fruit of labor; property is desirable; it is a positive good
in the world. That some should be rich shows that others may become
rich, and hence is just encouragement to industry and enterprise.”
— Abraham Lincoln
pcalvert
 
Posts: 1902
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: How to save this Flash drive?

Postby cuckooflew » 2020-09-02 17:38

Also, the life of a flash drive is NOT eternal, sometimes it is best to just accept reality , and get a new one. It is also wise to keep a back up/copy of the one with important data, update the backup regularly , so when the old flash drive fails, and they inevitably do , when it fails , you have a copy of it. They usually do not give any warning before failing.
Post by hack3rcon » 2020-08-01 08:45
Hello,
I have a flash drive that I can't copy files from it because it detached suddenly.

This is perhaps the most common cause of a "premature death", of the flash drive.
I learned my lesson when one of mine got "pulled", by accident, and I never was able to get it to work again. I did manage to get most of the data off of it, but I consider myself lucky on that. maybe it wasn't just luck : 'ddrescue' was my friend, :
Code: Select all
man ddrescue
:DDRESCUE(1)                      User Commands                     DDRESCUE(1)

NAME
       ddrescue - data recovery tool

SYNOPSIS
       ddrescue [options] infile outfile [mapfile]

DESCRIPTION
       GNU ddrescue is a data recovery tool. It copies data from one file or
       block device (hard disc, cdrom, etc) to another, trying to rescue the
       good parts first in case of read errors.

       Always use a mapfile unless you know you won't need it. Without a
       mapfile, ddrescue can't resume a rescue, only reinitiate it. Be careful
       to not specify by mistake an old mapfile from an unrelated rescue.

       NOTE: In versions of ddrescue prior to 1.20 the mapfile was called
       'logfile'. The format is the same; only the name has changed.

       If you reboot, check the device names before restarting ddrescue.
       Don't use options '-F' or '-G' without reading the manual first :


'
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: How to save this Flash drive?

Postby Bulkley » 2020-09-02 17:51

cuckooflew wrote:Also, the life of a flash drive is NOT eternal, sometimes it is best to just accept reality , and get a new one.


True but you reminded me . . . Years ago I lost a USB stick. A couple days later I found it on our garage floor in a puddle of water. Yes, I had driven over it. It was in pieces but the little circuit board was intact. I dried it out and reassembled it using tape to hold it together. It worked and I still use it.

Nobody here will want to read this but I have often found that the easiest way to rehabilitate a flash drive is to stick it into a Windows machine and do a quick format. Of course I lose any info on it but I don't use flash drives for secure storage.
Bulkley
 
Posts: 5991
Joined: 2006-02-11 18:35

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable