HOWTO: Use the ‘dd’ Command.

Posted in Technology
Tue, Dec 27 - 10:17 am EDT | 13 years ago by
Comments: 3
Be Sociable, Share!
Use Arrow Keys (← →) to Browse

I was at a Calgary Linux User Group installfest once and I showed an interest in Suse (9.3 at the time). In true community style, one of the people there immediately began burning a copy of the DVD for me.

The thing that I didn’t really understand at the time was that he didn’t have an ISO file. He only had his DVD yet he somehow managed to create another DVD for me. To be more correct, it’s not that I didn’t understand it, it’s that I didn’t realize the significance of what he had done until much later in my GNU/Linux experience.

The command used to create my DVD from the source DVD was the oft misunderstood dd command. In its simplest form, the dd command copies the source drive or partition to the target drive or partition block by block. This is the significant part: block by block. With dd you can create perfect images of drives or partitions for many purposes like backups or copying file structures as was the case in my CLUG story.

My memory is fuzzy, but it seems to me that after using dd to create a copy of his DVD, he must have used cdrecord to burn it to my DVD, but that’s a story for another day.

The simplest dd command takes the form of dd if=source of=destination bs=number of bytes to copy in a pass. Such as:

dd if=/dev/sda2 of=/dev/sdb2 bs=4096

Having said that, if you reverse your target and source, you’re going to be in a world of hurt as you will likely have overwritten your good data with bad data or blank sectors.

The best tutorial (and subsequent discussion thread) that I’ve seen to date is on Before attempting to use dd, I recommend taking a run through the forum and reading the instructions and questions.

Here’s the link: Learn the DD command –

Happy copying!

Use Arrow Keys (← →) to Browse

Be Sociable, Share!

Related Posts

  • Pingback: » Learn the DD Linux command

  • GrammatonCleric

    If you want to create image a DVD (video or data) all you have to use the same command line command set as above except change the “of=” to “of=/some/dir/image.iso”.

    and to burn it use…

    growisofs -Z /dev/scd0=image.iso

    Now the output device (/dev/scd0) may be different. This should be what ever your burner is.

    - GC

  • Jon

    Thanks GrammatonCleric!

Be Sociable, Share!