Skip to content

Instantly share code, notes, and snippets.

@berkedel
Last active June 15, 2024 13:36
Show Gist options
  • Save berkedel/2d1ca25deb5035327a8b23e4790a4379 to your computer and use it in GitHub Desktop.
Save berkedel/2d1ca25deb5035327a8b23e4790a4379 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
@rampfox
Copy link

rampfox commented May 21, 2024

mau tanya mas, percobaan pertama pakai bindfs berhasil rw di ~/anyfolder nya
namun saat setelah reboot, saya ulangi step nya (mount dan bindfs) kok malah gabisa ya? tetap read only

ada masukan ga mas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment