LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mounting HFS+ volumes under Linux (https://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+

brisbin33 05-09-2008 05:23 PM

thanks for the reply guys,

as armonox said, HFS+ support has been around for a bit but writing and journaling don't go together.

time machine says journaling needs to be enabled to work, but fedora says journaling needs to be disabled to work. but i have heard a few people mention using a samba share as a time machine backup; this is in direct contradiction to that first sentence. i was wondering if anyone had successfully done this, if so how?

thorn168 05-14-2008 10:34 AM

Just to follow up it appears that OS X 10.5 has some "issues". One the most vexing are inconsistent problems with connecting to,reading and writing to Samba shares. It seems that unpatched Leopard will work for some users but patched Leopard introduces a more consistent pattern of "breaks" in file sharing to and from Samba servers.

Here are the links for more details: http://www.macwindows.com/leopard.html

http://forums.macosxhints.com/showthread.php?p=423988

I have personally experienced problems with a Patched Leopard hanging or corrupting files moved from a Samba share to the desktop.

This is definitely an Apple OS issue so don't blame/bug the Samba developers about this.

ciclistadan 07-19-2009 08:04 PM

thanks for the tip
 
i was trying to do just the thing. Had a mac at work which we kept all our music on for streaming during the arduous hours of the workday and after the motherboard fried I wanted to swap it to another system...mounting -t hfsplus worked like a charm and saved me hours of head vs. wall time.

thanks

centguy 01-12-2010 05:56 PM

It has been a year since the last post. Can I mount a partition with hfs+ and WRITE to it ? I am trying to make Mac and Linux to be able to read
and write a common portable drive (at home, I use linux while at work Mac, and I carry my drive around). I googled and found that it is rather disappointing that Mac does not
recognized ext3 (well, there is a buggy driver I don't even what to try).
Thanks for sharing !

sefzik 01-12-2010 06:03 PM

Centguy -

It has been a while since I dealt with my issue (I'm sure that things have changed significantly in the past two years), but when I was dealing with the problem I am pretty sure that I could only read the hfs+, no writing, when I was using Linux (I believe it was either FC8 or 10).

Why don't you do FAT, I've never had a problem reading or writing to them no matter what OS I was running? Everybody loves FAT partitions!
(nb - I make no claims of understanding the nuisances of the computer science world ... just what I need to do to get the job done. I'm sure somebody will tear me apart for suggesting FAT ; )


- Travis

centguy 01-13-2010 09:03 AM

Sure, there is no shame about using VFAT. At the end, computer is just a tool. Getting things done is the most important issues.

sefzik 01-13-2010 07:06 PM

"there is no shame about using VFAT"

haha - very nice, very true! However, sometimes I AM ashamed to admit that I use Windows : )

Mortis1369 03-04-2010 11:42 AM

another option
 
another option to this vexing problem is to use a windows emulator to install macdrive... this way you would gain WRX capabilities under any linux kernel... the only problem i am encountering is i cant disable the initial mac capabilities... (previously referenced) if i could disable the initial HFS+ support then i would have complete WRX access to my mac drives, or at least this is my theory... any ideas?

vault0 05-12-2011 02:11 PM

Quote:

Originally Posted by rcase5 (Post 2594734)
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! ...


Great job, thanks!



.


All times are GMT -5. The time now is 06:15 PM.