Wednesday 12 June 2013

Better Method of Last Resort by mmueller

There is a better "method of last resort" than the one mentioned in Kyle Rankin's excellent article in the March 2009 issue titled, "When disaster Strikes: Hard Drive Crashes".

If you can't mount a ddrescue image, but need to retrieve documents, photographs, PDF files and so on, you can use a nifty program called foremost. It is available for most *nix  platforms, and on Windoze via cygwin. Foremost scans through a hard drive image, mountable or not, and looks for recognizable file headers. It understands more than 20 popular file headers, including jpg, pdf, doc, xml and so on. When it finds these files, it dumps them out as usable files. It is truly a thing of beauty. The first time you use it, you will just sit back in amazement. For example, if you have a hard drive image named my_hd_image.dd that was made with one of the dd utilities, you could execute the following command:

~$   foremost -t all -i my_hd_image.dd


After the command executes, a subdirectory will be created that has all of the recovered files, organized neatly by file type. On Ubuntu, you can get foremost by typing:

~$   sudo apt-get install foremost

This tool is also excellent for recovering deleted files from USB drives and more. Enjoy! Love your magazine!


Source:   Linux Journal
                 JUNE 2009 ISSUE 182
                 LETTERS Column Page 12