TestDisk & PhotoRec

Miscellaneous tools
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

TestDisk & PhotoRec

#1 Post 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
Last edited by aragon on Fri 19 Nov 2010, 13:09, edited 6 times in total.

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#2 Post by Dingo »

linked and mirrored testdisk on dokupuppy, but photorec where is?
http://puppylover.netsons.org/dokupuppy ... very_tools
Last edited by Dingo on Sun 22 Jun 2008, 14:38, edited 1 time in total.
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post 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.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#4 Post by aragon »

hi dingo, hi disciple,

the package contains both tools.

the clarification is needed, i will correct the post.

cheers
aragon

reborn
Posts: 35
Joined: Wed 30 Jul 2008, 07:44
Location: Turgutreis, Turkey

#5 Post 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

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#6 Post 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

reborn
Posts: 35
Joined: Wed 30 Jul 2008, 07:44
Location: Turgutreis, Turkey

#7 Post 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

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#8 Post by aragon »

updated to 6.10

see main post.

cheers
aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#9 Post by aragon »

updated to 6.11

see main post.

cheers
aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#10 Post by aragon »

updated to 6.11.3. see main post.

aragon

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#11 Post 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 !!

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#12 Post by jemimah »

I've been looking for something like this to add to Puppeee for a while. Thanks!

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#13 Post 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

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#14 Post 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. :?

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#15 Post 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.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#16 Post 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

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#17 Post 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.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#18 Post 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.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#19 Post 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

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#20 Post 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

Post Reply