Saturday, October 02, 2010

Mount hfsplus and hfs read write on Linux

Mount HFS+ rw on Linux (at your own risk...)

# Install HFS+ support
aptitude install hfsplus hfsprogs hfsutils
# Keep an eye on your dmesg:
tail -f /var/log/messages
# Get an idea on what partition you'd want to mount
cat /proc/partitions
# See what filesystems are supported
cat /proc/filesystems
# Check for a hfsplus LKM
modprobe -l | grep hfsplus
# Load it
modprobe hfsplus
# Check to see if it's loaded
grep hfsplus /proc/partitions
# Mount the HFS+ partition. If it's journaled, we don't need -o force.
mount -t hfsplus -o force -o rw /dev/sda2 /mnt/test
# Verify it
/dev/sda2 on /mnt/test type hfsplus (rw,force) touch /mnt/test/selftest ls -la /mnt/test/selftest
# If we're not allowed to mount with the write option, check dmesg
# If required, fsck, then remount.
/sbin/fsck.hfsplus -f /dev/sda2
# As an alternative, you can disable the journal on a MacOS:
# GUI: hold option while clicking the menu in Disk Utility. CMD:
diskutil list
sudo diskutil disableJournal /Volumes/Yourdisk

5 comments:

Cosu said...

Dark side joined you have

Cosu said...

dark side joined you have

Torsten said...

Very useful, thanks for sharing!

Torsten said...

Very useful, thanks for sharing!

Torsten said...

Very useful, thanks for sharing!