LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-03-2014, 10:21 PM   #1
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Rep: Reputation: 3
Need to recover data from flash drive, seen as "sdb", testdisk doesn't see it. Help?


Device is 16GB PNY Flash Drive.

udev info can be seen here. dmesg shows the following when the drive is plugged in:
Code:
[40430.372212] device-mapper: uevent: version 1.0.3
[40430.372331] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
[41198.086746] usb 1-5: USB disconnect, device number 17
[41201.144127] usb 1-5: new high-speed USB device number 21 using ehci_hcd
[41201.276447] usb 1-5: New USB device found, idVendor=048d, idProduct=1167
[41201.276455] usb 1-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[41201.276980] scsi22 : usb-storage 1-5:1.0
[41202.276880] scsi 22:0:0:0: Direct-Access     XXXXXXXX U167CONTROLLER   0.00 PQ: 0 ANSI: 2
[41202.278258] sd 22:0:0:0: Attached scsi generic sg3 type 0
[41202.280954] sd 22:0:0:0: [sdb] Attached SCSI removable disk
I've tried using testdisk to scan the drive but the program doesn't see the device. It sees the other devices I have connected, /dev/sda*, /dev/sr0, and /dev/sr1, but no /dev/sdb.

I'm at a loss. Can any one help me here? I'd appreciate it greatly.
 
Old 02-03-2014, 10:28 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866
What do you mean with "Testdisk doesn't see the device"? Whch error messages do you get?
 
Old 02-03-2014, 11:45 PM   #3
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
I don't get an error message. I run testdisk (as root), in the list of devices there is /dev/sda, /dev/sr0/, and /dev/sr1 in the "Select a media" menu. The device is seen as sdb by my system (see last line of dmesg).
 
Old 02-04-2014, 03:34 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866
What do you get when you run it this way?
Code:
testdisk /dev/sdb
If it still can't see the device I would recommend to make an image from the USB device using dd and using Testdisk on that image.
 
Old 02-04-2014, 04:16 AM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,057
Blog Entries: 1

Rep: Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864
+1 for image the device and testdisk the image.

If the device still has partitions you might image it by partition. Testdisk should cope better with partitions since it wont have to filter MBR plus partition data to get to what you're trying to recover. Plus you don't have to be root to scan the image of the device.

The device should show up in /proc/partitions. If it doesn't you have other things in play. I've had trouble with using multiple usb storage devices on the same usb bus, so you might have to fiddle a bit if it's not the only device of it's type in use.

$ cat /proc/partitions
 
Old 02-04-2014, 05:14 PM   #6
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by TobiSGD View Post
What do you get when you run it this way?
Code:
testdisk /dev/sdb
If it still can't see the device I would recommend to make an image from the USB device using dd and using Testdisk on that image.
Running "testdisk /dev/sdb" returned "Unable to open file or device /dev/sdb"

Imaging a drive is usually my first step in recovering drives: work from the image so you don't fuck up the original. But unfortunately that wasn't possible this time. I've tried taking an image with dd, but it kicked back "dd: opening '/dev/sdb': No medium found".

Quote:
Originally Posted by Shadow_7 View Post
$ cat /proc/partitions
The device doesn't show in /proc/partitions. All that comes up is:

Code:
11 0          2 sr0
 8 0  156290904 sda
 8 1     498688 sda1
 8 2    7812096 sda2
 8 3  145995776 sda3
 8 4    1982464 sda4
Now what's the next step if all these things fail?
 
Old 02-04-2014, 05:18 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866
Professional data recovery companies. Or just throw it into the trashcan and let it be. If not even dd can read it you will have to find a hardware solution, which is usually out of range for anyone but the professionals.
 
Old 02-04-2014, 05:29 PM   #8
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
This is a typical flash drive failure, it fails instantly without possibility of recovery ... except of course for professional services who will have to disassemble it and try to get the data back.

Now the question is how important was this data, or how much are you willing to pay to get it back.

For sure don't throw it away just yet. Before throwing it away, there is one more possibility that would be interesting to try, but only right before throwing it away as it is experimental.
 
Old 02-04-2014, 05:51 PM   #9
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by TobiSGD View Post
Professional data recovery companies. Or just throw it into the trashcan and let it be. If not even dd can read it you will have to find a hardware solution, which is usually out of range for anyone but the professionals.
Quote:
Originally Posted by metaschima View Post
This is a typical flash drive failure, it fails instantly without possibility of recovery ... except of course for professional services who will have to disassemble it and try to get the data back.

Now the question is how important was this data, or how much are you willing to pay to get it back.

For sure don't throw it away just yet. Before throwing it away, there is one more possibility that would be interesting to try, but only right before throwing it away as it is experimental.

Well I'm a standard IT contractor, and have been wanting to go into professional level data recovery, but this is kinda my first exposure to what would be considered professional level data recovery.

So what is the next step a professional service would take? Or, what would be the next experimental step?
 
Old 02-04-2014, 07:04 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866Reputation: 4866
A professional would now check the controller on the Flash device and its firmware (if such exists) for errors and possibly replace it. If the controller is OK it is very likely that the Flash memory itself is defective, in which case a recovery would not be possible.
 
