[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ask for suggestion: which filesystem suits for both Linux and Mac OSx



On Thu, 24 May 2007 09:15 +0800 Ken Hu wrote:
> I am a linux and OSx user and I really need to know which filesystem
> "really" can work on both Linux and Mac OSx
>
> The purpose I need this is for my usb external harddisk, I wish I can
> plug it to mac and linux box.

1.
Mac OSX uses the HFS+ filesystem.
You can use the Mac Disk Utility to partition the disk and put the HFS+
('HFS extended') filesystem on it.
In Linux, as root do

    modprobe hfsplus

and the usb disk can be mounted like any other disk.
If it works then put the line

    hfsplus

into /etc/modules, so you will never have to 'modprobe' again.
Usually, the device used is /dev/sda2, so I have this line
in /etc/fstab:

    /dev/sda2   /media/hfsplus   auto   rw,user,noauto   0   0

2.
As you may have noticed when e-mailing a mac file or putting it on a
different filesystem, the so-called resource fork gets lost. This
affects Mac fonts in the first place; they become totally unusable.

To deal with this, you could install the 'hfsplus' package, which
allows you to transform the mac file into a MacBin file or a BinHex
file (the latter being the Mac equivalent of Base64), so no information
will be lost when transforming it back.
It will also transform Mac text files to Unix text files, including the
encoding (so special characters remain correct), and vice versa. But
'recode' can do this as well.

3.
Mac OSX will also work with the (older) HFS filesystem.
You can use the Mac Disk Utility to partition the disk and put the HFS
filesystem on it. In Linux, as root do 'modprobe hfs' or add the line
'hfs' (without the quotes) to /etc/modules.
'hfsutils' for HFS does the same as 'hfsplus' for HFS+.

There is a graphical version of hfsutils called xhfs, part of
hfsutils-tcltk. It works in Sarge, but alas, not in Etch and Lenny any
more, probably because the new glibc version clashes with it. I hope it
will be solved some time.
See this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=421457

4.
You could use the Mac Disk Utility to partition the disk and put the
'DOS filesystem' on it, or use Linux to make it a vfat filesystem.
Both Mac and Linux will be able to access it, although it does not
address the problem with the 'resource fork' mentioned above.

However, there is a way to keep the Mac files undamaged using the vfat
filesystem: use Darwin's X-Terminal to 'tar' your stuff:

    tar cf mydir.tar mydir

Every compressed form, such as .tar.bz2 or .tar.gz, will also do.
When putting the .tar.* files back to the Mac later on, and untarring
them, which can be done by simply doubleclicking them, they will appear
to be undamaged.

5.
As a last remark, the Mac Disk Utility can put the UFS or 'Unix File
System' on the disk. Odd enough, I never could make Linux recognize it.

-- 
S.H.



Reply to: