Home > In General > How to retrieve data after experiencing read errors on a USB stick

How to retrieve data after experiencing read errors on a USB stick

So I figured I’d post this handy piece of info. Ever have to copy data from a USB stick and run into read errors.  I just did :(

So aside from the fact I have some shitty USB keys, I really needed to save the data on this 4GB stick. I was able to retrieve the whole partition using gddrescue.  You can grab it from Ubuntu ppa..

sfeole@sfeolework:~$ apt-cache policy gddrescue
gddrescue:
Installed: 1.14-1
Candidate: 1.14-1
Version table:
*** 1.14-1 0
500 http://us.archive.ubuntu.com/ubuntu/ oneiric/universe amd64 Packages
100 /var/lib/dpkg/status

Read more about it here:

http://www.gnu.org/software/ddrescue/ddrescue.html

So by carrying out the following I was able to pull the partition off my USB stick, this copies the data block for block.

sfeole@sfeolework:~$ time sudo ddrescue -r3 -f /dev/sdb my4gusb.img
Press Ctrl-C to interrupt
rescued: 4012 MB, errsize: 0 B, current rate: 18481 kB/s
ipos: 4012 MB, errors: 0, average rate: 17958 kB/s
opos: 4012 MB, time from last successful read: 0 s
Finished

real 3m43.060s
user 0m0.308s
sys 0m13.773s

From here I was able to use a fresh new USB stick and DD my image back.

sfeole@sfeolework:~$dd if=my4gusb.img of=/dev/sdb

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 163 other followers

%d bloggers like this: