Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 26 Oct 2014, 05:57
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
TestDisk & PhotoRec
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 23 Apr 2010, 05:44    Post_subject:  

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

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Tue 24 Aug 2010, 02:03    Post_subject:  

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:_undelete_file_for_NTFS
http://www.cgsecurity.org/wiki/TestDisk:_undelete_file_for_FAT
http://www.cgsecurity.org/wiki/TestDisk:_undelete_file_for_ext2

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

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Fri 19 Nov 2010, 08:37    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 19 Nov 2010, 09:06    Post_subject:  

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

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send_private_message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Fri 19 Nov 2010, 09:30    Post_subject:  

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' Smile

Regards
Back to top
View user's profile Send_private_message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Fri 19 Nov 2010, 14:42    Post_subject:  

The extundelete utility is also worth mention. Testdisk can only recover files from EXT2, for EXT3 and EXT4, you need extundelete.
http://extundelete.sourceforge.net/

(Yes I found this out the hard way). Wink
Back to top
View user's profile Send_private_message Visit_website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11122
Location: Arizona USA

PostPosted: Fri 19 Nov 2010, 23:20    Post_subject:  

aragon wrote:
...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 precompiled binaries

- photorec_static
- testdisk_static

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

aragon

I'm not sure I understand this PATH stuff. Embarassed I'm guessing that if I copy the extracted files into /bin, they will work from a console window that I open by using the ` key in the directory where I want to use them. Do I have that correct?

Edit: Yes, that seems to work. I extracted only the photorec_static and put it in /bin. Then I opened a console and entered photorec --help to confirm that photorec was "installed."

So far I tried photorec on a flash memory stick that got corrupted about a year ago. Photorec seems to have recovered every single file that was on that stick! Amazing! I feel like I got an early Christmas present. Very Happy

The only thing is, I didn't open the console where I ran photorec from in the partition where I wanted photorec to store the recovered files, so Puppy's RAM got filled up. (I run Puppy from multisession DVD, so it's always in RAM.) That's ok.
Back to top
View user's profile Send_private_message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Sat 20 Nov 2010, 04:32    Post_subject:  

Hi Flash,

Yes and no (allways that answer, isn't it?).

PATH is the variable thats holds the dirs, where puppy looks for executables. You could check that with

echo $PATH

from within a terminal.

I also see that my explanation was a little short for the case that you've allready installed photorec before.

You've mentioned. That you've copied photorec_static to /bin and than tested with photorec --help if it's installedm
That could not work correct, because the bin is photorec_static if you haven't renamed it. You should check that.
To be sure you call the correct one you might rename the one you copied to /bin to maybe photorec_new and than check with photorec_new --version.

Hope that helps.

Aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11122
Location: Arizona USA

PostPosted: Sat 20 Nov 2010, 09:13    Post_subject:  

Thanks for the answer, aragon. Turns out I couldn't have been more wrong about everything, as usual. Laughing The reason photorec worked is that it was apparently included in the testdisk .pet I had already installed before I put the photorec_static file in /bin.

If I understand you right, changing the name of the photorec_static file to photorec should make it run when I enter photorec from a console?

By the way, here's the result of entering echo $PATH from a console I opened by clicking the desktop icon:
Quote:
# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/opt/samba/bin
#

Am I right in guessing that those are all the places the console looks when trying to find a command I enter?
Back to top
View user's profile Send_private_message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Sat 20 Nov 2010, 09:49    Post_subject:  

Flash,

Once again yesno...

Your understanding of PATH is correct.

You run a prog with the name you gave it. So if you run photorec you will allways run the prog that' called photorec (which should be the original from the pet i guess). The step i told you with renaming the new copied (the photorec_static) to photorec_new is mandantory, just to be sure you're running the correct (new one) if you wanted to. So you would call the 'old' one with photorec and the new one with photorec_new.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send_private_message 
edoc


Joined: 07 Aug 2005
Posts: 4379
Location: Southeast Georgia, USA

PostPosted: Sat 15 Jan 2011, 12:31    Post_subject:
Sub_title: What do do with Testdisk results?
 

I was trying to use dparted from a USB boot on a netbook with an existing MS version of windows called "7" so that I could resize the partitions and add one or two for a Frugal install of Puppy Linux - Fluppy 011.

Every app I tried, except for gparted, is able to see the NTSF partitions sda1 and sda2 - so I tried gparted from Console and this was the result:

Quote:
#gparted
----------------
libparted: 2.3
----------------

/dev/sda contains GPT signatures, indicating it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted by a program that does not understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?


So then, at Jemimah's suggestion, I tried Testdisk to see if the partition table was damaged and could be repaired.

Testdisk found the following:

Quote:
D HPFS-NTFS 0 1 1 7147 254 63 114832557 [System Reserved]
D HPFS-NTFS 0 32 33 12 223 19 204800 [System Reserved]
D HPFS-NTFS 12 223 20 19457 21 20 312371200 [System Reserved]
D HPFS-NTFS 510 0 1 5609 254 63 81931500 [System Reserved]
D HPFS-NTFS 5610 0 1 19456 254 63 222452055 [System Reserved]
D FAT32 LBA 7148 0 1 13428 254 14 100904216 [TEST]
D FAT32 LBA 13429 0 1 19456 254 43 96839800 [DOS]



If I make the first line anything but "D" then the rest show up in RED as "Structure Bad".

If I leave the first line as "D" I can change lines 2 and 3 to "P" then the last four must also be "D".

Would making those changes be likely to destroy the MS-win.7 install and force me to reinstall MS-win.7 or might it clear up the problems and then be able to use gparted to manage the partitions and get Fluppy 011 installed as Frugal, please?

Thanks!

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send_private_message Visit_website 
edoc


Joined: 07 Aug 2005
Posts: 4379
Location: Southeast Georgia, USA

PostPosted: Sun 16 Jan 2011, 15:00    Post_subject:  

I just tried EFI GPT in Testdisk and got this:
Quote:

TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63
Partition Start End Size in sectors
P EFI System 40 409639 409600 [EFI]
P MS Data 1935760 1941933 6174 [Boot]
P MS Data 1941952 1948125 6174 [Boot]
P MS Data 7049011 7069749 20739 [NO NAME]
P MS Data 24826744 24832917 6174 [Boot]
P MS Data 25031536 25037709 6174 [Boot]
P MS Data 26508043 26528781 20739 [NO NAME]
P MS Data 29633384 29639557 6174 [Boot]
P MS Data 90124649 172056148 81931500
P MS Data 215736885 312576684 96839800 [DOS]


Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
P=Primary D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
FAT32, 209 MB / 200 MiB


WDYT?

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send_private_message Visit_website 
edoc


Joined: 07 Aug 2005
Posts: 4379
Location: Southeast Georgia, USA

PostPosted: Sun 16 Jan 2011, 22:34    Post_subject:  

QUESTION ...

If I am booted in Fluppy 011 via a USB stick and I make changes via Testdisk to the MBR, or anything else about the file structure to fix the aforementioned problem(s), how do I save it and where?

Savefile only goes to the USB stick - I need to write to the HDD - but where (based on what I have posted previously), please?

This seems to be a Catch 22.

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send_private_message Visit_website 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Tue 18 Jan 2011, 10:39    Post_subject:  

Hi edoc,

I'm not an expert on this but because nobody replies to you, I'll try to make some sense out of it.

1. Your machine is a netbook, isn't it? And the version of Windows 7 that you have is 32-bit, isn't it? 32-bit Windows doesn't support GPT partition tables according to Wikipedia - so Testdisk output of GPT partition tables can be ignored.

2. Testdisk output of the normal MBR partition table also doesn't look correct - how come all entries are "D" (=deleted)?

3. Does your laptop runs some kind of encryption software? (e.g. BitLocker, that comes with Windows, or other full-disk encryption like Truecrypt or anything?). Sorry - I can't help you how to check this - I don't run the software myself, but your problem can be caused by these types of software.

4. Can you give me output of "fdisk -l /dev/sda"?
5. Can you do this and upload the file to here?
Code:
dd if=/dev/sda of=/root/sectors bs=512 count=63

The output file will be in /root and the name of the file is "sectors", upload it to here please. (This command will extract the first 63 sectors of your harddisk. The MBR is the 1st sector, the GPT (if it exist) will be on the 2nd sector, and the rest is usually zeros - but if it contain something else, we will know what it is).
No promises I can help, but hopefully we can find something there.

5. If you want to do something write to MBR and afraid of screwing up, backup your disk first. I assume you can boot puppy through USB? If yes, get a USB external harddis of 200GB or more, install puppy on it, and ensure that your netbook can boot from this external harddisk.
Once you can do it, you can backup your entire disk to your USB disk like this:
Code:
dd if=/dev/sda of=/mnt/sdb1/original-disk
assuming your USB harddisk is mounted at /mnt/sdb1.

cheers!

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
edoc


Joined: 07 Aug 2005
Posts: 4379
Location: Southeast Georgia, USA

PostPosted: Wed 19 Jan 2011, 17:04    Post_subject:  

Quote:
# fdisk -l /dev/sda

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 19458 156185600 7 HPFS/NTFS


"Sectors" is not a text file.

How to I handle that, please?

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1043s ][ Queries: 12 (0.0067s) ][ GZIP on ]