[sclug] Copy drive problem

Neil Haughton haughtonomous at googlemail.com
Fri Mar 1 15:42:25 UTC 2013

Can anyone explain what is wrong?

I'm replacing a PATA drive with a larger one. We're in Debian Squeeze Land.

I have two hard drives on my IDE0 channel, and two optical drives on my
IDE1 channel.

I have the 'old' drive on /dev/sdb, which is the IDE0 channel slave in my
setup (not the master boot drive). The old drive has two primary paritions.
sdb1 and sdb2, mounted as /var and /home. I need to copy them both to a new
drive before removing the old.

I disconnected the (not needed) CD writer from the IDE1 cable (it is set up
as master) and connected the new drive as master on that channel. So now I

IDE0 master - bootable drive (two partitions, sda1 and sda2 &5,  mounted as
/boot and / )
IDE0 slave - my old drive (two partitions, sdb1, sdb2,  mounted as /boot
and /home )
IDE1 master - the new drive with two partitions, sdc1 and sdc2, not mounted.
IDE1 slave - my DVD drive.

Then I booted the machine, logged in, and as root ran gparted to partition
the new drive into one about the same size as /dev/sdb1 (/var), and the
rest for the second parition. I used the default partition table format
(msdos), both partitions ext3 to match the 'old' partitions.

Then I tried as root to 'dd' the sdb1 partition (/var)  to its new home:

dd if=/dev/sdb1 of=/dev/sdc1

After a long pause the message 'read error' appeared and dd bombed out,
with only a couple of MB transferred.  Why would this be? Have I done
anything wrong or missed out a vital step?



More information about the Sclug mailing list