Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have four filesystems with various samples files on them that I want to combine into a single dd image, how would I do this using dd? Should I be using something else other than dd? Thanks.

share|improve this question
Any suggestions would be appreciated! – Alkthree Aug 15 '12 at 17:17
You can image either one partition or the entire disk. If you want to image the entire disk, tell me so I can add an answer. – hexafraction Aug 15 '12 at 17:20
There is no way to image 4 different filesystems together? – Alkthree Aug 15 '12 at 17:24
You can make multiple images and keep them as files. – hexafraction Aug 15 '12 at 17:24
So could I image all four filesystems individually then combine them into single dd image? – Alkthree Aug 15 '12 at 17:27
up vote 1 down vote accepted

While you can either have the entire disk be imaged, or one partition, it is impossible to use dd to put a few partitions(selectively) in one file. It would require reworking the partition table of the image. You can, however, selectively copy multiple partitions to separate files. Let's copy /dev/sda1 and /dev/sda3 below:

sudo dd if=/dev/sda1 of=/media/HARDDISK/sda1.img

sudo dd if=/dev/sda3 of=/media/HARDDISK/sda3.img

This creates two files in the directory of your choice(See second argument). Be careful not to get the if and of confused as you can destroy data if you make a mistake.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.