Mounting partitions contained within a raw disk image
I am wondering if anyone knows a quick way to mount partitions contained within a raw, complete disk image. (i.e. created by dd -if /dev/sdX) I try to avoid creating these for obvious reasons, but when the situation requires it being able to loop mount partitions within the image would be a handy tool. Since the image is complete and raw it contains the MBR ant partition table, so I cannot just "mount -o loop /file/image /mnt/point" and have it work.
I currently know of two solutions:
1) Pull the partition table out of the image, dd the partition I want to a new file, and mount that. I don't like this option because it requires enough disk to create a whole new file, and requires the copy time to make it.
2) Route the image through AoE so the kernel will create partition devices on the AoE nodes. This works well, but requires AoE support.
Does anyone know of a third option? I'm hoping for an option that creates dev (or comparable) nodes like AoE, but doesn't require looping the data through the network stack.
Last edited by TJNII; 08-22-2011 at 10:21 AM.