5

I have an external drive that I am formatting for a Mac friend, so I set it to HFS+ using Gparted. I am unable to write any files to the drive now, even after running the mount command with the rw option. Running grep sda1 /proc/mounts (the drive I want) returns:

/dev/sda1 /media/username/readwrite hfsplus rw,relatime,umask=22,uid=0,gid=0,nls=utf8 0 0

Note that it is mounted as rw.
But copying from the terminal or Nemo returns "Error: read-only file system". Since I formatted the drive on Linux, the HFS+ volume is not yet journaled. I need to copy some files to it before I give it to my mac friend. What should I do?

1
  1. You need to turn off the journaling if you want to write to it from Ubuntu. Ubuntu only has support for writing to non-journaled HFS+ volumes. Disabling journaling from HFS+ is still possible up to OS X Yosemite 10.10

    On your Mac:

    • Open Disk Utility under Applications -> Utilities
    • Select the volume to disable journaling on.
    • Choose Disable Journaling from the File menu. (On later Mac OS versions you'll have to hold down the option button when you click the File menu. Or if you like Apple+J)
  2. Now plugin the HFS+ Hard drive into Ubuntu and run this command:

    $ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
    

    example output:

    sda                       
    ├─sda1 vfat     300M     EFI
    
    └─sda2 hfsplus  100G     VolumeName
    

    So we are only interested in sda2 in that example.

    $ sudo apt-get install hfsprogs
    
  3. Create a folder in your home directory called backup and copy the full path of backup to put at the end of the following command:

    $ sudo mount -t hfsplus -o force,rw /dev/sda2 /home/user/backup
    

    Now for good luck:

    $ sudo mount -o remount,rw /home/user/backup
    
  4. Now for HFS+ submission:

    $ sudo chmod 775 /home/user/backup
    
  5. Testing with terminal:

    $ cd /home/user/backup
    $ mkdir test
    
  6. Now check with your file manager if test directory was created. But what the heck, the file manager still can't write to HFS+.

    Force submission of file manager

    ### sudo filemanager, for eg.
    $ sudo thunar
    
  7. And now after a long overdo process you now have access to HFS+.

    Afterwards, plug the drive back into the mac, turn on journaling and use disk utility to repair permissions.

  • 1
    I don't have a mac :( – Nathaniel Weiland Sep 12 '18 at 2:55
  • On Mojave, this can't be done in Disk Utility anymore. But you can diskutil disableJournal /Volumes/<name> in Terminal. – jrc Mar 4 '19 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.