Almost half year ago I wrote a tip how to mount VDI fixed-size image with common *nix tools. Back then I thought about writing script for automation of described steps, but it didn't come off. No, it's not that hard, rather everyone can do it. Problem is with the partition table. First block of disk is enough to get information about primary partitions. It's often sufficient knowledge, but often doesn't mean always. Information regarding logical partitions can be found in extended one. So?
Writing program/script for all this stuff would be like developing streamlined sfdisk. Possible, but not necessary. Second solution is patching sfdisk to support skipping VDI header. Easy one, but sfdisk is not a stand-alone application. It's part of util-linux-ng and intelligently removing all non-related stuff would require some time, which I don't have now. The third and the last one option is what I actually did - I made special shared library for use in conjunction with sfdisk to skip VDI header. I named it vdiwrap and the source code is accessible at my C snippets page. Of course Mounting partition from VDI fixed-size image was also updated.
2009-03-20
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment