Reputation: 14251
Given a block of data (which the filesystem thinks is the whole drive) and the type of filesystem (fat32, ntfs, ext3) I would like to know how to extract files out of that block of data. Any ideas on how to do this?
Upvotes: 1
Views: 1097
Reputation: 168988
You ultimately have two options:
losetup
can be helpful to accomplish this.This all assumes that the virtual disk is just a flat image file, not a specialized container like VMDK or VDI. If it is, you'll either need to extract the flat image or find a library that is capable of providing the flat content to other libraries.
Upvotes: 2
Reputation: 91017
You mount it to some point using
mount image /mount/point -o loop,ro
and access the files in it. Afterwards, you can unmount again.
But I do not understan what this has to do with C or C++.
Upvotes: 0