LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mounting HFS+ volumes under Linux (http://www.linuxquestions.org/questions/linux-software-2/mounting-hfs-volumes-under-linux-521189/)

rcase5 01-20-2007 11:40 AM

Mounting HFS+ volumes under Linux
 
Just thought I would pass this on, as it is not in any of the man pages! This drove me nuts for the better part of a day until I found a reference to this on some obscure web site discussing the kernel source code for FC6. I'm posting it here in the hopes that it will be useful for someone.

I was trying to retrieve some data on a hard drive from a
Powerbook G4 (the so-called "TiBook") that was running Mac OS X 10.3. That version of the OS uses Apple's HFS+ file system. I wanted to mount that hard drive on one of my Linux systems running FC6 so I can take the data off.

The man pages only mention HFS as a valid filesystem, so I tried mounting the volume with:

mount -t hfs <blah blah>

It would mount the hard drive alright, but it would only show me a few things on there, along with a readme file that says that I needed to upgrade to a version of MacOS greater than 8.6 or something like that. (I don't have the drive hooked up as I write this, so I can't go back and check). I tried all kinds of variations of the above mount command, to no avail.

Then, I found a reference to an 'hfsplus' file system on a web site discussing the source code for the FC6 kernel. So I tried:

mount -t hfsplus <blah blah>

It worked! I was able to pull off everything I needed. I didn't try any of the HFS options with this, however. I would presume the hfs options would be valid on hfsplus, but this is only a guess. Plus, I didn't try writing anything to the volume (my main concern was data retrieval). But since this seems to be an undocumented feature, I would be leary of writing anything to an hfsplus volume unless A) the data on a given HFS+ volume is not of any value and can be lost without any great pain or B) you are desperate. Perhaps someone who uses HFS+ on linux on a regular basis can shead some light on this subject?

Anyway, hope someone finds this of use.

Robert...

Fegenbush 01-23-2007 12:38 PM

Thanks for the tip. I have been meaning to try something like this for a while. Now, I have the proper motivation to do it.

Fegenbush

omid455 01-30-2007 10:33 PM

Thanks!
 
It was really helpful and actually it did help someone. thanks agian.

Quote:

Originally Posted by rcase5
Just thought I would pass this on, as it is not in any of the man pages! This drove me nuts for the better part of a day until I found a reference to this on some obscure web site discussing the kernel source code for FC6. I'm posting it here in the hopes that it will be useful for someone.

I was trying to retrieve some data on a hard drive from a
Powerbook G4 (the so-called "TiBook") that was running Mac OS X 10.3. That version of the OS uses Apple's HFS+ file system. I wanted to mount that hard drive on one of my Linux systems running FC6 so I can take the data off.

The man pages only mention HFS as a valid filesystem, so I tried mounting the volume with:

mount -t hfs <blah blah>

It would mount the hard drive alright, but it would only show me a few things on there, along with a readme file that says that I needed to upgrade to a version of MacOS greater than 8.6 or something like that. (I don't have the drive hooked up as I write this, so I can't go back and check). I tried all kinds of variations of the above mount command, to no avail.

Then, I found a reference to an 'hfsplus' file system on a web site discussing the source code for the FC6 kernel. So I tried:

mount -t hfsplus <blah blah>

It worked! I was able to pull off everything I needed. I didn't try any of the HFS options with this, however. I would presume the hfs options would be valid on hfsplus, but this is only a guess. Plus, I didn't try writing anything to the volume (my main concern was data retrieval). But since this seems to be an undocumented feature, I would be leary of writing anything to an hfsplus volume unless A) the data on a given HFS+ volume is not of any value and can be lost without any great pain or B) you are desperate. Perhaps someone who uses HFS+ on linux on a regular basis can shead some light on this subject?

Anyway, hope someone finds this of use.

Robert...


rcase5 01-31-2007 02:49 AM

Update
 
I've had a little time to play with this, and found the following:

1. The 'hfsplus' file system type is read-only under FC6. I have an external firewire (IEEE 1394) drive (use it to back up my servers) that I usually use on my iMac G3 (which is on the blink). I tried hooking up to a firewire-equipped Linux box so I can keep doing my backups onto this drive, and it will only mount the filesystem as read only. Drat! I guess that explains why the 'hfsplus' filesystem is undocumented; it's probably an incomplete feature. Reminds me of NTFS functionality circa RH6 or 7, if memory serves.

2. Interestingly enough, when I plug in my external hfs+ disk into my Linux system, it does automatically and properly recognize the file system and mount it. But, as I said before, I can only read it; I cannot write to it.

Robert...

sefzik 11-30-2007 07:38 PM

I was wondering if anybody out there could help me out. I am trying to mount an HFS+ external hard drive via USB to my PC running FC5.

I used gparted to figure out what and where info was on the drive. It seems that I have:

/dev/sda1 - /dev/sda8 <--- < 256 kb on these "unrecognized" partitions
/dev/sda9 <--- 8.5 MB, the "boot" drive
/dev/sda10 <--- 298GB, an unrecognized partition


I used

> mount -t hfsplus /dev/sda9 /mac_gerald/

to mount the boot sector, which worked just fine. Now I'm not quite sure how to get to the juicy goodness of my sda10 partition, where all of my precious music has been living.



For your helpful kindness I will reward you with a story of my stupidity, which is why this post is being made. The lab that I worked in as a grad student used only macs. When before I graduated and moved away I wanted to back up all of my data/music that I collected over the years. I plugged the hd in assuming that it was already FAT/NTFS formatted and thought nothing of the formatting until I moved back home (200 miles away) and plugged the external into a PC ... and couldn't reach any of the data.

I would love to see the music again so I don't have to re-rip all of my CD's, but really, really need my data.



Thanks for help/thoughts and if nothing else I hope that you all like the story : )



- Travis

john_boys 03-04-2008 03:57 PM

Quote:

Originally Posted by rcase5 (Post 2594734)
Just thought I would pass this on, as it is not in any of the man pages! This drove me nuts for the better part of a day until I found a reference to this on some obscure web site discussing the kernel source code for FC6. I'm posting it here in the hopes that it will be useful for someone.

I was trying to retrieve some data on a hard drive from a
Powerbook G4 (the so-called "TiBook") that was running Mac OS X 10.3. That version of the OS uses Apple's HFS+ file system. I wanted to mount that hard drive on one of my Linux systems running FC6 so I can take the data off.

The man pages only mention HFS as a valid filesystem, so I tried mounting the volume with:

mount -t hfs <blah blah>

It would mount the hard drive alright, but it would only show me a few things on there, along with a readme file that says that I needed to upgrade to a version of MacOS greater than 8.6 or something like that. (I don't have the drive hooked up as I write this, so I can't go back and check). I tried all kinds of variations of the above mount command, to no avail.

Then, I found a reference to an 'hfsplus' file system on a web site discussing the source code for the FC6 kernel. So I tried:

mount -t hfsplus <blah blah>

It worked! I was able to pull off everything I needed. I didn't try any of the HFS options with this, however. I would presume the hfs options would be valid on hfsplus, but this is only a guess. Plus, I didn't try writing anything to the volume (my main concern was data retrieval). But since this seems to be an undocumented feature, I would be leary of writing anything to an hfsplus volume unless A) the data on a given HFS+ volume is not of any value and can be lost without any great pain or B) you are desperate. Perhaps someone who uses HFS+ on linux on a regular basis can shead some light on this subject?

Anyway, hope someone finds this of use.

Robert...

Is it possible with Ubuntu as well? can you please give me the steps how to do this? i want to make linux case insensitive filename
i do not want the following file names to be created in the same folder:
ab.c
Ab.c
aB.c
AB.c
thanks

sefzik 03-04-2008 04:13 PM

mount hfs+ on linux
 
hey - thanks!

i actually did get mine to mount, but it was a real bugger.

i totally forgot about this post.

i don't know why it worked and really don't care (because it did in fact work), but what i did to mount my external hd (using usb connection) with fedora core 4 was:


> mount -t ufs -o ufstype=44bsd,ro /dev/sda10 /mac_gerald


hopefully this will help somebody else. it took me a long, long, long time to find this command ... and for some reason it works.



happy linux'ing,

-travis

armanox 03-04-2008 05:26 PM

Quote:

Originally Posted by rcase5 (Post 2609852)
I've had a little time to play with this, and found the following:

1. The 'hfsplus' file system type is read-only under FC6. I have an external firewire (IEEE 1394) drive (use it to back up my servers) that I usually use on my iMac G3 (which is on the blink). I tried hooking up to a firewire-equipped Linux box so I can keep doing my backups onto this drive, and it will only mount the filesystem as read only. Drat! I guess that explains why the 'hfsplus' filesystem is undocumented; it's probably an incomplete feature. Reminds me of NTFS functionality circa RH6 or 7, if memory serves.

2. Interestingly enough, when I plug in my external hfs+ disk into my Linux system, it does automatically and properly recognize the file system and mount it. But, as I said before, I can only read it; I cannot write to it.

Robert...


I sorta remember recompiling the kernel to include full hfs+ support and mac partition table support and using my ipod (which was hfs+) under Linux. I remember having write support without any issues...but...that was a while ago.

thorn168 05-05-2008 03:19 PM

Armanox,

Can you recall which distribution you re-compiled HFS+ Support in? I am currently working with computers of all flavors and I would like to extend interoperability between them as much as possible. Did the re-compile allow full read, write and delete permissions on the HFS+ partition?

Thanks

thorn168 05-05-2008 03:26 PM

Here is a link to a developer with a tar file to enable HFS+ support in the 2.4 and 2.6 Linux Kernels:

http://www.ardistech.com/hfsplus/

Here is another link from the Gentoo wiki:

http://gentoo-wiki.com/HOWTO_hfsplus

armanox 05-05-2008 10:31 PM

I've had RWX support on HFS+ in Fedora 6-8, Slackware 10.2-12, Debian 4.0, and Ubuntu 6.06. I do remember that it refused to write to HFS+ when Journaling was enabled. So, I had to use a mac to disable journaling in the iPod.

thorn168 05-06-2008 08:31 AM

Thanks, disabling journaling is an important detail to remember.

brisbin33 05-07-2008 08:14 AM

i'm running into this exact problem now with hfsplus hdd's and fedora 8. my gf took my macbook out of town for the week so i can't disable journaling until next week but does anyone know if there is a workaround for the fact that timemachine on my mac requires journaling and hsfplus support in fedora requires it be turned off?

does the below trick counteract this contradiction as well?

Code:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
i want to use my fedora box to serve some externals for my macbook one of which being my time machine backup. currently my mac shows the samba share correctly, i can poke around a bit but time machine says "unable to mount volume" i assume because it's mounted as read-only in fedora.

anyone with a similar setup care to share how?

thorn168 05-08-2008 03:29 PM

Brisbin33,

I think you may have to request that the support for HFS+ to be added to the next Linux kernel.

The problem is that the Apple OS is even more closed source then the Microsoft OS so adding the support is somewhat difficult to do legally.

armanox 05-08-2008 09:23 PM

The issue isn't legality, it's the same problem with NTFS - we know what we want, we just have to figure out how to get it on our own. As I said before, there is support for HFS+ in the kernel, just not write support of journaled HFS+


All times are GMT -5. The time now is 06:03 AM.