11 May 2017
Mount Ext4 Filesystem on MacOS
Fuse-ext2
- Install dependencies:
brew tap homebrew/fuse brew install Caskroom/cask/osxfuse brew install e2fsprogs m4 automake autoconf libtool - Clone repository:
git clone --depth=1 https://github.com/alperakcan/fuse-ext2.git cd fuse-ext2 - Missing XCode workaround (optional):
If XCode is not installed, the following error will be thrown:
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
Since XCode is actually not required for building
fuse-ext2, this little workaround makes the error go away:ln -s /usr/bin/true /usr/local/bin/xcodebuild - Build & Install:
./autogen.sh CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure make sudo make install - Enable write access:
sudo sed -e 's/OPTIONS="local,allow_other"/OPTIONS="local,allow_other,rw+"/' -i.orig /Library/Filesystems/fuse-ext2.fs/fuse-ext2.util - Remove the XCode workaround symlink (optional):
rm /usr/local/bin/xcodebuild
Ext4fuse
- Install
ext4fusebrew install ext4fuse - Add current user to operator group:
sudo dscl . append /Groups/operator GroupMembership `whoami`
Mount Ext4 Disk
- Show available disks:
sudo diskutil list - Unmount Disk:
sudo diskutil unmountDisk /dev/disk2 - Mount partition:
mkdir mnt sudo fuse-ext2 /dev/disk2s2 mnt -o rw+ - Unmount partition:
sudo umount mnt