LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Need to recover data from flash drive, seen as "sdb", testdisk doesn't see it. Help? (https://www.linuxquestions.org/questions/linux-hardware-18/need-to-recover-data-from-flash-drive-seen-as-sdb-testdisk-doesnt-see-it-help-4175493634/)

slacker_ 02-03-2014 10:21 PM

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.

TobiSGD 02-03-2014 10:28 PM

What do you mean with "Testdisk doesn't see the device"? Whch error messages do you get?

slacker_ 02-03-2014 11:45 PM

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).

TobiSGD 02-04-2014 03:34 AM

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.

Shadow_7 02-04-2014 04:16 AM

+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

slacker_ 02-04-2014 05:14 PM

Quote:

Originally Posted by TobiSGD (Post 5111092)
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 (Post 5111115)
$ 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?

TobiSGD 02-04-2014 05:18 PM

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.

metaschima 02-04-2014 05:29 PM

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.

slacker_ 02-04-2014 05:51 PM

Quote:

Originally Posted by TobiSGD (Post 5111574)
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 (Post 5111583)
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?

TobiSGD 02-04-2014 07:04 PM

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.

metaschima 02-04-2014 07:19 PM

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.

slacker_ 02-04-2014 08:41 PM

Quote:

Originally Posted by TobiSGD (Post 5111640)
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 (Post 5111652)
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?

metaschima 02-04-2014 09:43 PM

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.

Shadow_7 02-05-2014 11:04 AM

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.

slacker_ 02-07-2014 01:23 AM

Quote:

Originally Posted by metaschima (Post 5111719)
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 (Post 5112134)
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.


All times are GMT -5. The time now is 05:58 PM.