From: "Lennon, Conor" clennon@conduit.ie
To: Irish Linux Users Group ilug@linux.ie
Subject: RE: [ILUG] Mounting a mac os x cdrom in linux
Date: Tue, 11 Mar 2003 13:27:43 -0000
X-Mailer: Internet Mail Service (5.5.2653.19)

A quick search on freshmeat finds kio-mac:

"kio-mac is a KDE ioslave lets you read an HFS+ partition from
konqueror or any other KDE file dialog. It is a wrapper around the
commandline hfsplus tools."
http://freshmeat.net/projects/kio-mac/

I can't easily find a page for hfsplus, but it appears to be in the
hfsplusutils package in Mandrake 9.0 and also in Debian in the package
"hfsplus" in woody or sid.

Given that the kernel doesn't support HFS+ I don't know how it works.

Conor





[Correspondent Trent Buck adds (thanks, Trent):]

The "hfsplus" utilities are modeled after the mtools utilities -- they operate at the user level on a single HFS+ device at a time, presumably doing byte-wise reads of the file/device (although I haven't checked).

That package is superseded by the hfsplus 2.6 kernel module, which can mount HFS+ filesystems natively. I use this for reading from and writing to my iPod. It's case-insensitive, but whatever case you use is kept, like VFAT.

Files that are hidden in the MacOS GUI are visible to Linux utilities like ls(1). As in the OS X environment, "filename" will access the data fork and "filename/rsrc" will access the resource fork. A naïve tarball/copy of and HFS+ filesystem will miss the resource forks, since Linux programs do not check for them.

Several times I have experienced "corruption" when the iPod has been mounted and the machine lost power, or when I forgot that it was still mounted when I removed it. Once the filesystem is corrupted, Linux refuses all write operations, although I haven't noticed any actual data corruption.

There are no fsck or mkfs utilities for HFS+ under Linux. The only way I know to make or repair an HFS+ filesystem is to use the Disk Utility.app under Mac OS X. The three or four times I've tried to repair the iPod's filesystem (after corruption during use under Linux) it has always failed, and I've had to reformat it.

One other thing: at least some HFS+ filesystems are not backwards compatible with the older HFS filesystem, but instead contain a "fake" HFS filesystem. It contains a single file called "Where did all my files go?" or similar, which is intended to explain to users with MacOS 7 and earlier that their OS does not support the newer filesystem. This can confuse Linux users who mount an HFS+ filesystem with the "-t auto", since sometimes it will successfully be mounted as an empty HFS filesystem instead of HFS+. Using "-t hfsplus" avoids this.