Mount Raspberry Pi SD card on Mac OS
Transferring large files through your local network can take a lot of time comparing to directly mount the micro SD card on your Mac.
The SD card contains a Raspbian image which has two partitions : The first one is a FAT16 (boot partition) and the second one is an ext4, which contains the Raspbian OS.
Ext4 journaling file system is unfortunately not readable on macOS by default. In order to read this particular filesystem, FUSE for Mac OS (osxfuse) and ext4fuse (read-only) need to be installed.
1. Installation with Homebrew
Open your terminal and install Homebrew (skip this step if you already have Homebrew installed):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install osxfuse and ext4fuse :
brew install --cask osxfuse
brew install ext4fuse
2. Plug your SD Card into your Mac
3. Get the partition identifier
Open your terminal.
diskutil list
In my case : disk2s2
4. Create a mount point
sudo mkdir /Volumes/raspberry
5. Mount the SD Card
sudo ext4fuse /dev/disk2s2 /Volumes/raspberry -o allow_other
allow_other : readable by everyone
That's it. Now you can read/copy the ext4 partition files from/to your Mac!
To unmount the disk :
sudo umount /Volumes/raspberry
How about to write on a ext4 partition?
There's two solutions:
- Free : Follow the instruction on the Github page of fuse-ext2. You can read/write on ext2, ext3 and ext4 partitions.
- Paid : Or you can pay for extFS for Mac by Paragon Software
Sources
- FUSE for macOS (Github)
- FUSE (Wikipedia)
- ext4fuse (Github)
- extFS for Mac by Paragon Software