Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.