[ltp] Cloning a hard disk?

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Thu, 18 Aug 2005 16:37:56 +0100 (BST)


> Paul Kaplan wrote:
>
> 3)Think carefully about partitions. If you copy them over partition at a
> time, you'll need to partition the new disk first. If you copy over the
> entire disk (dev/hda rather than dev/hda1), then what happens if the two
> disks are not exactly the same size?

Just to emphasise this, I did the same with a second 80GB disk from
IBM for my T40 (locally, using the hard disk caddy for the Ultrabay
Slim).  I thought they were the same geometry but they weren't and
now end up with:

# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       20325    10243768+   7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/hda2           20326       22560     1126440   a0  IBM Thinkpad hibernation
/dev/hda3           22561       23580      514080   83 Linux

This has never knowingly caused me a problem, but still makes me a
little anxious.  I'm hoping it's telling me I've just wasted a little
space at the end of partition 1 - looking into the numbers, I see no
overlap.  But... I wish I'd created the partitions manually and dd'd
each partition.

Honey