Clay on 18 Jul 2015 17:49:44 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Cloning a dying hard drive

Hi Walt,

Those instructions are sane. I'm sure folks have different approaches they
would take. My approach would be..

- power down the computer
- attach the new drive
- boot to a USB Kali linux drive
- make sure the new drive is /dev/sdb by doing fdisk /dev/sdb
 if this works then 'p' to print the partitions.
 'c' to create a new partition (use 1 primary and use all space)
 'w' write changes and quit
- mkfs /dev/sdb1

I'd probably use dc3dd which is just a patched version of dd that's intended for
forensics use. It takes the same options, etc.

- dc3dd if=/dev/sda of=/dev/sdb

If there are errors then you can add the dc3dd option, conv=noerror,sync

- dc3dd if=/dev/sda of=/dev/sdb conv=noerror,sync

This will prevent dc3dd, or dd, from halting on error.

That should do it.

You could test by trying to boot from /dev/sdb and see how it goes. Of course you
can also boot as normal and make sure everything you want it on the new drive.

Hope this helps. Let me know if you have any questions.


On 07/18/2015 08:23 PM, Walt Mankowski wrote:
The hard drive on my home server is starting to give me errors.  I
actually got a kernel panic today while I was out because of it.  I
fsck'ed it and it seems OK for now, but that's what I thought when I
fsck'ed it a few days ago when I saw errors, too...

The machine is old and needs to be upgraded, but I'm going to need a
few days to order the parts.  As a stopgap I just stopped by
Microcenter and picked up a 1 TB HD in hopes of copying everything off
the old 1 TB drive before things get any worse.

I've done this process at least once before, it was probably like 10
years ago.  Does anyone have any thoughts on the instructions here?

That certainly seems the simplest method, assuming the errors remain
manageable.  Other methods that might work would be

* rsync from the roots of the old partitions to the new ones
* full restore from my backups

Thanks in advance for any advice.


Philadelphia Linux Users Group         --
Announcements -
General Discussion  --

Clay Wells
Information Security Engineer
School of Arts & Sciences
University of Pennsylvania

GnuPG fingerprint:
D302 C83D BCF0 6FA2 3739  7B0B 9746 9259 5D27 7C89
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --