1819771 Members
3255 Online
109606 Solutions
New Discussion юеВ

Re: dd syntax ?

 
SOLVED
Go to solution
Maaz
Valued Contributor

dd syntax ?

Hello Gurus

I have read in diffrent posts that dd can be use to make a clone.
the souce machine have the following partitions
/dev/hda1 = /boot
/dev/hda2 = /usr
/dev/hda3 = /var
/dev/hda5 = /
/dev/hda6 = /home
Now i have attached the target/destination machine's hard drive to the source as hdb (primary slave)
what is the right syntax of dd to use so that hdb will be prepare as hda

Thanks n Regards
Regards
Maaz

4 REPLIES 4
Slawomir Gora
Honored Contributor
Solution

Re: dd syntax ?

Hi,
hda and hdb disk need to have the same size, geometry ..

if you want to clone entire disk you should boot from CD/DVD/NET/FLOPPY and use dd syntax:
dd if=/dev/hda of=/dev/hdb bs=20M
Maaz
Valued Contributor

Re: dd syntax ?

Millions of Thanks Dear Slawomir Gora
if u can plz explain why "bs=20M"

Regards
Maaz
dirk dierickx
Honored Contributor

Re: dd syntax ?

speed reasons...
Muthukumar_5
Honored Contributor

Re: dd syntax ?

dd if=/dev/hda of=/dev/hdb bs=20M means,

/dev/hda is used as source point of file name which gives data

/dev/hdb is used as destination pointe of the file name which gets data

bs means block size. Used to control speed of data that is going to be transfered from source to destination.

20M means -> Data transaction rate is with 1024 * 1024 Bytes.

20MB means -> Data trasaction rate is with 1000 * 1000 Bytes.

Refer dd man page for more details.

hth.
Easy to suggest when don't know about the problem!