Subject: sharing a mounted HFS volume

From: Flint Million <[email-masked]>
Date: Mon, 9 Apr 2001 16:37:27 -0400 (EDT)

Is there any possible way to share a volume mounted with the Linux
implementation of the HFS filesystem? example: I've mounted a
Mac-formatted zip disk on /mnt/zip, and it contains files like .finderinfo
and .resource. Can these be easily mapped to netatalk-compatible sharing
names? I do need write access to the Mac volume, for both data and
resource forks.

---

From: Matthew Keller <[email-masked]>
Date: 09 Apr 2001 19:52:06 -0400

Yup works fine. If the media/mount is read/only, you won't have proper
resource forks, which will seriously mess up the presentation of files
in Mac file lists, but will work just fine (cosmetic mostly). Also,
don't expect to just "double-click" on a data file and have the Mac
correctly ascertain what kind of file it is- YMMV.

-- 

Matthew Keller
Enterprise System Analyst
Computing & Technology Services
Information Services Division
State University of NY at Potsdam

http://mattwork.potsdam.edu/

---

From: Carsten Neumann <[email-masked]>
Date: Tue, 10 Apr 2001 03:00:55 +0200

> correctly ascertain what kind of file it is- YMMV.

So what you say is "no, it doesn't"!

Well function does mean for me having the finderinfo and resource fork
properly translated, that applications can be executed and are not just simple files
having a 0 bytes data fork and no resource fork.
Also because of the missing finderinfo you will don't know the type/creator of files.
Some applications refuse to open a file if it has not the appropriate creator/type.
That makes most of the files and all applications useless.

Or did I miss a netatalk feature to translate the files in the .finderinfo/.resource dirs into
AppleDouble data which netatalk uses?
I also don't know any mount option so that you will get .AppleDouble dirs instead of
.finderinfo/.resource dirs.

> > names? I do need write access to the Mac volume, for both data and

For me it would be great to have a feature that I can read HFS CD-ROMs mounted on my Linux
CD juke-box.
Sometimes a program to convert between these two representations would suffice.
Though it will waste disk-space and time.

Does anyone know of such a feature or if there is work in progress that netatalk can properly
handle HFS volumes?

Thanks and kind regards

	Carsten

---

From: Matthew Keller <[email-masked]>
Date: 09 Apr 2001 22:26:35 -0400

> So what you say is "no, it doesn't"!

    *sigh* Flint asked "Is there any possible way to share a volume
    mounted with the Linux implementation of the HFS filesystem?" The
    answer to that question *IS* "Yup works fine". Sure if you want
    resource fork functionality you'll be at a loss (as I mentioned).

> properly translated

    Aha! So you're judging my statement as wrong because of your
    definition of "function". Well so be it. We can quibble semantics
    all day long.

> Though it will waste disk-space and time.

    Someone posted a kludge to one of these lists eons ago.. I think it
    was [email-masked], but I can't remember.

> Does anyone know of such a feature or if there is work in progress that netatalk can properly

    To my knowledge, there is not such plan within the current
    contributors to the Netatalk source. This functionality DOES exist
    in proprietary extensions of Netatalk used by 3rd parties who don't
    like to share because the current licensing doesn't make them share.

-- 

Matthew Keller

---

From: Rob Lineweaver <[email-masked]>
Date: Mon, 9 Apr 2001 22:37:47 -0400 (EDT)

> Does anyone know of such a feature or if there is work in progress that netatalk can properly

I found this message in the archives:
http://www.umich.edu/~rsug/netatalk/archive/admins/1999/1890.html
It is dated several years ago so I don't know if it is still applicable.

It speaks of an option that one specifies when mounting the HFS volume to 
enable netatalk to recognize the resource forks.  I cannot find this
option documented in mount's man page.  I have seen syntax variously as 
mount -o fork=netatalk
and
mount -o afpd
and do not know which is correct.  I have never tried this myself.  Surely
someone in this forum knows something about this, though.  At least I can
tell you that at one time there was a solution to the problem you are
facing.

good luck,

Rob Lineweaver
:)

---

From: Jonathan Paisley <[email-masked]>
Date: Tue, 10 Apr 2001 11:11:31 +0100 (BST)

On Mon, 9 Apr 2001, Rob Lineweaver wrote:

I've managed to get HFS cdroms under linux (2.2.17) to work fine.

# mount -t hfs /dev/cdrom /mnt/hfscd -o ro,afpd

You'll need to adjust the volume name in AppleVolumes as appropriate.
Here's a script that does that (I've got /mnt/hfscd in my fstab as above):
[not the neatest of scripts but it seems to work]

#!/bin/sh

#offset 85 is start of volume name

if mount /mnt/hfscd; then

VOL=`cat /mnt/hfscd/.AppleDouble/.Parent | cut -b 87-106 | tr -d '\0'`

cat > $HOME/.AppleVolumes <<EOT
/mnt/hfscd "$VOL"
EOT

fi

Beware that with some versions of netatalk, afpd will die when accessing
files on such a filesystem. I'm using pre5 (with permissions patch) and
it's fine.

-- 
Jonathan Paisley
[email-masked]

---

From: Carsten Neumann <[email-masked]>
Date: Tue, 10 Apr 2001 22:16:16 +0200

> files on such a filesystem. I'm using pre5 (with permissions patch) and

Thanks a lot!

The afpd option works.
But then I stumpled into that "afpd death" at AppleShare mount attempt. (I was using
1.4b2+asun2.1.3.)
So after downloading the 1.5pre5 sources, configuring (with --with-shadow option!), compiling and
installing I could successfully mount the CD on my Mac.

Regarding your script:
I found the volume name not at offset 85 or 87 but at 218!
I'm still using kernel 2.2.13 (SuSE 6.3).

Thanks and kind regards

	Carsten

---

From: Jonathan Paisley <[email-masked]>
Date: Wed, 11 Apr 2001 15:31:29 +0100 (BST)

On Tue, 10 Apr 2001, Carsten Neumann wrote:

> The afpd option works. But then I stumpled into that "afpd death" at
> AppleShare mount attempt. (I was using 1.4b2+asun2.1.3.) So after
> downloading the 1.5pre5 sources, configuring (with --with-shadow
> option!), compiling and installing I could successfully mount the CD
> on my Mac.

Great!

I remember that this thing used to work with 1.4b2+asun2.1.3 but then
stopped. I suppose the HFS filesystem module was perhaps changed between
now and then.

> I'm still using kernel 2.2.13 (SuSE 6.3).

Hmmn. Maybe the AppleDouble format has changed a little in the HFS
filesystem driver.  I must admit that I haven't actually used that script
since 1.4b2+asun2.1.3 stopped working :) And now you mention it, I also
notice that I didn't keep the comments up to date particularly well!

Glad you got it working!

-- 
Jonathan Paisley
[email-masked]