TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

Mount an ext4 Linux drive on macOS Mojave

January 14, 2019

tl;dr


Fuse for macOS (osxfuse)

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

code
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:

code
brew install ext4fuse # read only support

Read/Write:

code
# 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
code
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
code
diskutil list
code
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
code
mount -t fuse-ext2 /dev/sda2 /mnt/sda2

NTFS

code
# 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
code
# find your drive's partition
diskutil list