The image file has a partition table, and it contains multiple partitions.
loopback devices might be a possibility.
Related threads:
The image file has a partition table, and it contains multiple partitions.
loopback devices might be a possibility.
Related threads:
Let's say $IMAGE is set to the path to your image file. You could write a small script by using
to get a list of partitions inside the image. And then use a sequence of
Where offset is calculated means the info from fdisk (start sector * size of a sector in bytes) and $DEST a unique name for each of the partitions.
That's not directly the solution but I hope a pretty good indication on how to realize it. If you make the job once, you've some small nice beginning for some forensic toolkit!
You might do it like this, without much hassle:
And to remove the loop device after you finished:
losetup -P
automationlosetup -P
is the best method starting in Ubuntu 16.04 as mentioned at https://stackoverflow.com/a/15200862/895245 , here are functions to automate if further. Usage:Source:
Ok, this question is aeons old, but just for the sako of completeness: This here seems a lot easier to me.
Quote:
If you have util-linux v2.21 or higher, you can now do this with losetup. Use the
-P
(--partscan
) option to read the partition table and create device nodes for each partition:Some more automation to the previous answers that were great.
To further simplify the task (which is needed if you do it often), you may use my script
mountimg
to do everything for you. Just get it from https://github.com/AlexanderAmelkin/mountimg and use like this:You may as well specify filesystem type and any other additional mount options if you like:
When you're done with the partition, simply
umount
it: