PDA

View Full Version : [ubuntu] clone usb using "dd"



TomAbada
April 26th, 2010, 09:45 AM
hi all
i made a live USB ubuntu
and now i wanna clone the USB to another new USB
i wanna do it using "dd" but i have no idea how

both of the USBs connected to my PC. one USB is a live ubuntu,
the other is empty

how can i clone one to another ??

thanks in advance

Grenage
April 26th, 2010, 09:53 AM
It should be a simple case of:


dd if=/dev/sdx of=/dev/sdy bs=4096

Where x is the source USB disc and y is the destination disk. Do not put the wrong drives in the command, it will overwrite without prompting you.

TomAbada
April 26th, 2010, 10:13 AM
thanks

ive tryed to do that command
but it says it that the USB is a directory

can dd copy directories ?

Grenage
April 26th, 2010, 10:16 AM
dd can copy anything, it's dealing with raw blocks.

Can you post the exact command you used, and a rough output of sudo fdisk -l.

TomAbada
April 26th, 2010, 10:40 AM
i forgot to mention an important detail
the live USB has encrypted partitions

is it still possible of doing "dd" ?

btw ive wrote the command and it seems the terminal is not doing anything

though when i try to close it it says "there is still a process running in this terminal, closing the terminal will kill it"

so it means its in the middle of copying ??

Grenage
April 26th, 2010, 10:42 AM
dd is not concerned with partitions, files, directories or anything else. It literally just copies blocks of data - it does not care what they are.

TomAbada
April 26th, 2010, 10:44 AM
oh i c
so its no problem then

thanks a lot for ur help :)