LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2006, 11:51 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
offset, block size URGENT i need help please


on)/Binaries/testdisk-6.5-WIP$ ls
AUTHORS COPYING doc INFO linux README win
ChangeLog darwin dos INSTALL NEWS THANKS
ubuntu@ubuntu:~/Desktop/a/TestDisk & PhotoRec 6.5-WIP, Data Recovery (Beta Versi on)/Binaries/testdisk-6.5-WIP$ cd linux/
ubuntu@ubuntu:~/Desktop/a/TestDisk & PhotoRec 6.5-WIP, Data Recovery (Beta Versi on)/Binaries/testdisk-6.5-WIP/linux$ ls
l photorec.1 photorec.ses photorec_static testdisk.1 testdisk_static
ubuntu@ubuntu:~/Desktop/a/TestDisk & PhotoRec 6.5-WIP, Data Recovery (Beta Version)/Binaries/testdisk-6.5-WIP/linux$
ubuntu@ubuntu:~/Desktop/a/TestDisk & PhotoRec 6.5-WIP, Data Recovery (Beta Version)/Binaries/testdisk-6.5-WIP/linux$ sudo ./photorec_static
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Please wait...
Disk /dev/hda - 20 GB / 18 GiB - CHS 38792 16 63 (RO), sector size=512
Disk /dev/hdb - 20 GB / 19 GiB - CHS 39770 16 63 (RO), sector size=512
Disk /dev/hdc - 123 GB / 115 GiB - CHS 239340 16 63 (RO), sector size=512
Disk /dev/hdd - 756 MB / 721 MiB - CHS 23 255 63 (RO), sector size=2048

PhotoRec exited normally.
ubuntu@ubuntu:~/Desktop/a/TestDisk & PhotoRec 6.5-WIP, Data Recovery (Beta Version)/Binaries/testdisk-6.5-WIP/linux$ sudo ./photorec_static

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

  PhotoRec is free software, and
comes with ABSOLUTELY NO WARRANTY.

Select a media (use Arrow keys, then press Enter):
Disk /dev/hda - 20 GB / 18 GiB (RO)
Disk /dev/hdb - 20 GB / 19 GiB (RO)
Disk /dev/hdc - 123 GB / 115 GiB (RO)
Disk /dev/hdd - 756 MB / 721 MiB (RO)






[Proceed ]  [  Quit  ]

Note: Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has incorrect size, check HD jumper settings, BIOS
detection, and install the latest OS patches and disk drivers.
I choose Disk /dev/hdb - 20 GB / 19 GiB (RO)

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/hdb - 20 GB / 19 GiB (RO)

Please select the partition table type, press Enter when done.
[Intel  ]  Intel/PC partition
[Mac    ]  Apple partition map
[None   ]  Non partioned media
[Sun    ]  Sun Solaris partition
[XBox   ]  XBox partition
[Return ]  Return to disk selection






Note: Do NOT select 'None' for media with only a single partition. It's very
rare for a drive to be 'Non-partitioned'.
Next I choose [Intel ] Intel/PC partition

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdb - 20 GB / 19 GiB (RO)

     Partition                  Start        End    Size in sectors
   D empty                    0   0  1 39769  15 63   40088160 [Whole disk]
 1 P Linux                    0   1  1 39764   0 63   40082112














[ Search ]  [Options ]  [File Opt]  [  Quit  ]
                              Start file recovery
Next I choose [File Opt]

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


PhotoRec will try to locate the following files

[X] png  Portable/JPEG/Multiple-Image Network Graphics
[X] 7z   7zip archive file
[X] asf  ASF, WMA, WMV: Advanced Streaming Format used for Audio/Video
[X] au   Sun/NeXT audio data
[X] bkf  MS Backup file
[X] bmp  BMP bitmap image
[X] bz2  bzip2 compressed data
[X] crw  Canon Raw picture
[X] ctg  Canon catalog
[ ] dbf  DBase 3, prone to false positive
[X]      FAT subdirectory
[X] doc  Microsoft Office Document (doc/xls/ppt/vis/...)
[X] dsc  Nikon dsc
[X] eps  Encasulated PostScript
[ ] exe  MS executable

[  Quit  ]
                              Return to main menu
Then I checked off every box because I deleted many files by accident with a "rm -f *" and then I went back to the main menu.

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdb - 20 GB / 19 GiB (RO)

     Partition                  Start        End    Size in sectors
   D empty                    0   0  1 39769  15 63   40088160 [Whole disk]
 1 P Linux                    0   1  1 39764   0 63   40082112














[ Search ]  [Options ]  [File Opt]  [  Quit  ]
                                 Modify options
and I choose [Options ]

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org







Paranoid : Yes
Allow partial last cylinder : No
Keep corrupted files : No
Mode ext2/ext3 : Yes
Mode expert : Yes
Quit








                           Try to skip indirect block
I changed the no to yes here. Mode ext2/ext3 : Yes

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdb - 20 GB / 19 GiB (RO)

     Partition                  Start        End    Size in sectors
   D empty                    0   0  1 39769  15 63   40088160 [Whole disk]
 1 P Linux                    0   1  1 39764   0 63   40082112














[ Search ]  [Options ]  [File Opt]  [  Quit  ]
                                 Modify options
Then I highlighted this.
1 P Linux 0 1 1 39764 0 63 40082112
I am not sure if it is better to highlight the other one. Maybe it does not matter.

then I choose [ Search ]

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org




Please select the block size, press Enter when done.
[ 512   ]
[ 1024  ]
[ 2048  ]
[ 4096  ]
[ 8192  ]
[ 16384 ]
[ 32768 ]
[ 65536 ]
Now I have these chooses. I am not sure what to choose, and I am not sure what the block size is describing. I tried reading at wikipedia to find out what block size I have, but I did not find anything that helped. How can I know my block size of something?

Code:
PhotoRec 6.5-WIP, Data Recovery Utility, June 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org



Please select the offset (0 - 3584). Press Up/Down to increase/decrease it,
Enter when done.
Offset 512
Next I have this screen. I am not sure what offset I have. How can I find out?

Please help. I may have deleted many pictures on accident that I can't replace. Next time I will have cron do a backup of all my pictures and other files each night while I am asleep incase I ever accidently delete the wrong thing on accident again.
 
Old 08-13-2006, 03:19 AM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
To find the block size of an ext2 or ext3 filesystem on /dev/hdb1, do (as root):
Code:
dumpe2fs -h /dev/hdb1
And look for a line starting with "Block size". The usual value is 4096. If your filesystem is not ext2 or ext3, I'd try 4096 anyway.

As far as the offset thing goes, I have never used this particular piece of software before and don't know what offset it is asking for. If it came with any documentation, I'd suggest looking for an answer there. Assuming that this is the offset after which it will start reading from disk, I would go with the old standby: 0.

Since the program is supposed to recover data, not alter it, just trying different values shouldn't be harmful.

FURTHER: I notice that the options menu allows you to disable "expert mode". If you cannot answer some of the questions it asks... perhaps you should change the "yes" answer there to "no". It might detect these values for you, or use some clever/common defaults.

Last edited by zhangmaike; 08-13-2006 at 03:21 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
block size for photorec fakie_flip Linux - Software 0 08-12-2006 11:01 AM
Disk Block size conversion vikrambhimbar Linux - Hardware 1 04-29-2006 12:06 PM
size of block devices primo Solaris / OpenSolaris 1 12-20-2005 12:17 PM
block size ust Linux - Software 1 11-24-2005 11:45 PM
block size in ext2 ramu_ak Linux - General 2 03-30-2004 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration