Mount an ext4 Linux drive on macOS Mojave

tl;dr


Fuse for macOS (osxfuse)

make sure you have MacFUSE Compatibility Layer checked as this is required for Fuse-ext2

brew cask install osxfuse

Fuse for macOS (aka osxfuse) does nothing out of the box, it just gives you the capability of installing plugins. From hereon you can install plugins for the different filesystems that you want to mount.

Ext2/3/4

Read-only:

brew install ext4fuse # read only support

Read/Write:

# install dependencies
# brew install autoconf automake libtool gettext e2fsprogs
# brew link --force gettext

# install osxfuse
# git clone --recursive -b support/osxfuse-3 git://github.com/osxfuse/osxfuse.git osxfuse
# ./build.sh -t distribution


# install fuse-ext2
git clone git@github.com:alperakcan/fuse-ext2.git
cd fuse-ext2
./autogen.sh
CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure
make
sudo make install
Usage:    fuse-ext2 <device|image_file> <mount_point> [-o option[,...]]

Options:  ro, rw+, force, allow_other
          Please see details in the manual.

Example:  fuse-ext2 /dev/sda1 /mnt/sda1
diskutil list
fuse-ext2 <device|image> <mountpoint> [-o option[,...]]
options:
ro   : mount read only
force: mount read/write
allow_others: allow other users to access
debug: noisy debug output
mount -t fuse-ext2 /dev/sda2 /mnt/sda2

NTFS

# install NTFS plugin for FUSE
brew install ntfs-3g

# manually mount in read/write mode
sudo mkdir /Volumes/NTFS
sudo /usr/local/bin/ntfs-3g /dev/disk1s1 /Volumes/NTFS -olocal -oallow_other
# find your drive's partition
diskutil list