Is dd ok?

Net Llama! netllama
Mon May 17 12:00:47 PDT 2004


On 03/21/04 09:17, 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?

It should replicate the existing partitions.  You'd then have alot of 
extra space where you could create additional partitions.

> 
> If dd only duplicates the original partition's size, could I partition 
> the target drive before running dd?

No, dd will overwrite the partition table, and all pre-existing data 
structures on the new disk.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                       	       netllama at linux-sxs.org
Linux Step-by-step & TyGeMo: 		    http://netllama.ipfox.com

  10:35:01  up 105 days, 15:12,  1 user,  load average: 0.06, 0.09, 0.09



More information about the Linux-users mailing list