1

How can I dd an image of a single partition out of a full-disk image? I know skip and count, but I am supposed to divide by bs, and since this is the first partition, it's start point is early in the image and dd says the number is not valid for skip. After playing around a bit, I get an image that's roughly the right size but parted can't read it. I also tried without a bs (bs=1 presumably), and this also appears to copy the right amount of data, but parted still can't read the image.

I can mount with offset but I want the whole partition block and I don't know if mounting and dding the mountpoint is going to give me something suitable to copy directly back onto the disk. I just want to restore a single partition to the disk and leave the others alone. I'd like to split the partition into its own image file first so I can confirm it looks the way I want.

jeffcook2150
  • 225
  • 1
  • 2
  • 7

2 Answers2

1

Use kpartx to create device nodes for each of the partitions within the image.

Ignacio Vazquez-Abrams
  • 45,019
  • 5
  • 78
  • 84
0

Does this help? http://ubuntuforums.org/showthread.php?t=711773

devicenull
  • 5,572
  • 1
  • 25
  • 31