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

Re: accessing HFS from Linux



On Tue, May 01, 2001 at 06:34:11PM -0400, Leyah Cynamon wrote:
> Hi, and thanks to all who helped me out last time.
> 
> I am trying to access an HFS partition  from Debian GNU Linux booted and
> running from another partition.
> 
> My setup is as follows:
> 
> The computer is a 7600/G3.
> 
> /dev/sda is a  mac "drive setup" formatted hard drive running 9.0.4
> 
> After booting into 9.0.4 i use boot-x to select linux which is on the
> /dev/sdc7 partition of another hard disk. swap is /dev/sdc8. The
> APPLE_HFS partition i want to access is at /dev/sdc9. The Apple
> partition map, drivers etc are at sdc1 through sdc6.
> 
> i get into Linux fine and have searched in vain for documentation to
> help me access the apple_hfs partition (created by mac's "drive setup"
> utility). My sticking point i believe is that i don't know what to
> specify as the "mount point" when trying to edit an entry into
> /etc/fstab.  or should i be going about this another way?

manually:

mkdir /mac
mount -t hfs -o noexec /dev/sdc9 /mac

in fstab, mounted at boot:

/dev/sdc9    /mac	hfs	defaults,noexec	0 0

if you want it mounted readonly (avoids corruption) add use -o
noexec,ro in the first example and defaults,noexec,ro in the second.
note that you can probably leave defaults out and just use noexec,
thats just a convention i use.  noexec prevents every file on the
filesystem from getting execute permissions which i think is less ugly
and more useful since there is not and should not be any linux
executables or shell scripts living on a HorribleFileSystem. 

if you need write permission for your uid or a group, use the mount
options:

uid=1000 where 1000 is your uid, this causes you to own all files on
the filesystem, and thus be able to write to them.  default
permissions will be 0644.  

or gid=100 all files will be owned by root.users mode 0644.  if
combined with uid=1000 it would be you.users 0644

get uid/gid from /etc/passwd and /etc/group. 

umask=027 changes permissions on all files to mode 0640.  all of these
can be used together to get the permissions you want, globally across
this filesystem.  man chmod if you don't understand octal (0644)
permission modes yet.  

one last note, if you mount the filesystem and find nothing on it
except one file: where_did_my_files_go, then you used HFS+ and not HFS
as the filesystem, you will be unable to mount it with linux.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpt8Fz1ZRbtQ.pgp
Description: PGP signature


Reply to: