Read/Write ext2 ext3 ext4 on Mac OsX with fuse-ext2
you need the following installed to be able to compile:
Apple X Code + Apple X Code Command Line Tools (you find a download on the Apple Developers Website) + OSX Fuse
https://osxfuse.github.io/ (former Fuse for OSX)
go to website
https://github.com/alperakcan/fuse-ext2 and follow the instructions (copied below).
open terminal window and type
cd /tmp
sudo mkdir ext4
cd ext4
sudo nano script.sh
copy the following text to script.sh - [see below] (copied from github/alperakan), save+close with apple+x - yes - enter
sudo chmod +x script.sh (makes the file executable)
./script.sh (execute the file)
after the script has been executed test the fuse-ext2 function by typing
cd ~
dd if=/dev/zero of=fs.ext2 bs=1024 count=102400 (creates empty virt.disk)
/opt/gnu/sbin/mkfs.ext4 fs.ext2 (creates the ext4-filesystem)
fuse-ext2 fs.ext2 /Volumes/fs.ext2 -o debug,rw+ (mounts the disk in Finder)
if you get error messages try commands with sudo
if you have an already ext4 formatted harddrive/usb you can mount it by
plug in the hdd and click ignore if osx tells you to initialize or eject the disk
go to the terminal and type
df -h (won't show a extFs-Disk :-( )
but you will see one additional drive by typing
ls -l /dev/disk*
if you have doubts which disk is the extFs-Disk you can also type
diskutil list (in my case /dev/disk2s1)
to mount it in read-only with debugging messages in terminal type
sudo fuse-ext2 /dev/disk2s1 /Volumes/fs.ext4 -o debug,ro
to mount it in read-write-execute with debugging messages in terminal type
sudo fuse-ext2 /dev/disk2s1 /Volumes/fs.ext4 -o debug,rw+
it is also possible to share the hdd but i did not find a way to enable time-machine-ing through afp with a extFS-hdd.
::::script-content::::
export PATH=/opt/gnu/bin:$PATH
export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir fuse-ext2.build
cd fuse-ext2.build
if [ ! -d fuse-ext2 ]; then
git clone https://github.com/alperakcan/fuse-ext2.git
fi
# m4
if [ ! -f m4-1.4.17.tar.gz ]; then
curl -O -L http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
fi
tar -zxvf m4-1.4.17.tar.gz
cd m4-1.4.17
./configure --prefix=/opt/gnu
make -j 16
sudo make install
cd ../
# autoconf
if [ ! -f autoconf-2.69.tar.gz ]; then
curl -O -L http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
fi
tar -zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/opt/gnu
make
sudo make install
cd ../
# automake
if [ ! -f automake-1.15.tar.gz ]; then
curl -O -L http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
fi
tar -zxvf automake-1.15.tar.gz
cd automake-1.15
./configure --prefix=/opt/gnu
make
sudo make install
cd ../
# libtool
if [ ! -f libtool-2.4.6.tar.gz ]; then
curl -O -L http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
fi
tar -zxvf libtool-2.4.6.tar.gz
cd libtool-2.4.6
./configure --prefix=/opt/gnu
make
sudo make install
cd ../
# e2fsprogs
if [ ! -f e2fsprogs-1.43.4.tar.gz ]; then
curl -O -L https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.43.4/e2fsprogs-1.43.4.tar.gz
fi
tar -zxvf e2fsprogs-1.43.4.tar.gz
cd e2fsprogs-1.43.4
./configure --prefix=/opt/gnu --disable-nls
make
sudo make install
sudo make install-libs
sudo cp /opt/gnu/lib/pkgconfig/* /usr/local/lib/pkgconfig
cd ../
# fuse-ext2
export PATH=/opt/gnu/bin:$PATH
export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
cd fuse-ext2
./autogen.sh
CFLAGS="-idirafter/opt/gnu/include -idirafter/usr/local/include/osxfuse/" LDFLAGS="-L/opt/gnu/lib -L/usr/local/lib" ./configure
make
sudo make install