How can I mount a multi-partition img file on macOS?

I have an img file that has several partitions in it.

When I mount it with DiskImageMounter, I just see the first partition but I can't find a way to access the other partitions.

I don't see an option in fdisk either.

The diskutil output is:

 /dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        +31.9 GB    disk2
   1:             Windows_FAT_32 BOOT                    67.1 MB    disk2s1
   2:                      Linux                         2.1 GB     disk2s2
   3:                      Linux                         29.5 GB    disk2s3

It's an image for the Raspberry Pi and it is supposed to be written directly on a SD card.


macOS does not natively support or mount Linux partitions. You'll need to install some third-party utilities to be able to mount, e.g. ext2, ext3 or ext4 formatted partitions/disks.

FUSE for macOS comes to mind, along with ex4fuse.