1 .\" $NetBSD: fstab.5,v 1.5.2.1 1995/11/16 20:11:11 pk Exp $
3 .\" Copyright (c) 1980, 1989, 1991, 1993, 2002
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the University of
17 .\" California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93
41 .Nd static information about the filesystems
43 .Fd #include <fstab.h>
47 contains descriptive information about the various file
50 is only read by programs, and not written;
51 it is the duty of the system administrator to properly create
52 and maintain this file, using the
55 Each filesystem is described on a separate line;
56 fields on each line are separated by tabs or spaces.
57 The order of records in
60 .Xr diskarbitrationd 8 ,
65 sequentially iterate through
71 describes the block special device, the local filesystem, or
72 the remote filesystem to be mounted. The
74 program supports the identification of a local filesystem uniquely by its
75 UUID or by its volume name, irrespective of hardware configuration and of
76 hardware parallelism, using the constructs ``UUID'' and ``LABEL''.
77 For APFS volumes, this field should never be the block special device as it is
78 not constant. Only the constructs ``UUID'' and ``LABEL'' should be used.
82 describes the mount point for the filesystem.
83 For swap partitions, this field should be specified as ``none''.
87 describes the type of the filesystem.
88 The system currently supports different filesystem types, including the following:
89 .Bl -tag -width indent -offset indent
91 APFS is the Mac OS X default filesystem since version 10.13 (High Sierra).
93 HFS+ is the previous Mac OS X default filesystem.
95 a Sun Microsystems compatible ``Network File System''
97 a DOS compatible filesystem
99 a CD-ROM filesystem (as per ISO 9660)
101 an implementation of /dev/fd
103 a translucent filesystem
108 describes the mount options associated with the filesystem.
109 It is formatted as a comma separated list of options.
110 It contains at least the type of mount (see
112 below) plus any additional options
113 appropriate to the filesystem type.
115 The option ``auto'' can be used in the ``noauto'' form to cause
116 a file system not to be mounted automatically (with ``mount -a'',
117 or system boot time).
119 The type of the mount is extracted from the
121 field and stored separately in the
123 field (it is not deleted from the
128 is ``rw'' or ``ro'' then the filesystem whose name is given in the
130 field is normally mounted read-write or read-only on the
131 specified special file.
134 is ``sw'' then the special file is made available as a piece of swap
137 command at the end of the system reboot procedure.
138 The fields other than
145 is specified as ``xx'' the entry is ignored.
146 This is useful to show disk partitions which are currently unused.
150 is used for these filesystems by the
152 command to determine which filesystems need to be dumped.
153 If the fifth field is not present, a value of zero is returned and
155 will assume that the filesystem does not need to be dumped.
161 program to determine the order in which filesystem checks are done
163 The root filesystem should be specified with a
165 of 1, and other filesystems should have a
168 Filesystems within a drive will be checked sequentially,
169 but filesystems on different drives will be checked at the
170 same time to utilize parallelism available in the hardware.
171 If the sixth field is not present or zero,
172 a value of zero is returned and
174 will assume that the filesystem does not need to be checked.
176 #define FSTAB_RW "rw" /* read-write device */
177 #define FSTAB_RO "ro" /* read-only device */
178 #define FSTAB_SW "sw" /* swap device */
179 #define FSTAB_XX "xx" /* ignore totally */
182 char *fs_spec; /* block special device name */
183 char *fs_file; /* filesystem path prefix */
184 char *fs_vfstype; /* type of filesystem */
185 char *fs_mntops; /* comma separated mount options */
186 char *fs_type; /* rw, ro, sw, or xx */
187 int fs_freq; /* dump frequency, in days */
188 int fs_passno; /* pass number on parallel fsck */
192 The proper way to read records from
194 is to use the routines
202 UUID=2A1B02AD-467D-403A-8CCD-B87E50AD3DA2 none apfs rw
203 UUID=DF000C7E-AE0C-3B15-B730-DFD2EF15CB91 /export apfs ro
204 UUID=FAB060E9-79F7-33FF-BE85-E1D3ABD3EDEA none hfs rw,noauto
205 LABEL=The\\040Volume\\040Name\\040Is\\040This none msdos ro
208 .Bl -tag -width /etc/fstab -compact
217 .Xr diskarbitrationd 8
221 file format appeared in