Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 a backup of a Windows 7 drive (virtualbox install) made in .raw format and I want to extract it to my empty partition ready for Windows. Im using OSX. Any ideas? I have tried this:

sudo dd if=/Volumes/DATA/bootcamp.raw of=/dev/disk0s6

Which works fine but when I reboot (im on a hackintosh so im using the Chameleon boot loader) I get the normal Chameleon boot menu but with an unknown GPT partition (thats what its called) and If I select that it says: Missing Operating system. Is the MBR broken on that partition?

share|improve this question

You forgot to provide some key information so I will state some assumptions before answering your question.

  1. You have a RAW/dd image of an entire disk which includes the partition tables (MBR by the looks of it) and a file system in one of those partitions
  2. You want to write this disk image to an existing partition (GPT) on a separate disk

The problem is that you are nesting a partition table within a partition table and mixing partition table types to boot. So you have a GPT partition table and one of those partitions doesn't contain a file system like NTFS, but rather it contains an MBR partition table with a partition for NTFS.

To solve this, you will need to skip the partition table portion of the raw/dd image and just copy over the file system part of the image to your destination partition. Also, you will probably need to make sure that the destination partition has the correct file system type set.

Quick and Dirty Solution:

sudo dd if=/Volumes/DATA/bootcamp.raw of=/dev/rdisk0s6 skip=63 bs=16K

More Accurate Solution:

  • install The Sleuth Kit (TSK) to calculate exactly where the file system is located
  • mmls /Volumes/DATA/bootcamp.raw; This command will tell you the start of the file system and the length. Look for the file system you want under Description. You probably want the one that says NTFS.
  • sudo dd if=/Volumes/DATA/bootcamp.raw of=/dev/rdisk0s6 skip=$Start bs=1 count=$Length; Fill in the $Start and $Length variables with your values calculated from step 2. Also this will probably run really slow since we are setting the block size to 1 which will hurt buffering but you will copy exactly all the bytes in the FS and not a single byte more.

*Note that both of the above solutions assume that you have only 1 partition on your Windows system. If you have more partitions, then you will have to use the second solution and adjust for the additional partitions

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.