Author Topic: Cloning a Bad Hard Drive  (Read 4386 times)

0 Members and 1 Guest are viewing this topic.

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Cloning a Bad Hard Drive
« on: October 20, 2020, 11:53:53 pm »
I have a 120GB 2.5" hard drive in a laptop. The system boots (it's an old XP machine) but the hard drive seems to spin excessively.

An IT guy told me that's usually an indication the hard drive is bad, so I decided to clone it onto a SSD. I used Macrium Reflect, but that aborted due to a CRC error. I attempted to disable the verification, however, it still aborts due to CRC error(s). I also ran chkdsk, it ran through, but still caused the cloning to fail.

After research, I tried EaseUS ToDo Backup, but that didn't work. I bought a stand alone Sebrent docking station that does cloning without the need of going through a PC. You insert both drives, turn on power, push a button, and it clones. Unfortunately I think the errors on the hard drive is causing the Sebrent to not work because it's been flashing at 25% for over two-days (it has four LEDs. Each one flashes as it's cloning, and remains lit as each 25% finishes).

Does anyone have any suggestions on how to get this drive cloned?
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: Cloning a Bad Hard Drive
« Reply #1 on: October 21, 2020, 12:01:22 am »
73 de VE7XEN
He/Him
 

Offline isometrik

  • Regular Contributor
  • *
  • Posts: 56
  • Country: ca
Re: Cloning a Bad Hard Drive
« Reply #2 on: October 21, 2020, 12:39:10 am »
+1 for ddrescue
 

Offline AntiProtonBoy

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: au
  • I think I passed the Voight-Kampff test.
Re: Cloning a Bad Hard Drive
« Reply #3 on: October 21, 2020, 03:19:10 am »
Immediate thought was also ddrescue.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11701
  • Country: my
  • reassessing directives...
Re: Cloning a Bad Hard Drive
« Reply #4 on: October 21, 2020, 03:42:38 am »
perhaps one less elegant solution is a solution, but ymmv... can you try copying on file by file level first? say using Windows Explorer to another disk, most important files first. the CRC that causes indefinite halting maybe on the XP system files that are recoverable by reinstalling fresh XP. if you try to recover some important softwares, try to save as much as you can esp Windows registry and probably some files installed in Windows or System32 folders? or maybe try to create "disk image" as intermediary process instead of directly "clone" attempt may work? (skip CRC, bad sectors or any other errors) or else maybe try the "surface to surface match" cloning technique if available. or have you read this? https://www.easeus.com/resource/fix-data-error-cyclic-redundancy-check.html searching the internet may give you some light. btw my current disk recovery/backup tool is AOMEI Backupper, i also keep the other recovery tools install files like EaseUS et al in case AOMEI cant do the job. good luck!
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline station240

  • Supporter
  • ****
  • Posts: 967
  • Country: au
Re: Cloning a Bad Hard Drive
« Reply #5 on: October 22, 2020, 01:45:12 pm »
perhaps one less elegant solution is a solution, but ymmv... can you try copying on file by file level first? say using Windows Explorer to another disk, most important files first.

I've had to do this for someone, the drive was accessible, but had random files corrupted. Clearly bad sectors.
I used one of the standard DOS directory copy commands, with various flags added to:
0. Copy files and directories, plus hidden/system files.
1. Not retry files that failed to read.
2. Not ask me stupid Y/N questions.
3. Log everything to a file on another drive.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #6 on: October 22, 2020, 02:53:19 pm »
Years ago I had the drive start going bad on an XP system with write failures. Copied the whole 150GB drive right away. Examining after the fact, I realized less than 4 GB of the 100+ that I copied was actually irreplaceable data. OS, software, drivers, etc. can usually be reinstalled easily though it is time consuming. Data, particularly that which you have created yourself, is what to go after first.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #7 on: October 23, 2020, 12:58:24 pm »
I'm using ddrescue now and it seems to work quite well - I can see why this was recommended.

This is the format I used: ddrescue -d -r3 /dev/sda test.img test.logfile (except I changed -r3 to -r10 in hopes it would eventually get all the data without errors).

I began last night, and approximately ten-hours later it's still going. The status looks quite promising because it shows 99.99% and 120.xxGB (the drive is 120GB) has been recovered.

The drive has been making lots of noises and crunching, but being able to copy this image to a new drive will be nice. I'm uncertain how long a 'retry' (i.e. the -r value) takes to completed before it moves onto another retry attempt; so far it's on #8.

If it doesn't finish soon and I use CTRL C to exit, will the image file remain or will it be corrupt from aborting?
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #8 on: October 23, 2020, 02:57:58 pm »
Skip my last question. It ran through all ten retries and finished.

I'll try writing the image to another drive later, but I'm guessing at 99.99% of successful retrieved data that any lost info will not affect anything.

As for the hard drive and bad sectors, I have a few questions. First off, I understand a hard drive can fail in many ways (i.e. the motor not spinning, the electronics, the head, coil, etc...). In this case, and other cases I've experienced, the hard drive is usually accessible but periodically makes odd noises.

My understanding is a bad sector is corrupt data, but why does that cause the head (?) to make odd noises? In this case, the hard drive made the same clicking sounds, but it always make the same type of grinding noise.

Also, if a sector is bad, why would that not cause every track within that sector to be bad?

 

Online magic

  • Super Contributor
  • ***
  • Posts: 6923
  • Country: pl
Re: Cloning a Bad Hard Drive
« Reply #9 on: October 23, 2020, 05:51:33 pm »
My go to method (on Linux) is as simple as
Code: [Select]
losetup -r /dev/loop0 /dev/sdb1
mount /dev/loop0 /mnt/sdb1
cp -a /mnt/sdb1/whatever /mnt/sdc1 2>&1 |tee errors
The first line sets up a strictly read-only layer over the original device, protecting it from all writes that could cause further corruption, including filesystem journal replay.
Then I just copy any files I care about to another disk.
Then I review the error log to see if anything is missing and try more desperate measures.

Much better than
1. wasting time to copy junk I don't need
2. retrying 10 times reads of space which may actually be empty or used by the trash can
3. having blocks of zeros written into files where bad blocks were
4. not easily knowing which files are affected by 3
 :-- :-- :--
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #10 on: October 24, 2020, 01:23:00 pm »
Quote
Then I just copy any files I care about to another disk.

Unfortunately I need to clone the drive. I was relatively successful creating an image, but, I used a 120GB SSD to create a new drive from the image, and, as the website with the ddrescue instruction stated, I should have used a larger drive.

At the last minute (after about two-hours), ddrescue aborted and stated I didn't have enough drive space.

I hate to waste money buying a bigger drive for an old laptop I seldom use. Does a ddrescue command exist that will copy only used sectors thus making the image file smaller than the original 120GB drive?
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8028
  • Country: gb
Re: Cloning a Bad Hard Drive
« Reply #11 on: October 24, 2020, 01:50:53 pm »
Quote
Then I just copy any files I care about to another disk.

Unfortunately I need to clone the drive. I was relatively successful creating an image, but, I used a 120GB SSD to create a new drive from the image, and, as the website with the ddrescue instruction stated, I should have used a larger drive.

At the last minute (after about two-hours), ddrescue aborted and stated I didn't have enough drive space.

I hate to waste money buying a bigger drive for an old laptop I seldom use. Does a ddrescue command exist that will copy only used sectors thus making the image file smaller than the original 120GB drive?

No, but if you take the image to another drive first you can shrink the filesystems and alter the partition table so it will fit.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6923
  • Country: pl
Re: Cloning a Bad Hard Drive
« Reply #12 on: October 24, 2020, 06:41:18 pm »
Ah, so you want to transfer a Windows XP installation? That's gonna be harder.

Monkeh's suggestion to use a larger temporary disk is the simplest way. If not, maybe it would be possible to surgically build the new installation from pieces of the old - transfer the MBR, fix it to fit the smaller disk, transfer the first few megs of the NTFS partition, run chkdsk, transfer the files. But that sounds like a "fun" project. Or just format an empty NTFS volume, populate with files and carefully dd the old boot code into appropriate locations (the offsets are well known, I believe). Would that work? Maybe...

FYI, I have successfully resized and moved (to a different location on the same HDD) Windows XP partitions in the past, using gparted.

BTW, is it NTFS or FAT32?
« Last Edit: October 24, 2020, 06:46:51 pm by magic »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11701
  • Country: my
  • reassessing directives...
Re: Cloning a Bad Hard Drive
« Reply #13 on: October 25, 2020, 03:57:30 am »
Ah, so you want to transfer a Windows XP installation? That's gonna be harder.
FYI, I have successfully resized and moved (to a different location on the same HDD) Windows XP partitions in the past, using gparted.
BTW, is it NTFS or FAT32?
why is that hard? yes its hard if you dont have installation CD at hand (no more downloadable installation files in website thats why keeping WinXP install archive and backup is one of my (priority) job). and changing/moving/resizing WinXP boot partition was my playground. i used old Partition Magic but it became highly incompatible today, luckily i got replacement. Windows Disk Manager + AOMEI Backupper can do the job that i usually did in Partition Magic.

At the last minute (after about two-hours), ddrescue aborted and stated I didn't have enough drive space....
I hate to waste money buying a bigger drive for an old laptop I seldom use.
maybe you dont have too much files to care about. we know backup is essential so we tend to keep some extra drives to do the backup/recovery work. HDD are cheap today, even SSD is going in the direction. 500GB SSD is reaching $100 now, wonderful time! having some experience in recovery job, we are more willing to waste a little bit money to avoid wasting alot of time and frustration. and if you do enough recovery and playing with recovered data, you'll know what exactly what magic means in reply #9. i saw you wanted to recovery a HDD in your earlier thread so good luck, cheers.
« Last Edit: October 25, 2020, 03:59:18 am by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: Cloning a Bad Hard Drive
« Reply #14 on: October 26, 2020, 06:36:58 pm »
My go to method (on Linux) is as simple as
Code: [Select]
losetup -r /dev/loop0 /dev/sdb1
mount /dev/loop0 /mnt/sdb1
cp -a /mnt/sdb1/whatever /mnt/sdc1 2>&1 |tee errors
The first line sets up a strictly read-only layer over the original device, protecting it from all writes that could cause further corruption, including filesystem journal replay.
Then I just copy any files I care about to another disk.
Then I review the error log to see if anything is missing and try more desperate measures.

Much better than
1. wasting time to copy junk I don't need
2. retrying 10 times reads of space which may actually be empty or used by the trash can
3. having blocks of zeros written into files where bad blocks were
4. not easily knowing which files are affected by 3
 :-- :-- :--

If you have a failing disk, this will almost certainly not work well for you, despite not even creating an image as was requested. You'll get stuck in retry loops with long timeouts in the OS, putting stress on the drive and bad sectors, and sometimes this will cause bus resets and other nastiness. You might get lucky and the bad blocks don't affect any files/metadata and it copies cleanly, but if the bad blocks affect the filesystem at all, you will likely have a hard time getting the process to proceed past the read errors. Most tools assume the disk is good and will have this problem, which is why you need ddrescue.

As far as 3: in most cases you would rather have 0s written to bad blocks in the file, than for the copy to completely fail, at least some data may be recoverable. Identifying the bad files can be tricky, but there are ways to do it from the block list, at least.

If you have a fully working disk you need to image, you can use partimage or ntfsclone to avoid copying empty blocks if you want. In a recovery scenario, getting an (possibly partial) image ASAP is best practice - this is what ddrescue does, skipping bad/slow blocks on the first pass to read as much as possible before getting aggressive. Later you can work with the ddrescue log/mapfile to try to be more aggressive about bad blocks if you want but at least you'll know most of your data were saved. Unless the disk is very empty of actual data, it'll probably be significantly faster than waiting the endless retries the OS will normally do with a file copy, if you don't get frustrated and give up when it completely stops making progress.
73 de VE7XEN
He/Him
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6923
  • Country: pl
Re: Cloning a Bad Hard Drive
« Reply #15 on: October 26, 2020, 08:15:46 pm »
Maybe my failing disks weren't failing enough, but it worked for me a few times.

When bad blocks affect filesystem metadata, files are not recoverable anyway. If you are truly desperate enough to use something like photorec, maybe then a ddrescue image could help. I'm glad I have never been there.

The behavior when running cp may depend on exact filesystem driver, but I haven't experienced excessive retries. As for cp itself, it simply skips files and directories which return errors and moves on.

I have not yet encountered a case when re-reading a sector which returned UNC once would return anything but UNC ever again, unless it's overwritten with new data.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #16 on: October 27, 2020, 12:42:26 am »
Why do bad blocks or whatever cause the hard drive to make odd noises?

Or do the odd noises cause bad blocks?
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11701
  • Country: my
  • reassessing directives...
Re: Cloning a Bad Hard Drive
« Reply #17 on: October 27, 2020, 09:23:11 am »
Why do bad blocks or whatever cause the hard drive to make odd noises?
Or do the odd noises cause bad blocks?
lost wedges...

http://home.npru.ac.th/piya/Document_KMUTNB/Lec06.pdf
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #18 on: October 28, 2020, 12:36:22 am »
The PDF doesn't work
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1287
  • Country: pl
Re: Cloning a Bad Hard Drive
« Reply #19 on: October 28, 2020, 03:27:56 am »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3566
  • Country: nl
Re: Cloning a Bad Hard Drive
« Reply #20 on: November 06, 2020, 03:09:19 pm »
I hate to waste money buying a bigger drive for an old laptop I seldom use.

So even after you have failing hardware you are too cheap to invest USD50 into any sort of backup?

You pretty much deserve what you get.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #21 on: November 06, 2020, 03:44:44 pm »
Quote
So even after you have failing hardware you are too cheap to invest USD50 into any sort of backup?


How can I be too cheap?

I'm investing money in a laptop I seldom use and is outdated. My point is: why buy a hard drive three times bigger when I use 1/5th of the current 120GB? Then if something happens and I need to replace this drive, I'll need a 500GB drive because a 320 to a 320 will not work.

This site, and the advice of others, along with the progress of knowledge, isn't to insult whether someone should or shouldn't invest (according to you) $50. The quest for knowledge lies in learning why a 120 can't be imaged to a 120.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8028
  • Country: gb
Re: Cloning a Bad Hard Drive
« Reply #22 on: November 08, 2020, 06:09:39 pm »
Quote
So even after you have failing hardware you are too cheap to invest USD50 into any sort of backup?


How can I be too cheap?

I'm investing money in a laptop I seldom use and is outdated. My point is: why buy a hard drive three times bigger when I use 1/5th of the current 120GB? Then if something happens and I need to replace this drive, I'll need a 500GB drive because a 320 to a 320 will not work.

This site, and the advice of others, along with the progress of knowledge, isn't to insult whether someone should or shouldn't invest (according to you) $50. The quest for knowledge lies in learning why a 120 can't be imaged to a 120.

There is no problem cloning to a drive of equal size. The issue is that not all drives with the same headline are actually the same size. It is not hard to adjust an image to fit.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3566
  • Country: nl
Re: Cloning a Bad Hard Drive
« Reply #23 on: November 11, 2020, 03:55:06 pm »
I somehow misinterpreted your original post, which made my answer inappropriate

The quest for knowledge lies in learning why a 120 can't be imaged to a 120.
.

I agree with Monkey, Those gross overall sizes are no real size of HDD's or SSD's.
"Sectors" have not been real "sectors" for over 20 years, and SSD's do not even have anything resembling a "sector". It's just a naming convention left over from ages past.

On top of that. There is not much knowledge to gain (for mortals) in trying to understand each and every detail of a failing drive.

Personally I would mount the drive read-only, or make a backup image of it on a (much) bigger drive, and use the opportunity to install a clean OS on the affected laptop, then re-install the programs I would need and only attempt to rescue important data from the failing HDD (or the image made from it).

It's one of the joys of using Linux and open source software exclusively.
Linux installs in about 15 minutes on a SSD, (just as windoze apparently, (haven't used it in years)), but on top of that. Nearly all programs can be installed from the command line in less time then you need to start a web browser, to to some external site and download an install program. There is also no messin' with installation keys and licenses.

And again: My apologies for the presumed insult, that was never my intention.



 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1950
  • Country: us
Re: Cloning a Bad Hard Drive
« Reply #24 on: December 14, 2020, 01:12:47 am »
Quote
And again: My apologies for the presumed insult, that was never my intention.


I never got notified a reply was sent, so I didn't know you responded. I appreciate your apology and it was actually more than needed. Apparently we both just misinterpreted the intent of each other.

Initially I re-read my post because I wanted to make sure I didn't come off as wording it incorrectly. More often than not, us Engineers (if that's what I am :)  ) rather take the hard road in order to gain knowledge. Unfortunately we live in a throw-away world and more people are tossing electronics than trying to preserve them therefore the power of knowledge seems to be a dying field.

This site is quite informative and so far just about every question (probably all) have been answered in a timely fashion. It's because of this site, and others, that I see the power of knowledge continuing to advance.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf