First timer here. I've searched around here, but haven't found a question like the one I have. Apologies if I missed it.
The challenge at hand: produce a "raw disk image file" from a given WIM file. What I am pursuing so far is to use imagex.exe with the "/apply" operation to take the WIM and lay it down in a directory on a server. That seems to produce all the necessary "stuff" I need in that directory.
How would I take that content and produce a "raw disk image file"? I'm told the definition of "raw disk image file" is a block-by-block copy of the disk image, which I hope is the output of the "imagex.exe /apply" command I use currently, but stored in a single file I can hand back to another system in our solution.
imagex.exe /apply image.wim 1 R:\WimImagePoint
I would like to take the contents of R:\WimImagePoint and produce the elusive (to me) "raw disk image file". ISO is not what they want, nor is anything requiring winPE.
Any pointers? External utilities' references are welcome. Would like to avoid unmanaged code solutions as much as possible, but will entertain them if that's the only route.
Also, I am not married to the idea of imagex /apply as the starting point, it's just the comfort zone so far.
Here's what I wound up doing (submitting answer to my own question to help the greater good, I hope):
Use diskpart.exe with the following commands in a text file:
Then, I used the /apply option off of imagex.exe to apply the WIM file to this logical volume:
Then, used either bootsect.exe (server 2003) or bcdboot.exe (server 2008 and 2008 R2). This example is for 2003:
Then, ran diskpart.exe again with these commands in a text file:
Then, we ran some homegrown VHD to VMDK code and all is well. I suspect you can take this VHD and convert it using standard tools as well.
Hope this helps the greater good.
You can make a block-for-block copy using dd for Windows, but I don't think that's what you need here. I'm guessing that a "raw" file would include all the file system information, e.g. the FAT32 file allocation table, and the WIM won't have that.
Try using wim2vhd then convert vhd2raw using a tool that can do that. Sounds like maybe VBoxConvert or qemu-img can help with the second step.
EDIT
By the looks of these screenshots, StarWind V2V Converter might be the easiest way for the second step.