Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a full dd of my hard disk which has 3 partitions, how can I using this image only restore a specific partition?

share|improve this question

migrated from stackoverflow.com May 21 '12 at 3:38

This question came from our site for professional and enthusiast programmers.

    
The laziest way is just to restore the whole thing and then extract the partition you want. –  David Schwartz May 21 '12 at 3:54

2 Answers 2

up vote 3 down vote accepted

You can loop mount individual partitions. I have done this quite a few times but this blog and similar one you can find on net give you clear step.

http://madduck.net/blog/2006.10.20:loop-mounting-partitions-from-a-disk-image/

The key is to find the offset of your partition in the image.

This man page for bochs is likely more permanent

http://bochs.sourceforge.net/doc/docbook/user/loop-device-usage.html

share|improve this answer
    
By the way, partimage is a more efficient way of backing up partitions. –  johnshen64 May 21 '12 at 3:59

kpartx will allow you to use device mapper to map the partitions within the image to distinct device nodes.

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.