LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   imaging pen drive using dd (https://www.linuxquestions.org/questions/linux-newbie-8/imaging-pen-drive-using-dd-814438/)

pranks 06-16-2010 02:14 AM

imaging pen drive using dd
 
HI i want to image my pen drive using dd command
i tried

dd if=/media/disk of=/media/disk-1/images.img

where disk is my pen drive and disk-1 is my hard disk
I boot and run the pc using linux bootable cd

Bubo 06-16-2010 02:43 AM

Pranks

I am not too sure what your question is, but your syntax is basically correct assuming that you are wanting to write the image file (images.img) to a second mounted device (disk-1).

Code:

dd if=/media/disk of=/media/disk-1/images.img
If I am reading your post correctly, you appear to want to copy one pen drive to another (?) which won't happen with the code you have used.

The simplest way is to create a "dd" image on your local machine then use a similar command to write the image file to the second device.

Something like:
Code:

To get the first image file:
dd if=/media/disk of=images.img bs=512 conv=noerror,sync

<this will copy the physical device at /media/disk, in blocks of 512 bytes to a file called images.img. The final part of the string basically tells dd to not stop if it finds an error (it will pad the bad sectors with zero's) and to align the blocks in both copies>

Code:

To write the copied data to the second device:
dd if=images.img of=/media/disk-1 bs=512 conv=noerror,sync

As I said, that is theory based on my perception of what you are trying to do. If I have got it wrong then by all means shout up and put me right!

Bubo

Bubo 06-16-2010 02:48 AM

I forgot to say, I wrote a short blog article some time ago on the basics of using dd. The blog fell by the way side long ago but the article can still be found here

pranks 06-17-2010 01:37 AM

thnx
 
Thnx a lot for prompt reply.
I was trying to copy pen drive data to hard disk.
Actually i was taking wrong path for pendrive .


All times are GMT -5. The time now is 04:48 AM.