COPY bad DISK Topic is solved

Using TestDisk to repair the filesystem
Message
Author
User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

COPY bad DISK

#1 Post by ducklip » 25 May 2012, 05:29

I have tried to Copy and Clone my Bad Disk with "Ghost" but it will not do it...

Is "ddrescue" the way I need to pursue for a successful copy?

Thank You,
ducklip :D

Sponsored links

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: COPY bad DISK

#2 Post by Fiona » 25 May 2012, 19:00

Norton Ghost?
I've no idea.
You can have a look here too?;
http://www.runtime.org/driveimage-xml.htm
Maybe it helps?
Also often used;
http://support.wdc.com/product/download ... p?swid=119
Best thing to work with, would be a sector copy not an image.
Your target disk should be the same size or bigger.

Fiona

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#3 Post by ducklip » 26 May 2012, 17:45

Very kind - Thank you Fiona for the links , hopefully if all else fails, I will be able to get a copy of the bad disk over to a good one and recover data. 8-)

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: COPY bad DISK

#4 Post by Fiona » 27 May 2012, 10:28

It's intended in case of memory errors and bad sectors.
So you can have a try to recover your data.
Often it's depend on how many read errors your have.

Fiona

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#5 Post by ducklip » 27 May 2012, 13:47

Here is how I was able to begin an image of my bad disk to a good disk - it is still in progress, not yet finished so my fingers are crossed.

Hi ducklip,

The Rescue Remix is a barebones Gnu/Linux toolkit. It's very powerful, but it's not meant to be used by someone who needs a graphical interface.

For example, by running from a command-line environment, hotpluggable drives are not automatically set up to be accessed - you need to do that by hand.

But that's a big advantage to a recovery situation where another OS can detect a drive, try to mount it and then try to correct errors.

Most of the time, that only results in more data loss since the OS cannot understand that the filesystem it's trying to fix is on a black hole and data written to it is just going into nothingness not to mention throwing a bung of error messages back.


So, to answer your question, you need to do the following:

1- Boot the computer using the Rescue Remix with none of your recovery drives (destination and source) attached.

2- Type:

cat /proc/partitions and hit enter. It will show you what drives are there, example below-
(If the "cat" command is not responding, you can try sudo lshw -C disk -short to show your drives.)

8 0 488386584 sda
8 1 482539520 sda1
8 2 1 sda2
8 5 5844992 sda5

Plug in the *good* drive (destination) and run the command again, you will see another drive present. Make a note of what it is named, examble below -

8 0 488386584 sda
8 1 482539520 sda1
8 2 1 sda2
8 5 5844992 sda5
8 16 1953514584 sdb
8 17 1953512001 sdb1

So the destination drive is /dev/sdb

3- Next, plug in the *bad* drive. Make note of any unhealthy sounds you head. When you think the drive is awake, run the command again.

If you see /dev/sdc, then you are in business.

JUST DO NOT CONFUSE YOUR DEVICES. YOU DO NOT WANT TO READ FROM THE GOOD DRIVE AND WRITE TO THE BAD DRIVE.

4- Run the following:

sudo ddrescue --force -v -r 5 /dev/sdc /dev/sdb log

And it should run a comprehensive procedure to copy the data from the bad drive to the good. It will read all the good spots, and then return to the bad spots and try to read them backwards, splitting them apart when it needs to. It will recover the most amount of data in the least amount of time (in most situations).

That's the simplest way.

The only thing I would recommend that is a little more complicated is to write the log to a usb drive or a hard disk on the computer you are using.

Otherwise, that file will only exist in the computer ram while the Rescue Remix is running. If you reboot it is gone.

If you write the log to somewhere more permanent, you can always power off your computer (say it overheated or a short caused your computer to freeze (I see this a lot recovering data from older hardware) you will need to start over.

Starting over wastes less time if you use the log file and can pick up where you left off.)

So, if you want to do that, this is what you need to do before you start the procedure I previously listed above:

mkdir mnt (that just creates a folder in ram.)

sudo mount /dev/sda1 mnt (that mounts (attaches) the filesystem on the first partition of the first drive to the folder called mnt)

So now if you look in mnt - using the command below, you will see the contents of the filesystem

ls mnt ... (whole bunch of files you recognize)

So, continue the original procedure but use the following change - to begin the ddrescue

sudo ddrescue --force -v -r 5 /dev/sdc /dev/sdb mnt/log

Now, your log file is on the filesystem on the first partition of the first had drive. If you want to use a USB drive, you can do the same, just lug it in, see what device it is and then mount it.

I think there is a good chance that this will work out. It may take hours or days to get an image of your drive, but that's not something you can really affect - the goal here is to get a good image. You only need one good read, not matter how long it takes.

Cheers and Good Luck!

Andy.
Last edited by ducklip on 28 May 2012, 16:39, edited 1 time in total.

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#6 Post by ducklip » 28 May 2012, 16:35

UPDATE I had to restart ddrescue because of "error writing logfile, no space left on device" :o

I was told to reboot it an THIS TIME to write the log to a usb drive or a hard disk on the computer I'm using. Which was reccomended in the first place but I did'nt do it...

So I am trying again - hopefully it will work and I can better use testdisk and photorec on the new image! ;)

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#7 Post by ducklip » 30 May 2012, 16:03

I woke up this morning to find out ddrescue stopped activty, after rescuing 280 gigs of data It stated that the "input file dissappeared"

The good news is that since I had a log file created on my hardrdive I was able to resume the data search where It had left off before the disruption.

onward bound... :P

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#8 Post by ducklip » 02 Jun 2012, 14:12

Here is the latest...

The errsize 49825 mb

rescued 700330 mb

errors 2097141

The program crashed with the message...

"terminate called for after throwing an instance of std ::bad-alloc"

I have been told it was a kernal that caused the crash not ddresuce and that a reboot should rectify the problem...

I'll keep you posted, whoever you is - :lol:

Cheers,
ducklip

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#9 Post by ducklip » 04 Jun 2012, 17:21

Okay - The reboot has solved that error and ddrescue is back in business...

It is in the processing of retrying bad sectors and the error size is decreasing as we speak, while the data rescued so far is 747000.

I have 3 gigs still in the process of rescue - which will be many days until completion.

That's all for now, stay tuned! :idea:

Hope it works :o
ducklip

User avatar
ducklip
Posts: 27
Joined: 23 May 2012, 15:55

Re: COPY bad DISK

#10 Post by ducklip » 08 Jun 2012, 12:12

The copy with ddrescue completed - and I was left with all recovered data but 24mb unrecovered and 3 errors.

I am not able to mount it with ddrescue to view the contents, it seems the file system on the copy is not cooperating and will need repaired first.

The good news is that I have the copy of the bad disk that was worked on with ddrescue on a good drive now.

And I can make a copy of that and work on repairing the file system; so that's where we stand at the moment. :|

Locked

Who is online

Users browsing this forum: No registered users and 0 guests