How to use TestDisk for recovering my USB thumb drive
This is related to
I have a USB thumb drive that has errors related to permission issues and it became read-only default without any reasons.
Then I found out there is a program called TestDisk: http://www.cgsecurity.org/wiki/Main_Page
When I used TestDisk (without understanding the manual because it's too complicated for beginners), I have a warning error like:
OK, having read your other 2 posts it seems you have some issues with that usb
now, your using 9.04 right
did you change the permissions settings in the menu top panel "system/administration/permissions"
or authorizations it might be called
ok, also can you post your /etc/fstab?
and fdisk -l
open a terminal in linux and become root with "sudo su"
then, with usb plugged in/mounted do "fdisk -l"
and posty that here
also, as root above, try coping a file(any text file) from ubuntu hd/desktop to usb
"cp -a /home/username/Desktop/filename /mount/point/of/usb"
type in "mount" while usb is mounted to find out it's mountpoint
most likely /media/disk or similar
for me, if copying a file to usb from desktop in Ubuntu would be
"cp -a /home/bz/Desktop/myfile.txt /media/disk"
IF you are able to copy a file there then you need to change your permissions
if there is a problem copying then maybe the usb is corrupted format or something
DID you format the usb or is it factory formatted?
if you formatted, how?
as for using testdisk/p0hotorec I am also checking ti out
did you read any info?
( http://www.cgsecurity.org/wiki/TestDisk )
the best way to do it maybe to use partedmagic, which has clonezilla to clone the usb image to somewhere where you can safely hack at it with testdisk etc and preserve the original so when you get it down on how to fix it you run the real one.
theres also dd rescue too
which should provide info thru terminal with "dd rescue -info" or "info dd rescue"
it's probably available in synaptic pkg manager
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000dde2d
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60060 482431918+ 83 Linux
/dev/sda2 60061 60801 5952082+ 5 Extended
/dev/sda5 60061 60801 5952051 82 Linux swap / Solaris
Disk /dev/sdb: 4009 MB, 4009754624 bytes
51 heads, 51 sectors/track, 3010 cylinders
Units = cylinders of 2601 * 512 = 1331712 bytes
Disk identifier: 0x04030201
Device Boot Start End Blocks Id System
/dev/sdb1 1 3011 3915204 b W95 FAT32
What I find very awkward about ddrescue is that there are tons of instructions about ddrescue for recovering hard disk drives, but never about recovering thumb drives that makes beginner Linux users very crazy. As the way how instructions are worded out for almost all of the data recovery softwares, it is too limited for average people to understand. Too abstract, not enough background information.
I'm sorry that I talk like a self-designated idiot, but what can I say?
I know dude, too much linux docs are f***in for astronauts
it's like chinese to a german, dude.
anyway, what about permissions in menu admin
I think you just have a permissions problem, maybe
and also corrupted data maybe
as root try chowning that bitch
" sudo chown -R username /mount/point/of/usb"
NOTE< NEVER do "sudo chown -R username / "
I did that other day by accident and had to do complete re-install of ubuntu
so, for me, to chown usb would be
"chown -R bz /media/disk"
then I have read/write to usb
Still not working from chown. It is most likely that it is a corruption of the filesystem FAT32 in my thumb drive.
When I copied a file from my dubious thumb drive to my computer, it shows: Input/output error
Yeah, I think the filesystem is the problem.
OK, check this stuff out
( http://ubuntuforums.org/archive/index.php/t-417761.html )
( http://sysadminhell.blogspot.com/200...-testdisk.html )
( http://ubuntuforums.org/archive/index.php/t-925680.html )
hope that helps some...
Can you explain/remember exactly how/when the problem started?
For some reason, perhaps the file system got corrupted out of blue. Now it makes me want to ditch FAT for my thumb drive.
Yea dude I run like 8 distro's off my ext3 usb using grub
ext3 is very good for data
it's really easy to setup too
Unspawn may be able to help too
he knows more than me
Just use dd_rescue like this (replace "sdb" with the device name for the stick and /tmp with a partition with enough space on it): 'dd_rescue -l /tmp/stick.log -o /tmp/stick.badblocks -A -f -v /dev/sdb /tmp/stick.dd 2>&1 | tee /tmp/stick.tee'.
Or is there another "step-by-step" way to use dd_rescue, in the context of saving a thumb drive?
'dd_rescue -l /tmp/stick.log -o /tmp/stick.badblocks -A -f -v /dev/sdb /tmp/stick.dd 2>&1 | tee /tmp/stick.tee'.
name-of-application -l path-and-name-of-log-file-to-write-to -o path-and-name-of-log-file-that-logs-bad-blocks (do not skip writing blocks) (run less checks) (be verbose) path-to-devicename path-and-filename-of-backup pipe error output to standard output | (pipe standard output to) name-of-application path-and-name-of-log-file. The meaning is to get the backup while logging as much as possible to help troubleshooting later on if necessary. You also could have found this yourself if you opened up a console and typed 'dd_rescue --help'.
Correct me if wrong Unspawn, but in ebonixcs english that is like say you had a partition on your hard drive
say hda1 and usb is sdb
it would be
'dd_rescue -l /hda1/stick.log -o /hda1/stick.badblocks -A -f -v /dev/sdb /hda1/stick.dd 2>&1 | tee /hda1/stick.tee'.
is that right?
Well. I was sort of expected to understand dd_rescue -l /tmp/stick.log -o /tmp/stick.badblocks -A -f -v /dev/sdb /tmp/stick.dd 2>&1 | tee /tmp/stick.tee like:
1. dd_rescue: It's a way to copy and paste corrupted drives
2. -l: It's about logfiles in respect to the dd_rescue command
3. /tmp/stick.log: destination to action of dd_rescue
x. /tmp/stick.tee: ????
You know, one of the popular ways to explain and translate Classical Chinese at a glance in a form of basic sequential logic formula. Easier for both beginners and experts to understand what is going on.
Maybe my ways of understanding things how work is very different from most others. So forgive my stupidity and shortsighted-ness. I will take a temporary break.
|All times are GMT -5. The time now is 02:10 AM.|