On Fri, 26 Mar 2004 08:43, Christopher Sawtell wrote: > On Fri, 26 Mar 2004 07:37, Paul William wrote: > > Hi all, > > > > Is a simple dd: > > dd if=/dev/hdc of=/dev/hdx > > capable of 'cloning' hdc into hdx? > > if the two devices are identical, unconditionally, yes. > if hdx is smaller than hdc, then effectively no. > if hdx is larger than hdc, then yes, and you then have the opportunity to > adjust the partitions after copying. imho, it's a better idea to partition > the destination disk appropriately and do file copies of each partition > using the cp utility in recursive mode. While this method will take longer > it has the side benefit that any fragmented files will the made contiguous.
Aha, excellent. I never thought of that benefit (getting rid of fragmentation) of using cp. Of course to do that you then need to create partitions again / create filesystems, copy files (ensuring you keep ownership / permissions intact etc), reinstall your bootloader... it can be a pain. Imaging the disk with dd is faster and simpler. I think I'll still go with that unless it's severely fragmented. Thanks for this Christopher, you answered my question too (which I think was pretty much the same question, doh. Need more coffee...). I now think I'll just extend the last partition to fill up the disk, instead of creating a new one. If I delete the entry for the last partition on the disk, using fdisk, and then create a new one that starts at the same place but ends at the end of the disk, all should be good I think :-) fingers crossed (hey, if it breaks anything I can always just 'dd' the image back again, hehe). Cheers, Gareth