Page 1 of 3

TestDisk & PhotoRec

Posted: Fri 25 Apr 2008, 09:11
by aragon
Reading ravensrest post http://murga-linux.com/puppy/viewtopic.php?t=28353 i thought this might be a nice pet (also the binaries run without compiling)

TestDisk & PhotoRec 6.11.3
HP: http://www.cgsecurity.org/wiki/TestDisk

- Testdisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.

- PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has been severely damaged or reformatted.

The Package contains BOTH apps, although named only testdisk.

After installing simply start them with testdisk and photorec from a terminal.
The full doku is at http://www.cgsecurity.org/wiki/TestDisk#Documentation

these are packaged static applications.

Cheers
aragon

Posted: Fri 25 Apr 2008, 11:13
by Dingo
linked and mirrored testdisk on dokupuppy, but photorec where is?
http://puppylover.netsons.org/dokupuppy ... very_tools

Posted: Fri 25 Apr 2008, 11:18
by disciple
Just to clarify: Testdisk tries to recover partitions that have been deleted or something, and photorec tries to recover files that have been deleted or something.
Dingo - did you look in the package? It probably has both.

Posted: Fri 25 Apr 2008, 11:39
by aragon
hi dingo, hi disciple,

the package contains both tools.

the clarification is needed, i will correct the post.

cheers
aragon

Posted: Wed 06 Aug 2008, 11:23
by reborn
Thankyou very much for this .pet, I'd been searching everywhere for this utility. The XP version helped me recover my xp mbr/partition table and the partition table of one of my USB hard drives, I will now hopefully recover my second hard drive with Linux Mint on it. Due to fat finger syndrome I selected write to mbr instead of the partition :?

I'd previously installed Vista on the second drive and uninstalled, formatted, and let Linux Mint do all the partitioning. On boot up I had no operating system found - so, after booting into Macpup and a bit of googling (not much fun on your own :lol: ), I came across this site http://tinyempire.com/notes/ntldrismissing.htm and downloaded fixntldriso.zip (floppy & USB versions available), unzipped and burnt the ISO. Rebooted and using fixntldr's first option - XP back again :D . Followed the instructions to copy boot.ini, ntldr & ntdetect.com from the CD to C:/, great I thought - rebooted - no operating system found :shock: .

So I booted from the fixntldr CD again, booted great. I decided it must be a mbr problem, that's when I came across Testdisk for Windows & other OS's at
http://www.cgsecurity.org/wiki/TestDisk_Download XP working 'perfectly' (wrong word, I know) again. I used it to replace the mbr with a backup I didn't know was there and then fix the partition tables. Testdisk has far more capabilities than I've mentioned, unfortunately I don't understand alot of them! (yet)

I tried recovery console, fixmbr various recovery disks and other suggestions to no avail. I also ran chkdsk on C:/ and the USB hard drive which corrected a few others.

I'm now going to try the Puppy Linux version. At the site above the latest release is 6.10, which I've downloaded, thinking I could update the .pet I've installed. Having looked in the .tar.bz file I realise I have a way to go before I could do that! Is it possible to just unzip it and execute it?

reborn

Posted: Wed 06 Aug 2008, 12:50
by aragon
hi reborn,

yes, as i mentioned in the first post, these are precompiled binaries. you can run them by just unzipping.

good luck with your partition.

cheers
aragon

Posted: Thu 07 Aug 2008, 19:07
by reborn
Update: Testdisk for Linuxdidn't achieve the repair that I'd hoped. My second hard drive is still inaccessable from Windows file system - not showing up in FreeCommander. It is showing in the bios (and at bootup), it's even showing in device manager. The drive shows ok in Linux (sdb1 - ext3 & sdb5 - swap) - the swap is used by Muppy (which I'm trying right now)

In Testdisk it showed at location 0 ext3 and at location 0 NTFS (When searching with vista allowed) The two 0's are not a typo. I tried fsck and that said device busy while trying to open /dev/sdb Filesystem mounted or opened exclusively by another program.

I have tried several methods to recover the mbr, Ubuntu LiveCD, #sudo ms-sys -m /dev/sdb, reported that it had done it but no joy - various utilities on hiren's bootdisk.

