Score:0

Mount a full disk / memory image that contains multiple partitions formatted in FAT32, EXT3 and EXT4 (Android type)

in flag

I have made a full memory backup of my rooted Android phone and I would like to be able to mount the images of the Internal Memory and the SD Card in Ubuntu.
The Internal Memory has many different partitons formatted in Linux compatible FS types. The SD Card is formatted in 2 partitions: one FAT32, one EXT4.

When I try to mount the Internal Memory image using the default Disk Image Mounter, Ubuntu adds it to the loop devices list, but does not mount it. On screen there is no displayed message.
When I try to mount the SD Card image using the default Disk Image Mounter, the FAT32 partition is correctly mounted and all the files are readable. The EXT4 partition is added to disks, shows up in Nautilus, but when opened, it displays a message saying the loop partition cannot be mounted read-only.

I know that if I extract the partitions one by one Ubuntu can properly mount them, but it is more convenient for me to have all the information in as few files as possible.

Is there any command that might make this work? Thank you!

cc flag
I've never done any offsets with the loop mounts, but see the man mount and man losetup pages.
sudodus avatar
jp flag
You can use `kpartx` to mount partitions in image files. See [this link](https://askubuntu.com/questions/1347700/failed-to-read-last-sector-when-trying-to-mount-dd-file/1347723#1347723).
antoniu200 avatar
in flag
@ubfan1 Not sure what you mean by 'man mount' and 'man losetup'. Are those commands? I cannot access my computer right now, hence my question.
antoniu200 avatar
in flag
@sudodus I am going to try your suggestion once I get to my PC. I would prefer something GUI, but if commands are the only way to go in this case, so be it.
sudodus avatar
jp flag
@antoniu200, This is rather advanced, and a typical case for command line ;-) You are welcome back and ask if you need more details. Good luck!
sudodus avatar
jp flag
@antoniu200, `man` is a command that you run in a terminal window: There are manual pages for most programs that are installed, and you can read them via `man program-name`. When you have installed `kpartx`, you can run `man kpartx` and find details. There are also tutorials, that you find via the internet, and the tutorials often describe better (particularly for beginners).
antoniu200 avatar
in flag
@sudodus Nope, `kpartx` doesn't mount it. After doing `sudo kpartx -av`, it adds the image to the loops device list, but after doing `lsblk -o name,size,fstype,label,mountpoint` it detects the loop size correctly, but it doesn't return fstype, label or mountpoint. I would probably need another solution.
sudodus avatar
jp flag
Well, you have a solution that works, although is is a bit cumbersome. Sorry, but I have no other solution except trying 'manually' according to the tips by ubfan1.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.