Old 02-04-2014, 07:19 PM   #11
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
There are a few possibilities.

The best choice is to get a professional service to do it. To see what is done during this procedure see:
http://card-recovery.biz/us/service.php
(Take note of the infrared heating in one of the videos)

The other choices are experimental and up to you. You could use an Arduino to do it yourself, assuming you know how and write the software.
http://forum.arduino.cc/index.php/topic,22428.0.html
Note that they recommend a professional service as well.

-------
The last, and I mean LAST option is the experimental one and may destroy the data if not done properly. It does involve heating the flash chip in order to try and repair it, assuming it is what is faulty. Also see:
http://www.bbc.co.uk/news/technology-20579077
WARNING: Do NOT try this unless you have no other options, as it may not work and may destroy the data if the heat is high. Note that the infrared heater that professionals use is specifically calibrated for the task, and other devices are not. For sure don't leave any plastic or meltable materials on the chip.

I have used this last option, but only to refurbish a broken flash drive, NOT to recover data, so there are no guarantees.

Last edited by metaschima; 02-04-2014 at 07:20 PM.
 
Old 02-04-2014, 08:41 PM   #12
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by TobiSGD View Post
A professional would now check the controller on the Flash device and its firmware (if such exists) for errors and possibly replace it. If the controller is OK it is very likely that the Flash memory itself is defective, in which case a recovery would not be possible.
Ok, and the method for checking the controller I'm assuming varies between devices?

Quote:
Originally Posted by metaschima View Post
There are a few possibilities.

The best choice is to get a professional service to do it. To see what is done during this procedure see:
http://card-recovery.biz/us/service.php
(Take note of the infrared heating in one of the videos)

The other choices are experimental and up to you. You could use an Arduino to do it yourself, assuming you know how and write the software.
http://forum.arduino.cc/index.php/topic,22428.0.html
Note that they recommend a professional service as well.

-------
The last, and I mean LAST option is the experimental one and may destroy the data if not done properly. It does involve heating the flash chip in order to try and repair it, assuming it is what is faulty. Also see:
http://www.bbc.co.uk/news/technology-20579077
WARNING: Do NOT try this unless you have no other options, as it may not work and may destroy the data if the heat is high. Note that the infrared heater that professionals use is specifically calibrated for the task, and other devices are not. For sure don't leave any plastic or meltable materials on the chip.

I have used this last option, but only to refurbish a broken flash drive, NOT to recover data, so there are no guarantees.

After reading through the arduino forum post you linked to, it seems I may be able to attempt swapping the controller or the memory chip. If they are from the same series of drives, but many years apart in manufacture date, would I still be able to swap the parts?
 
Old 02-04-2014, 09:43 PM   #13
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
You could probably swap the controller for the exact same size and brand of device. If they updated versions over the years then there might be incompatibility. It's worth a shot if the data is important and if the controller is what is bad, and if you're good at soldering.

I say check the prices for professional recovery first.
 
Old 02-05-2014, 11:04 AM   #14
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,057
Blog Entries: 1

Rep: Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864
Depending on the distro, it's possible that the usb-storage module didn't load and doesn't auto load. Ubuntu was like that in the 10. and 11. days if you didn't run the default wm and didn't fork to a wm specific flavour of ubuntu. But if you have other usb sticks that work perfectly fine, then that's probably not the case. If it's working you should see at least the /dev/sd? entry for it in /proc/partitions. Along with dmesg entries about the usb change upon insertion.
 
Old 02-07-2014, 01:23 AM   #15
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by metaschima View Post
You could probably swap the controller for the exact same size and brand of device. If they updated versions over the years then there might be incompatibility. It's worth a shot if the data is important and if the controller is what is bad, and if you're good at soldering.

I say check the prices for professional recovery first.
The prices of pro services are a bit out of budget for the person I'm doing this for. I can run the risk by them regarding me opening this up, get them to sign a "if your data gets lost it's not my fault" form, and see if they want me to go ahead with it.

Quote:
Originally Posted by Shadow_7 View Post
Depending on the distro, it's possible that the usb-storage module didn't load and doesn't auto load. Ubuntu was like that in the 10. and 11. days if you didn't run the default wm and didn't fork to a wm specific flavour of ubuntu. But if you have other usb sticks that work perfectly fine, then that's probably not the case. If it's working you should see at least the /dev/sd? entry for it in /proc/partitions. Along with dmesg entries about the usb change upon insertion.
Definitely isn't the problem, I've had several usb storage devices used during the time I've been troubleshooting this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Recover Data and Partitions for Free with TestDisk LXer Syndicated Linux News 0 05-20-2011 10:00 AM
"ignoredisk --drives=sdb etc" kickstart option doesn't work when re-installing RHEL 5 thechic Linux - Enterprise 2 06-01-2010 06:57 AM
recover data after running "dd if=/dev/zero ..." for a few seconds... Heeelp! ste85 Linux - Newbie 19 03-20-2009 09:04 PM
GCC option "-fshared-data" doesn't work jph Programming 0 08-05-2003 05:39 AM
GCC option "-fshared-data" doesn't work jph Linux - General 0 08-05-2003 02:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration