Urgent: Copy hda to hdb with dd?

Gene Holmerud plug-discuss@lists.plug.phoenix.az.us
Sat, 23 Mar 2002 23:01:53 -0700


Thanks Hans.  I've been following this since I'm doing something 
similar, but having different problems.  I used DriveWorks to 
partition the new drive and Ghostpe to copy (but partimage looks good 
from freshmeat).  Unfortunately, my Mandrake 8.1 kernel doesn't try 
to use the expanded "/" area.  "df" says:
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda2              2008140   1846164     59964  97% /
but the partition is about 8Gig.  The whole idea of a new drive!
> 
> Use sfdisk to list the partitions on the master and then write those same
> partitions to the clone. 

sfdisk gave me the following part. table info:
Disk /dev/hda: 4865 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls   #blocks   Id  System
/dev/hda1          0+   1083    1084-  8707198+  1c  Hidden Win95 FAT32 (LBA)
		end: (c,h,s) expected (1023,254,63) found (1022,254,63)
/dev/hda2   *   1084    2103    1020   8193150   83  Linux
		start: (c,h,s) expected (1023,254,63) found (1022,0,1)
		end: (c,h,s) expected (1023,254,63) found (1022,254,63)
/dev/hda3       2104    2485     382   3068415   92  Unknown
		start: (c,h,s) expected (1023,254,63) found (1022,0,1)
		end: (c,h,s) expected (1023,254,63) found (1022,254,63)
/dev/hda4       2486    4270    1785  14338012+  1c  Hidden Win95 FAT32 (LBA)
		start: (c,h,s) expected (1023,254,63) found (1022,0,1)
		end: (c,h,s) expected (1023,254,63) found (1022,254,63)

Several red flags, I'd say!  I fixed the partition type for hda3 (now 
82).  Mandrake didn't seem to mind.

However, although the cylinder numbers appear OK for each partition, 
the expected and found start and end values are totally off (they 
repeat for all the parttitions!).  Will sfdisk (or some other 
routine) clean these up?  By imaging one part. at a time, deleting & 
restoring?  Or do I need buy another new drive and construct it 
cleanly?

> 
> If they don't have to be 'exactly' the same, but have the same content,
> then, part with sfdisk and then use tar or cpio to copy stuff. tar with
> '--atime-preserve' on the expand will keep time/date stamps on directories
> as well as files.
> 
Altho Alan is making multiple copies, I use a 2nd drive as a backup 
that is only powered up to copy to.

> Also search freshmeat. There are several utils that others have written for
> ghosting/copying drives.
Handy site to use.  Thanks.

Gene