At the moment Puppy can have a 60gb swapfile! - roll on the new computer..

reborn

Posted: Thu 18 Sep 2008, 14:45
by aragon
updated to 6.10

see main post.

cheers
aragon

Posted: Wed 26 Aug 2009, 10:36
by aragon
updated to 6.11

see main post.

cheers
aragon

Posted: Thu 22 Apr 2010, 08:19
by aragon
updated to 6.11.3. see main post.

aragon

Posted: Thu 22 Apr 2010, 11:23
by chrome307
Thank you Aragon for updating this application :)

This is a great utility to have to repair/recover files and easy to use.

A 'must have' application !!

Posted: Thu 22 Apr 2010, 13:49
by jemimah
I've been looking for something like this to add to Puppeee for a while. Thanks!

Posted: Thu 22 Apr 2010, 17:09
by aragon
jemimah wrote:I've been looking for something like this to add to Puppeee for a while. Thanks!
jemimah,

you might also want to have a look at ddrescue http://www.murga-linux.com/puppy/viewtopic.php?t=33521

aragon

Posted: Thu 22 Apr 2010, 17:37
by jemimah
Yeah, it needs something to put in the menu so users know it's there. A link to the documentation maybe.

Edit: Hmm, I see there's a gddrescue GUI frontend. I will try to compile it.
Edit: Nevermind, it's not a gui, I was confused. :?

Posted: Thu 22 Apr 2010, 18:22
by jemimah
The filesize of testdisk and photorec is much smaller if you build from source rather than using the static binaries. I just built it on Puppeee with no problems.

Posted: Fri 23 Apr 2010, 09:44
by aragon
jemimah wrote:The filesize of testdisk and photorec is much smaller if you build from source rather than using the static binaries. I just built it on Puppeee with no problems.
thanks for the info, will try to compile on std-4.31.

aragon

Posted: Tue 24 Aug 2010, 06:03
by disciple
Hi Aragon,
I didn't realise you were maintaining a package. Thanks for that.

It would be good if you could edit the first post again. My earlier clarification is now out-of-date:

Photorec still tries to recover all the files on a partition by looking for chunks of data ("signature" based file recovery).
But as well as recovering partitions, Testdisk can now recover specific files from FAT/NTFS/ext2 partitions by looking for deleted files in the FAT or whatever the filesystem index is called. See:
http://www.cgsecurity.org/wiki/TestDisk ... e_for_NTFS
http://www.cgsecurity.org/wiki/TestDisk ... le_for_FAT
http://www.cgsecurity.org/wiki/TestDisk ... e_for_ext2

So usually you would now want to try undeleting with testdisk before using photorec.

Posted: Fri 19 Nov 2010, 12:37
by chrome307
Hi Aragon

Are you still maintaining this useful application?

If so, there is a Beta version available:

Test Disk 6.12-WIP ( October 2010 )

There are versions available on their website:
http://www.cgsecurity.org/wiki/TestDisk_Download

Linux, kernel 2.6.x i386/x86_64
Linux, kernel 2.4.x i386/x86_64

I'm using Puppy Linux 4.31, so kernel 2.6x would be great.

Posted: Fri 19 Nov 2010, 13:06
by aragon
chrome307 wrote:Hi Aragon

Are you still maintaining this useful application?

If so, there is a Beta version available:

Test Disk 6.12-WIP ( October 2010 )

There are versions available on their website:

http://www.cgsecurity.org/wiki/TestDisk_Download

Linux, kernel 2.6.x i386/x86_64
Linux, kernel 2.4.x i386/x86_64

I'm using Puppy Linux 4.31, so kernel 2.6x would be great.
Hi Chrome307,

yes i saw that but won't make a pet of the beta. i will do, when 6.12 is stable.

if you want to test the 6.12 beta, it's not diffcult. download the precompiled package and extract it. there should be a subdir called linux, where you will find the precomiled binaries

- photorec_static
- testdisk_static

if you copy those to your PATH, you're done.

aragon

Posted: Fri 19 Nov 2010, 13:30
by chrome307
OK, thanks for the instructions on how to use the new beta version.

I've used this application twice on HDD's and it's saved my life, once when I had accidentally formatted my HDD to use it for a frugal install for Puppy. It just 'works' :)

Regards