- Plug the microSD card into a card reader connected to your Mac. The
boot
volume will be automatically mounted, but it doesn’t contain all the files from the Pi’s primary filesystem.
- Make sure you have Homebrew installed (instructions here), so you can install the tools you need to mount the filesystem.
- Using Homebrew, install osxfuse and ext4fuse (find out more about the tools on the FUSE for macOS website):
-
brew cask install osxfuse
-
brew install ext4fuse
-
- Use Disk Utility on the command line to find the Raspberry Pi’s partition ID; run
diskutil list
to get output like below:
$ diskutil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 500.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_HFS Macintosh HD 499.3 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *32.0 GB disk4
1: Windows_FAT_32 boot 66.1 MB disk4s1
2: Linux 31.9 GB disk4s2You should be able to tell which drive is your Pi drive by the description (
external, physical), the ‘Linux’ partition type, and the size of the disk (e.g.
31.9 GBfor my 32 GB card). The ID is the
disk4s2in my case, in the
IDENTIFIERcolumn.
- Create a ‘mount point’—a folder on your Mac where you will ‘mount’ the Linux partition so you can read data from it:
sudo mkdir /Volumes/rpi
(
sudorequires you to enter your Mac account’s admin password, since it performs actions with elevated privileges—enter your password when prompted.)
- Mount the drive using
ext4fuse
:
sudo ext4fuse /dev/disk2s2 /Volumes/rpi -o allow_other
The
-o allow_otheris required to make sure the mounted disk is readable by everyone (and not just the
sudo/
rootuser). See this issue: Unable to open ext4 mounted partition on El Captain.
Now you’ll see the
volume mounted in the Finder. You can open it and read from it just like any other disk, card, or flash drive you connect to your Mac.
Once you’re finished, make sure you safely unmount the disk, by either ejecting the disk in the finder, or running
in Terminal. After that, you can unplug the card and put it back in your Pi, where it will be ready to do more awesome Pi things!