1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun================================== 4*4882a593SmuzhiyunMacintosh HFS Filesystem for Linux 5*4882a593Smuzhiyun================================== 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun.. Note:: This filesystem doesn't have a maintainer. 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunHFS stands for ``Hierarchical File System`` and is the filesystem used 12*4882a593Smuzhiyunby the Mac Plus and all later Macintosh models. Earlier Macintosh 13*4882a593Smuzhiyunmodels used MFS (``Macintosh File System``), which is not supported, 14*4882a593SmuzhiyunMacOS 8.1 and newer support a filesystem called HFS+ that's similar to 15*4882a593SmuzhiyunHFS but is extended in various areas. Use the hfsplus filesystem driver 16*4882a593Smuzhiyunto access such filesystems from Linux. 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunMount options 20*4882a593Smuzhiyun============= 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunWhen mounting an HFS filesystem, the following options are accepted: 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun creator=cccc, type=cccc 25*4882a593Smuzhiyun Specifies the creator/type values as shown by the MacOS finder 26*4882a593Smuzhiyun used for creating new files. Default values: '????'. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun uid=n, gid=n 29*4882a593Smuzhiyun Specifies the user/group that owns all files on the filesystems. 30*4882a593Smuzhiyun Default: user/group id of the mounting process. 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun dir_umask=n, file_umask=n, umask=n 33*4882a593Smuzhiyun Specifies the umask used for all files , all directories or all 34*4882a593Smuzhiyun files and directories. Defaults to the umask of the mounting process. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun session=n 37*4882a593Smuzhiyun Select the CDROM session to mount as HFS filesystem. Defaults to 38*4882a593Smuzhiyun leaving that decision to the CDROM driver. This option will fail 39*4882a593Smuzhiyun with anything but a CDROM as underlying devices. 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun part=n 42*4882a593Smuzhiyun Select partition number n from the devices. Does only makes 43*4882a593Smuzhiyun sense for CDROMS because they can't be partitioned under Linux. 44*4882a593Smuzhiyun For disk devices the generic partition parsing code does this 45*4882a593Smuzhiyun for us. Defaults to not parsing the partition table at all. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun quiet 48*4882a593Smuzhiyun Ignore invalid mount options instead of complaining. 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunWriting to HFS Filesystems 52*4882a593Smuzhiyun========================== 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunHFS is not a UNIX filesystem, thus it does not have the usual features you'd 55*4882a593Smuzhiyunexpect: 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun * You can't modify the set-uid, set-gid, sticky or executable bits or the uid 58*4882a593Smuzhiyun and gid of files. 59*4882a593Smuzhiyun * You can't create hard- or symlinks, device files, sockets or FIFOs. 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunHFS does on the other have the concepts of multiple forks per file. These 62*4882a593Smuzhiyunnon-standard forks are represented as hidden additional files in the normal 63*4882a593Smuzhiyunfilesystems namespace which is kind of a cludge and makes the semantics for 64*4882a593Smuzhiyunthe a little strange: 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun * You can't create, delete or rename resource forks of files or the 67*4882a593Smuzhiyun Finder's metadata. 68*4882a593Smuzhiyun * They are however created (with default values), deleted and renamed 69*4882a593Smuzhiyun along with the corresponding data fork or directory. 70*4882a593Smuzhiyun * Copying files to a different filesystem will loose those attributes 71*4882a593Smuzhiyun that are essential for MacOS to work. 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunCreating HFS filesystems 75*4882a593Smuzhiyun======================== 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunThe hfsutils package from Robert Leslie contains a program called 78*4882a593Smuzhiyunhformat that can be used to create HFS filesystem. See 79*4882a593Smuzhiyun<https://www.mars.org/home/rob/proj/hfs/> for details. 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunCredits 83*4882a593Smuzhiyun======= 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunThe HFS drivers was written by Paul H. Hargrovea (hargrove@sccm.Stanford.EDU). 86*4882a593SmuzhiyunRoman Zippel (roman@ardistech.com) rewrote large parts of the code and brought 87*4882a593Smuzhiyunin btree routines derived from Brad Boyer's hfsplus driver. 88