Is dd ok?

Mike Reinehr cmr
Mon May 17 12:00:50 PDT 2004


Leon,

As Klaus-Peter Net Llama have said, using dd in this way will replicate your 
partition(s) in both size as well as content. What you will have to do is 
first use fdisk (or similar) to create the new, larger partition(s) on your 
new hard drive and then use something like tar or cpio to transfer the 
contents of the old partition into the new partition -- so as not to 
overwrite the partition & filesystem information.

HTH

mike

On Sunday 21 March 2004 11:17 am, Leon Goldstein wrote:
> Klaus-Peter Schrage schrieb auf Englisch:
> > My wife's got an old IBM 350 MHz PII machine with a 6 G IDE harddisk.
> > It is partinioned for dual booting with Grub to Win98 SE and RH 9
> > (which, alas, she uses very rarely - she's quite content with the few
> > apps she uses in Win98: Winword, Excel, Mozilla mail and browser).
> >
> > As you might imagine, diskspace is running short sooner or later with
> > such a setup on 6 G, so we bought a new 40 G harddisk which I plugged
> > in as secondary master in order to copy over the entire stuff. As the
> > disk was rather cheap and I was rather daring, I booted my knoppix cd,
> > checked if /dev/hdc was recognized and gave:
> >     dd if=/dev/hda of=/dev/hdc.
> > dd buzzed for about one and a half hour, and after it had finished I
> > was rather surprised to have all the partitions copied from hda to
> > hdc, no error messages, and all fscks were ok.
> >
> > After I had removed the old disk and put the new one in place, there
> > was Grub, I could boot into either OS without any difference (only
> > quite a lot faster due to the new disk).
> >
> > Now, has this been TOO easy? I found nothing on the net about doing
> > such a foolish thing or any caveats (differing geometries etc.).
>
> I would like to clone a drive that has run out of space to a bigger
> one.  Will Klaus-Peter's procedure duplicate the existing partitions'
> original size on the new drive, or will they expand proportionally to
> fill it?
>
> If dd only duplicates the original partition's size, could I partition
> the target drive before running dd?

-- 
Debian 'Sarge': Registered Linux User #241964
----
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC
--------




More information about the Linux-users mailing list