If a graphic designer comes up to you…

and it looks like somebody kicked his dog, don’t worry. Knoppix can fix it. I had said GD come up to me and tell me his flash drive wasn’t being recognized by windows on his machine and he had some photo’s on it from a trip last year he hadn’t backed up (lecture on that followed later). He wanted to know if there was anything I could do. I told him to leave the drive with me and I’d see what I could do.

So I popped our trusty friend, Knoppix 5.0.1, into the drive of my work laptop and rebooted. At the knoppix prompt:
knoppix: knoppix 2 dma

This will boot knoppix and dump you onto the console. I plugged the drive in and got a few errors about no partition table, but it was able to recognize the device info. It listed the device as /dev/sda. This led me to believe that the first section of the flash memory had finally died due to extended use (Flash memory does have a finite number of writes before it fails). So the first thing I did, being that it was only 256mb was take a raw dump of the drive to work on. The laptop has enough memory in it that the ramdrive is big enough to hold this. Other options are to the hard drive in the machine if it’s formatted with a FS that knoppix can write to or an external hard drive/flash drive. If you’re writing to a fat32 drive, anything over 2.0gb will be problematic.

root@knoppix# cd /home/knoppix
root@knoppix# dd_rescue /dev/sda rawdump

The first line moved our working directory to the ramdrive, the second one invokes the raw dump. During this time, you will most likely see errors scroll across the screen. Eventually, dd_rescue will get to a good part of the drive, and you will motor through. At this point, we can run photorec on the file.

root@knoppix# photorec rawdump

This will launch photorec and tell it to use the dump we’ve taken from the drive. Follow the onscreen prompts, and it will analyze the dump file looking for files that match the type you specified and put them in a recovery folder. At this point you can copy the recovery folder to a flash drive/hard drive/across the network.

At this point you burn the files to cd, have the graphic designer almost cry, then you lecture them about backing their shit up.

Leave a Reply

Your email address will not be published. Required fields are marked *