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