Posts Tagged ‘undelete’

How to recover deleted files from Windows with Knoppix

Sure, lots of tools are out there that will do just that, but they mostly suffer from two major problems:

  • Many are not free.
  • Installing the software to recover your files will most probably overwrite some of the files that were needing recovery in the first place, rendering the whole operation pointless.

Here’s what I did to recover a friend’s photos from an accidental recycle bin emptying.

1. Download and burn a CD of Knoppix (I used 5.1.1). With this, we’ll be able to boot to a completely seperated operating system and access the files by mounting the hard drive read-only. This way, there is absolutely no chance that our work would corrupt of break the files that we wish to recover.

2. Shutdown the windows computer gracefully if not already. If the machine was suspended or in hibernation, the filesystem will be hard to access via the linux tools. A full shutdown ensures that evreything is properly closed.

3. Boot the Knoppix CD. At the welcome screen, type this command to boot the text only system:

knoppix 2

4. Insert a USB key to copy the recovered files and mount it

mount /dev/sda1 /mnt/sda1

5. You can then view the files available for recovery:

ntfsundelete /dev/hda1

6. To recover all the pictures that are at least 75% recoverable, I used this command:

ntfsundelete -d /mnt/sda1/ -m *.jpg -p 75 /dev/dha1

7. Unmount the key and reboot

umount /dev/sda1
shutdown -h now

Voilà!