I have four filesystems with various sample files on them that I want to combine into a single image. How would I do this using dd
? Should I be using something else other than dd
? Thanks.
I have four filesystems with various sample files on them that I want to combine into a single image. How would I do this using dd
? Should I be using something else other than dd
? Thanks.
While you can either have the entire disk be imaged, or one partition, it is impossible to use
dd
to put multiple 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:This creates two files in the directory of your choice (see second argument). Be careful not to get the
if
andof
confused as you can destroy data if you make a mistake.