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