When I decided to reformat and install my Mac Mini with the latest testing version of Debian (lenny, at the time of this writing) I discovered that I couldn't mount my HFS+ OS X backup drive with write access:
erin:/# mount -t hfsplus /dev/sda /osx-backup
[ 630.769804] hfs: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.
This warning puzzled me because I was able to mount fine before the reinstall and, since the external drive is to be used as the bootable backup for my MBP, anything with "at your own risk" was unacceptable.
I had already erased my previous Linux installation so I had no way of checking what might have previously given me write access to the HFS+ drive. A quick apt-cache search hfs
revealed a bunch of packages related to the HFS filesystem. I installed the two that looked relevant to what I was trying to do:
hfsplus - Tools to access HFS+ formatted volumes
hfsutils - Tools for reading and writing Macintosh volumes
No dice. I still couldn't get write access without that warning. I tried loading the hfsplus
module and then adding it to /etc/modules
to see if that would make a difference. As I expected, it didn't. I was almost ready to give up but there was another HFS package in the list that, even though it seemed unrelated to what was trying to do, seemed worth a shot:
hfsprogs - mkfs and fsck for HFS and HFS+ file systems
It worked! I have no idea how or why (and I'm not interested enough to figure it out), but after installing the hfsprogs
package I was able to mount my HFS+ partition with write access.
Update:
As Massimiliano and Matthias have confirmed in the comments below, the following solution seems to work with Ubuntu 8.04:
From Linux, after installing the tools suggested before, you must run:
mount -o force /dev/sdx /mnt/blablaOtherwise, in my fstab, I have an entry like this:
UUID=489276e8-7f9b-3ae6-8c73-69b99ccaab9c /media/Leopard hfsplus defaults,force 0 0
Just what I was looking for. Thank you!
Glad I could help, Tobias! π
I recently encountered something similar to this problem too, while trying to create an hfs+ partition om my debian server…
After “apt-get install hfsplus hfsutils hfsprogs”, I was able to create an partition and even mount it, but I cannot write to it though.. π
#mkfs.hfsplus -J /dev/vg01/lv01
Initialized /dev/vg01/lv01 as a 500 GB HFS Plus volume with a 49152k journal
# mount /dev/vg01/lv01 /media/lv01/
# mkdir test
mkdir: Can’t create directory “test”: Filesystem read-only
(this is a rough translation from my swedish error messages) π
Ao now I am curious if you did anything else to get your hfs+ disk writable?
Hi Andreas,
I didn’t need to do anything special to mount the disk writable. If the drive is automatically mounted, you might want to check /etc/fstab to make sure the ‘w’ flag is there to make the drive writable. Can you show me the output of the ‘mount’ command after you’ve mounted the drive?
Hi!!!
know because I get this error?
root[victor]# mount -t hfsplus /dev/sda5 /mnt/Mac/
mount: tipo de sistema de ficheros ‘hfsplus’ desconocido
Hi Victor,
It sounds like the system isn’t recognizing the hfsplus filesystem format. Have you installed hfsplus, hfsutils, and hfsprogs? If you’re using Debian or Ubuntu, you should be able to run the following command to install them:
sudo apt-get install hfsplus hfsutils hfsprogs
Good luck!
Hi all,
I couldn’t get my disk to mount as read and write either.
I installed all the packages and have all the modules, but I’d still get the “hfs: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.” message.
The solution that did work out for me was this:
Back on a Mac go to the command-line and, after your disk has shown up on the Desktop, do:
“sudo diskutil disableJournal /Volumes/volumeName”
where ‘volumeName’ is the name of the disk (as it appeared on the Desktop).
From then on the disk will no longer be journaled and will mount read and write on Debian.
Hope this will be useful for someone out there. Cheers.
Thanks for the tip, Roberto!
No. You shouldn’t disable “journal”!
I am not going to explain you what journal is, but without journal, after a crash, you may loose files and need a filesystem repair.
From Linux, after installing the tools suggested before, you must run:
mount -o force /dev/sdx /mnt/blabla
Otherwise, in my fstab, I have an entry like this:
UUID=489276e8-7f9b-3ae6-8c73-69b99ccaab9c /media/Leopard hfsplus defaults,force 0 0
It was quite easey. If the error message says “use force”, what else you can do?
Yes, this is the solution (see Massimiliano), at least it works (tested on Ubuntu 8.04 using the packages hfsplus and hfsprogs):
the force option is the only way to allow to write to the HFS volume, as the warning message explains, even though without the force option mount says that you may write to the volume (but this is not the case actually!).
Why should you want to switch off the useful journal, if it’s not even necessary? So leave it on for the sake of consistency of your data.
Thanks for the confirmation, Matthias! I have included your mention of testing it with Ubuntu 8.04 in the post.
“Why should you want to switch off the useful journal, if itβs not even necessary?”
Easy: the Linux driver for hfsplus is not able to manipulate the journal, so if you mount with `force’ with a journal, you can end up with some nasty corruption when you try to access the partition from Mac OS X (which will use the journal, unaware that it is out of date).
Thanks for the update, Massimiliano! I have updated the post.
The linux driver might require journaling to be disabled in order to mount… I am not sure. If so follow what was mentioned.
What I have noticed though is that sometimes if you fsck the disk it will be able to mount. But you must force it to. the command should be something like
fsck.hfsplus -f /dev/sdaX
after doing this I’m usually able to mount the partition RW… as a note.. this must be done with the partition unmounted.
hope it works!
Thanks for the comment and the tip! π
Upvote for this… I had to perform fsck.hfsplus on my partition before it would mount with write – even though I tried -o force beforehand.
This worked for me! thanks!!
;Your tip solved my issues with not being able to write to a rw-mounted hfsplus
USB-stick. It kept telling me it was a ro filesystem, although ‘mount’ was
showing it was indeed mounted rw.
Thanks :->
You’re welcome, Huldu! I’m glad that I could help. π
at last uff!!!..
~$ sudo apt-get install hfsplus hfsutils hfsprogs
~$ sudo mount -o force /dev/sdc1 /home/gino/Escritorio/Macaquero/
Thanks a lot!!!! good work!!
Regards!!
You’re welcome, Gino! Thanks for stopping by!
It says: “mount: you must specify the filesystem type”
Alessandro, please make sure you’ve installed the hfsplus, hfsutils, and hfsprogs packages. If you still receive that message, try adding
-t hfsplus
to the mount command.Confirmed! This worked on my triple-boot macbook laptop. Now I have 3 gigs of extra HD space. Thanks.
You’re welcome, Johan! Thanks for the comment and confirmation! π
If the drive has been mounted automatically (as it should be on a desktop system like Ubuntu), you can enable write with
sudo mount -o remount,force,rw /mount/point
or
sudo mount -o remount,force,rw /dev/sdx
/mount/point would usually be /media/Your_drive_label
/dev/sdx is your HFS+ device
use mount -l to find which device is mounted on which mount point
Awesome! Thanks for the info, RD! π
The above approach didnt work for me.
I had to disable journaling in mac
Then ubuntu auto mounts it
chmod -R 777 *
Then i am able to rw
But the moment i restart the box.
Its back to square 1. I have to repeat the steps above
sudo mount -o remount,force,rw /mount/point
or
sudo mount -o remount,force,rw /dev/sdx
These work. Thanks RD!
Thank you for sharing that, Dhon! π
For those of you who had problems with this. This is how it should go :
1. sudo fsck.hfsplus -f /dev/sda2
2. sudo apt-get install hfsplus hfsutils hfsprogs
3. sudo mount -o force /dev/sda2 /media/Mac
You will need the first step sometimes, if there has been some recent formats or resizing of the partition.
Thanks for the tip, glam! π
Great!!! Thanks a lot, it solved my
mount: warning: /home/badouble/CRRTools seems to be mounted read-only.
Hi,
This is a nice post about how to write to hfs+, and let me start by saying that this approached has worked for me. At the same time, I would like to reiterate a caution (sort of mentioned above by Stefan Monnie) β the βforceβ option to mount opens a back-door that allows write access despite the journaling system. This can cause issues with the file-system later on. See β http://tinyurl.com/aoewcj4 under the βforceβ option. As the wiki page for HFSPlus says, the project to fully support write on HFS+ under linux was taken up under Google summer of code a couple years ago, but I donβt think it was ever completed.
So, the βforceβ option merely hides the warning, assuming you know what youβre doing!
Thanks so much for sharing that, Prathmesh! π
Really helpful and useful info. Thanks for posting this.
You’re most welcome, Chris! I’m glad you found this helpful. π
(Sorry for the delayed reply; I’m just catching up to comments now!)
Hi,
I always get:
mount: warning: /home/badouble/CRRTools seems to be mounted read-only.
π
Not irrelevant at all. I just got this error trying to mount an external volume on Ubuntu 14.04. Thanks for posting this article.
Thanks for letting me know, Stuart! π I’m glad to hear this is still useful.
Will this work if an upgrade failed on an Apple and fuzzes the boot loader or something similar. I’m trying to retrieve data from my HDD and I can’t get it to mount. :/
Help would be greatly appreciated.
Hey Trav,
Sorry to hear about your predicament; I’ve been there and I know how not fun it is. Unfortunately, I don’t know if this article will help. It’s several years old and I haven’t done anything with mounting drives this way in a long time.
Thanks for this; helped me out many years later. Can confirm this works on whatever version of Debian is on a Raspberry Pi in 2015.
Woohoo! That’s awesome. I’m glad this helped. π It always surprises me how long some information remains useful.