How to repair Pen Drive, USB flash memory, SD, MMC, Memory Stick, etc.,

Surely one of you has been a shock when they failed to flash memory (either USB, Pendrives, Secure Digital, MemoryStick, MMC, MP3 player and / or Mp4, etc..), Some of the common faults is that The memory is not listed among the devices, says that is not formatted, or double click My Computer does not open, here I will try to give solutions for each of these cases, if your case is different expose it in the comments and try to solve in future articles, it is also important to know that not all cases have a successful solution, but there is a 98% chance that if they can be.
Flash Memory 

Case 1: The report appears in My Computer but says that is not formatted

The simplest solution is to use a program called HP USB Disk Format Tool Stogare, you can download from here . What you do is install the software (Windows only) and run it, then format the memory, this will erase all data and can not be recovered.

Case 2: Memory only works when you press a little or ladeas inward

This is mainly due to a loose wire in the memory, so you have to do in this case is to solder the cable or connector is loose, you have to open your memory, to see a full tutorial for this if you can see in this paper: revive flash .

Case 3: The memory is wet with sea water

This is very common when you go to the beach and bring your camera, you'll fall and get wet, for SD, MMC, Memory Stick and Compac Flash.
  1. Let it dry.
  2. Submerge in fresh water for approximately 2 hours (to dilute the salts).
  3. Remove the outer case (however small it may seem).
  4. Back to soak the circuit (yes, complete with chips).
  5. Leave on paper towels to remove moisture (this process should take several hours to rule out any short-circuit).
  6. Place it carefully on the card reader and hopefully will work again!

Case 4: Missing driver

Just look for the driver (driver) that corresponds to the make and model of your memory, for example to Kingston looking for here , for Transcend search here for Sony MicroVault search here for SanDisk search here , other brands (Memorex, Samsung, etc) using Google .

Case 5: Unrecognized USB device in Windows Vista and XP

  1. Find a computer with Windows 98 and install the driver for your memory.
  2. When Windows 98 recognizes it, support the information.
  3. Formatted as FAT32 on your memory.
  4. Done with luck and work on all systems.

Case 6: If the above cases do not work

-Using Linux to fix a broken USB 

If you could retrieve some information that was very important in a USB did not work under Windows (of course, where he was going to use if not?). The case that led to several computer stores where even proved it with an operating system called Linux gurus nothing, got nothing out of it.
 
However, the USB could be read in its entirety, so I thought that something could sharpen. First I took all the information I could USB:
 
 dd if = / dev / sda of = file 
 
Using hexdump or od I realized that the first 0 × 20000 bytes 0xFF were made, so it seemed that the USB had failed just where they should not fail: the partition table, boot sector and FAT. An album that's almost impossible to recover, except perhaps if you can recall one of the two leading FAT disk. I searched by hand and saw that the first FAT was incomplete but the second could be intact:
 
 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
 *
 00020000 01 df df 02 df 03 04 df 05 df 06 df 07 df 08 df |................|
 00020010 09 df df 0a 0b 0c df df df 0d 0e 0f df df 10 df |................|
 00020020 11 df df 12 df 13 14 df 15 df 16 df 17 df 18 df |................| 
 
Looking for the string 01 df 02 df forward discovered that repeated: the second copy of the FAT. Moreover, the difference between the two occurrences was 0 × 1F400 bytes. To find where it starts, you can find the symbol ff ff ff f8. And I found it to 0 × 23600. By subtraction, so I assumed that the first FAT starting at 0 × 23600-0 × 1F400 = 0 × 4200.
So in principle, copying sections of the second to the first FAT (250 sectors of 512 bytes in total) I can rebuild the FAT. I back the file in the fichero.bak and use dd:
 
 dd if = fichero.bak of = file bs = 512 seek = 33 skip = 283 count = 250 conv = NoCreate, notrunc

This is copied from the sector 283 (the 0 position 23600) to the sector 33 (position 0 × 4200) 250 sectors, which is the size of the FAT. This gives us information on how many sectors will be initially reserved the FAT16 file system.
 
Now, how many elements has the root directory? If you remember the FAT format, a number of sectors reserved at first, the two FATs (for all we know the size) and the root directory, whose size is also specified in the boot sector ... How is that size? It was not known. We had to find out. By going to the root directory find this at the beginning:
 
 00042a00 42 4c 4f 51 55 45 53 20 20 20 20 11 00 2e a5 56 | BLOCK .... V |
 00042a10 34 54 f1 35 f1 00 00 2f 56 34 02 00 00 00 00 00 | .4T5../V.4 ......|
 00042a20 e5 4f 4f 54 45 58 20 20 4c 4f 47 20 00 17 87 81 |. OOTEX ....| LOG
 00042a30 54 35 58 35 00 00 88 81 54 35 d7 00 50 06 00 00 | T5 T5X5 .... .. P. .. |
 00042a40 e5 4f 45 44 4f 4d 52 20 4c 44 57 f0 2b 10 February a3 |. OMEDOR ..+..| DWL
 00042a50 57 35 57 35 00 00 24 a6 57 35 8b 1d 41 00 00 00 | W5W5 .. $. .. A. .. W5 |
 00042a60 44 45 54 41 4c 4c 45 53 20 20 20 10 00 4f 30 56 | DETAILS .. O0V |
 00042a70 f1 34 1f 35 f1 00 00 31 56 34 25 02 00 00 00 00 | .4.5 .. 1V.4 %.....| 
Perfect, directory entries. What is the last meeting and count. I did this and did not work. The problem is that right after the root had another directory, and did not know exactly where it ended.
So I got the idea to search for special files "." And "..". Only have a subdirectory, which would give me the last entry in the directory. Bingo!:
 
 00048000 2e 20 20 20 20 20 20 20 20 20 20 10 00 2e a5 56 |.  .... V |
 F1 34 00048010 34 00 00 2f f1 56 f1 34 02 00 00 00 00 00 | .4.4../V.4 ......|
 00048020 2e 2e 20 20 20 20 20 20 20 20 20 10 00 2e a5 56 | ..  .... V |
 F1 34 00048030 34 00 00 2f f1 56 f1 34 00 00 00 00 00 00 | .4.4../V.4 ......| 
So the root has size 0 × 42a00 - 0 × 48000 in entries of 32 bytes, ie, 688 entries. We have all the data.
Needing a boot sector for the partition, I created a file of the same size as the USB pen:
 
 dd if = / dev / zero of = valid bs = 512 count = 1024000 
And then I formatted it with the data we have obtained:
  
 mkfs.msdos-s 16-R 33-r 688 valid 
16 sectors per track, 33 sectors and 688 reserved tickets in the root directory. Finally I have to copy the boot sector, which is in the first 512 bytes.
 
 dd if = worth of = file bs = 512 count = 1 conv = NoCreate, notrunc 
Now I can mount the file:
 
 mount file / mnt-o loop 
After doing some tests to precisely adjust the parameters, I consegir recover much of the information from the USB stick. Of course some have been lost, because these failures usually occur because of errors in the USB memory banks, but it's something.
 
For the record, that I've tried several utilities to recover file systems and none have worked. They were able to see all these subtleties. This brings to mind two things, basically:
 
* It would be interesting to offer these services to companies or individuals who request it.
* Linux is a marvel :) and allowed to recover information from a USB, as Windows and other specialty shops in Computing, the only thing worth was to throw it away.

0 comments:

Post a Comment