[nmglug] cloning HD

BrianO'Keefe okeefe at cybermesa.com
Tue Jan 4 09:53:13 PST 2011


Thanks to both Eric and Nick. this is what I recall from my last cloning 
operation years ago but the "how-to" I found confused me. I'll just 
clone the whole drive and then resize later as needed, if needed. the 
other idea I have is to put my home directory on a separate partition on 
the new drive but that seems rather unnecessary. It is my home folder 
that is the largest folder on the / directory so I wouldn't accomplish 
anything by having a separate partition. I think....

Brian

On 01/04/2011 10:39 AM, Eric Krieger wrote:
> No need to either…  the command...
>
> dd if=/dev/sda of=/dev/sdb bs=1M conv=notrunc,noerror
>
>
> ...will copy everything from hard drive sda to sdb  (i.e. all
> partitions, swap and all data), a true clone.  No need to create
> partitions or format them on the target hard drive as the dd command
> will create them because it is copy of every single block of sda.
>
> Now if you where copying a single partition to a new drive yes you
> would have to create the target partition on the new hard drive.
>
> dd if=/dev/sda1 of=/dev/sdb1 bs=1M conv=notrunc,noerror
>
> In the command above this would clone partition 1 on drive sda to
> partition 1 on drive sdb.  In this case you would not need to format
> the new target partition either as it is again copying every block of
> partition 1 of the source sda1 to the target sdb1.
>
> Hope this helps.
>
> - Eric
>
>
>
>
> On Tue, Jan 4, 2011 at 10:18 AM, BrianO'Keefe<okeefe at cybermesa.com>  wrote:
>> So do I need to create the partition on the new drive or just format the
>> drive to ext4 and then use Nick's dd command?
>>
>> On 01/03/2011 02:20 PM, Nick Frost wrote:
>>
>> On Jan 3, 2011, at 1:59 PM, Eric Krieger wrote:
>>
>> How are you cloning the drive?   Are you connecting the new drive to
>> the system via some sort of usb or firewire enclosure? Running...
>>
>> dd if=/dev/sda of=/dev/sdb
>>
>> Will copy all partitions from sda to sdb and just expand sda1 on the
>> new drive once it's finished.  Granted it's not the fastest method but
>> it works.
>>
>> The above works well, but I've had slightly better results with;
>>
>> dd if=/dev/sda of=/dev/sdb bs=1M conv=notrunc,noerror
>>
>> - Nick
>> ---------------------------------------
>> Nicholas S. Frost
>> 7 Avenida Vista Grande #325
>> Santa Fe, NM  87508
>> nickf at frostitute.com
>> ----------------------------------------
>>
>>
>> _______________________________________________
>> nmglug mailing list
>> nmglug at lists.nmglug.org
>> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
>>
>> _______________________________________________
>> nmglug mailing list
>> nmglug at lists.nmglug.org
>> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
>>
>>
> _______________________________________________
> nmglug mailing list
> nmglug at lists.nmglug.org
> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
>
>


More information about the nmglug mailing list