PDA

View Full Version : [PORT] Testdisk & Photorec


linuxeventually
11-08-2009, 07:54 AM
Surprised this hadn't been ported yet.

Testdisk is useful for recovering missing partitions (particularly if the partition table has been wiped).

http://p7230.homelinux.com/os2008/images/testdisk.png

Photorec is useful for recovering individual files from deleted file-systems and etc.

http://p7230.homelinux.com/os2008/images/photorec.png

INSTALLATION:
1.) Download these packages:

libuuid1 (http://p7230.homelinux.com/os2008/testdisk/libuuid1_1.37-2sarge1_armel.deb) (ver. 1.37)
uuid-dev (http://p7230.homelinux.com/os2008/testdisk/uuid-dev_1.2-1.37-2sarge1_armel.deb)
libncursesw5 (http://p7230.homelinux.com/os2008/testdisk/libncursesw5_5.4-3.osso1_armel.deb)
_^_ Those 3 packages are also available in Maemo Extras Devel
testdisk (http://p7230.homelinux.com/os2008/testdisk/testdisk_6.11-1_armel.deb) (includes photorec)

2.) Become root
$ root
3.) cd to download directory
ex: # cd /home/user/MyDocs/.documents/
4.) # dpkg -i libuuid1_1.37-2sarge1_armel.deb
5.) # dpkg -i uuid-dev_1.2-1.37-2sarge1_armel.deb
6.) # dpkg -i libncursesw5_5.4-3.osso1_armel.deb
7.) Either # dpkg -i testdisk_6.11-1_armel.deb
OR
Open testdisk_6.11-1_armel.deb with Application Manager and install.

INSTALLATION NOTES:

uuid-dev depends on libuuid1 1.37
if libuuid1 ver 1.40 (from Qole) is installed then:

dpkg -r --force-all libuuid1
modify sources.list and comment out Qole's repository (use #)
apt-get update
apt-get install libuuid1
apt-get install uuid-dev


USE:

Maximize osso-xterm, reduce text size to fit (if font size is 16 pt, then click "zoom out" key 4 times or so) as needed. Or use ROXterm.

# testdisk
If it says "TestDisk needs 24 lines to work. Please enlarge the terminal" then you need to further reduce the text size.

# testdisk
it should now ask to create, append or quit logging. Select create.

it should now say no harddisk found (bug with tablet SD card detection)

# cd /media/mmc1

# testdisk /dev/mmcblk0

(or # cd /media/mmc2 && testdisk /dev/mmcblk1)

substitute in device name as appropriate.

The same applies to photorec:

# photorec /dev/mmcblk*
Select partition (cursors keys and enter)
Select Intel partition table scheme
Select filesystem type
Select filesystem group

Now presented with files in directory
If wish to save to CDed directory press Y, if not press N to quit.
To navigate directories use left (back) and right (next) cursor keys.

P.S.
I'd also like to add that I found half a dozen songs on my SD card using photorec the other day that I had never seen before. No idea how or when they had been on the card but creeped out none-the-less.

silvermountain
11-09-2009, 01:41 AM
Very exciting to see photorec ported.
Any plans on getting this into the Extras repo?

silvermountain
12-01-2009, 07:39 PM
Photorec was a 'life-saver' the other day :)

linuxeventually
12-01-2009, 08:31 PM
Awesome. =D

and yeah I never got around to getting it into Extras because when I tried autobuilder spit out a long error and that's annoying.

KristianW
06-18-2010, 01:55 PM
Testdisk also runs nicely under Easy-Debian.
( Just "apt-get install testdisk" as root in the chroot X Terminal.)
Might, for some, be an easier way.

It saved me a corrupt USB stick.