Computer Hope

Software => BSD, Linux, and Unix => Topic started by: straffetoebak on March 02, 2011, 01:51:13 PM

Title: dd command doesn't do what I hoped
Post by: straffetoebak on March 02, 2011, 01:51:13 PM
I posted this in the hardware section:
http://www.computerhope.com/forum/index.php/topic,116541.msg777275.html#msg777275
but after 33 views and about a week gone by, there's no replies, so I thought I'd try here.

For the problem mentioned in the other post, I was advised by someone (not on the forum) to do
Code: [Select]
dd if=/dev/sdc1 of=/media/TREKSTOR/sdc1 (where Trekstor is an external 1TB drive.)

The result, after just moments, said something about input as well as output 0 (zero)

I know dd has to be treated with care (from heresay) so I don't dare experiment.
Meanwhile I'm stuck with an 82GB internal disk that doesn't respond.
A lot of the data I have backed up, but some 20GB of very recent data seem lost.

Any ideas how to save my data?
Title: Re: dd command doesn't do what I hoped
Post by: trevorpe on March 02, 2011, 06:58:34 PM
Seeing as no one has replied, I'll post my thoughts, but I'm in no way an expert either.

I read the other post, do your files show up sometimes, all the time, none of the time, certain OSes?

Check the disk could be a thought?  I'm just shooting off random thoughts, so if someone else has their say, may want to let them talk.

Do you have a backup (like the output of "dd") from before this?
You could try restoring.

I believe that would be:
Code: [Select]
dd if=/media/TREKSTOR/sdc1 of=/dev/sdc1
Or just repartition it, get rid of the partition and start over.
Title: Re: dd command doesn't do what I hoped
Post by: JJ 3000 on March 02, 2011, 11:39:04 PM
Any ideas how to save my data?

You should use a data recovery tool like PhotoRec  or Foremost.
Title: Re: dd command doesn't do what I hoped
Post by: straffetoebak on March 03, 2011, 12:49:53 PM
Seeing as no one has replied, I'll post my thoughts, but I'm in no way an expert either.

I read the other post, do your files show up sometimes, all the time, none of the time, certain OSes?
On 1 OS never, on another sometimes and on another sometimes but with read only rights.

Quote
Check the disk could be a thought?  I'm just shooting off random thoughts, so if someone else has their say, may want to let them talk.
I know the disk is damaged, no doubt.
Quote
Do you have a backup (like the output of "dd") from before this?
You could try restoring.
I never did dd before this one occasion..
Quote
I believe that would be:
Code: [Select]
dd if=/media/TREKSTOR/sdc1 of=/dev/sdc1
Or just repartition it, get rid of the partition and start over.
I'm not going to risk any more dd options till I'm absolutely sure it's a correct one.
Thanks for your reply and for taking the time to read the other post; it's much appreciated! But I do have to be sure about the result though, so I'll wait weeks if need be, to get the "success guaranteed" solution from someone.
Title: Re: dd command doesn't do what I hoped
Post by: straffetoebak on March 03, 2011, 12:51:26 PM
You should use a data recovery tool like PhotoRec  or Foremost.
Thanks, that looks like worthwhile investigating during the next weekend!
Title: Re: dd command doesn't do what I hoped
Post by: straffetoebak on March 05, 2011, 11:42:29 AM
I could reach the disk via another OS (Fedora) where it had wrong permissions though.
I managed to copy all data to an external disk and went back to Ubuntu, only to find that the damaged disk seems to be working normal again  ???
no idea how this is possible; another computer mystery...
Title: Re: dd command doesn't do what I hoped
Post by: mr-bisquit on March 06, 2011, 08:21:24 PM
Don't dd an entire partition.
Try using
Code: [Select]
cp -R /path/to/directory/input /path/to/directory/outputI believe there are available snapshot tools for making images.