Short bio: Computer Scientist, FOSS supporter (read more)
Tux Machines (TM)-specific
Sometimes you can craftily restore a damaged master boot record after an all night hack-a-thon. With proper care, restoration software, and carefully maintained backups it usually isn't necessary to read data raw off a partition.
But even with the best recovery systems in place accidents can still happen. When you've written over the MBR of your system after deleting it during a 4AM coding marathon more drastic measures than a backup restore are called for. Enter Foremost.
Foremost is a simple program designed by Special Agents Kris Kendall and Jesse Kornblum of the United States Air Force Office of Special Investigations. It's also one of the only easy to use and completely free pieces of data recovery software of it's kind that I've come across. Since it's released by the US government there is no copyright.
Using Foremost, data can be recovered from any available disk. This includes hard drive images created using dd or similar archiving utilities. Data integrity is assured through the permissions used on files and directories when they're written out. Since file systems can be accidentally tampered with, or hardware can be further damaged through use, pulling a backup of a file system before attempting recovery is always a good idea.