Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rampfox/a7014877cac9e97076d9bef18d11b9dd to your computer and use it in GitHub Desktop.
Save rampfox/a7014877cac9e97076d9bef18d11b9dd to your computer and use it in GitHub Desktop.
Mount HFS+ in Raspberry Pi

The first thing to do before we access HFS+ drive, ensure our board is running lastest software.

sudo apt update
sudo apt upgrade

Install all HFS packages we need.

sudo apt-get install hfsplus hfsutils hfsprogs gdisk

Decide your device's mounting path for instance we will use /media/hfsplus.

sudo mkdir /media/hfsplus

Check the drive with HFS+ filesystem.

sudo fdisk -l

For instance, the HFS+ drive located in /dev/sda2. We will mount this to /media/hfsplus as read-only.

sudo mount -t hfsplus -o noowner /dev/sda2 /media/hfsplus

Or, for writable partition you need to run the command below

sudo mount -t hfsplus -o force,rw /dev/sda2 /media/hfsplus

The following steps is optional if you encounter file permission and not able to access particular folders or files. We will need bindfs

sudo apt install bindfs

Now take mounted file system before and provide a view of it with any uid you'd like.

mkdir ~/anyfolder
sudo bindfs -u $(id -u) -g $(id -g) /media/hfsplus ~/anyfolder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment