Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a HFS+ journaled external hard-drive and need to be able to write to it on Ubuntu. I don't have access to my Mac, it's thousands of miles away and I won't have access to it for three months.

Can anything be done without losing the data on the HDD?

share|improve this question
add comment

2 Answers 2

See How to mount a HFS partition in Ubuntu as Read/Write? - Super User

To quote from the second/third answer down:

First, make sure that you have hfsprogs installed. Example installation command:

sudo apt-get install hfsprogs

Next, mount or remount the HFS+ drive; commands need to be as follows:

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

or

sudo mount -t hfsplus -o remount,force,rw /mount/point

...

Finally, if the drive was improperly unmounted or has otherwise become partially corrupted run fsck.hfsplus ... as such:

sudo fsck.hfsplus -f /dev/sdXY

There is a goldmine of other information there regarding the mounting of HFS+ filesystems.

share|improve this answer
    
thanks, I'll give it a try. The info I'd found pointed out that ubuntu couldn't handle journaled htfs+ drive, and said that it had to be "unjournaled" in OSX. I don't have access to OSX for the next three months and thus can't reverse the journaling. –  oppochips Aug 14 '13 at 13:35
    
I tried and get sudo mount -t hfsplus -o force,rw /dev/sdb2 /media/sdb2 mount: /dev/sdb2 already mounted or /media/sdb2 busy mount: according to mtab, /dev/sdb2 is mounted on /media/1ad12b58-c2f2-39d3-955f-54ea66a96b2b The drive (a hfs+ journaled volume) mounts as read only. is it possible to write to it without having to undo the journaling on mac os? I tried the last command and get ** Checking HFS Plus volume. fsck_hfs: Volume is journaled. No checking performed. fsck_hfs: Use the -f option to force checking. –  oppochips Aug 14 '13 at 13:47
    
From the link posted above : "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. 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)" I don't have access to a mac,, is it possible to gain read and write access on the drive without losing the data? thanks b –  oppochips Aug 14 '13 at 13:56
    
You should try: sudo mount -t hfsplus -o remount,force,rw /dev/sdXY /media/mntpoint (or leave out /dev/sdXY and point it to where it is currently mounted) instead. I will edit this into my answer. –  Richard Aug 14 '13 at 14:28
    
thanks. What do I need to put instead of "mountpoint" ? I tried sdb2 and get sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 /media/dev/sdb2 mount: mount point /media/dev/sdb2 does not exist and then tried sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 and got : –  oppochips Aug 14 '13 at 14:37
show 14 more comments

Borrowing from the previous answer, the following steps worked for me. Hopefully this is useful to others:

  1. Plugin the external HDD
  2. Notice that Ubuntu mounts it automatically but it is read-only
  3. Unmount the drive (I do this simply by clicking on the eject button in the file explorer).
  4. $ sudo apt-get install hfsprogs
    
  5. $ sudo fsck.hfsplus /dev/sdXY
    
    ** /dev/sdXY
    ** Checking HFS Plus volume.
    ** Detected a case-sensitive catalog.
    ** Checking Extents Overflow file.
    ** Checking Catalog file.
    ** Checking multi-linked files.
    ** Checking Catalog hierarchy.
    ** Checking Extended Attributes file.
    ** Checking volume bitmap.
    ** Checking volume information.
    ** The volume ########### appears to be OK.
    
  6. Remount the drive (I do this simply by clicking on the drive in the file explorer).

  7. The drive is now read-write.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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