]> git.ipfire.org Git - thirdparty/util-linux.git/blame - mount/mount.8
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / mount / mount.8
CommitLineData
fd6b7a7f 1.\" Copyright (c) 1996 Andries Brouwer
6dbe3af9 2.\"
fd6b7a7f
KZ
3.\" This page is somewhat derived from a page that was
4.\" (c) 1980, 1989, 1991 The Regents of the University of California
5.\" and had been heavily modified by Rik Faith and myself.
6.\" (Probably no BSD text remains.)
7.\" Fragments of text were written by Werner Almesberger, Remy Card,
8.\" Stephen Tweedie and Eric Youngdale.
6dbe3af9 9.\"
fd6b7a7f
KZ
10.\" This is free documentation; you can redistribute it and/or
11.\" modify it under the terms of the GNU General Public License as
12.\" published by the Free Software Foundation; either version 2 of
13.\" the License, or (at your option) any later version.
6dbe3af9 14.\"
fd6b7a7f
KZ
15.\" The GNU General Public License's references to "object code"
16.\" and "executables" are to be interpreted as the output of any
17.\" document formatting or typesetting system, including
18.\" intermediate and printed output.
6dbe3af9 19.\"
fd6b7a7f
KZ
20.\" This manual is distributed in the hope that it will be useful,
21.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
22.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23.\" GNU General Public License for more details.
6dbe3af9 24.\"
fd6b7a7f
KZ
25.\" You should have received a copy of the GNU General Public
26.\" License along with this manual; if not, write to the Free
27.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
28.\" USA.
6dbe3af9 29.\"
2b6fc908 30.\" 960705, aeb: version for mount-2.7g
fd6b7a7f
KZ
31.\" 970114, aeb: xiafs and ext are dead; romfs is new
32.\" 970623, aeb: -F option
2b6fc908 33.\" 970914, reg: -s option
5c36a0eb
KZ
34.\" 981111, K.Garloff: /etc/filesystems
35.\" 990111, aeb: documented /sbin/mount.smbfs
eb63b9b8
KZ
36.\" 990730, Yann Droneaud <lch@multimania.com>: updated page
37.\" 991214, Elrond <Elrond@Wunder-Nett.org>: added some docs on devpts
fd6b7a7f 38.\"
2b6fc908 39.TH MOUNT 8 "14 September 1997" "Linux 2.0" "Linux Programmer's Manual"
6dbe3af9 40.SH NAME
fd6b7a7f 41mount \- mount a file system
6dbe3af9 42.SH SYNOPSIS
22853e4a 43.BI "mount [\-lhV]"
fd6b7a7f 44.LP
2b6fc908 45.BI "mount \-a [\-fFnrsvw] [\-t " vfstype ]
6dbe3af9 46.br
2b6fc908 47.BI "mount [\-fnrsvw] [\-o " options " [,...]] " "device " | " dir"
6dbe3af9 48.br
2b6fc908 49.BI "mount [\-fnrsvw] [\-t " vfstype "] [\-o " options "] " "device dir"
fd6b7a7f
KZ
50.SH DESCRIPTION
51All files accessible in a Unix system are arranged in one big
52tree, the file hierarchy, rooted at
53.BR / .
54These files can be spread out over several devices. The
55.B mount
56command serves to attach the file system found on some device
57to the big file tree. Conversely, the
58.BR umount (8)
59command will detach it again.
60
61The standard form of the
62.B mount
63command, is
64.RS
65.br
66.BI "mount \-t" " type device dir"
67.RE
68This tells the kernel to attach the file system found on
69.I device
70(which is of type
71.IR type )
72at the directory
73.IR dir .
74The previous contents (if any) and owner and mode of
75.I dir
76become invisible, and as long as this file system remains mounted,
77the pathname
78.I dir
79refers to the root of the file system on
80.IR device .
81
82Three forms of invocation do not actually mount anything:
83.RS
6dbe3af9 84.br
fd6b7a7f
KZ
85.B "mount \-h"
86.RE
87prints a help message;
88.RS
6dbe3af9 89.br
fd6b7a7f
KZ
90.B "mount \-V"
91.RE
92prints a version string; and just
93.RS
22853e4a 94.BI "mount [-l] [-t" " type" ]
fd6b7a7f
KZ
95.RE
96lists all mounted file systems (of type
22853e4a
KZ
97.IR type ).
98The option \-l adds the (ext2) labels in this listing.
99See below.
fd6b7a7f 100
66ee8158
KZ
101.\" In fact since 2.3.99. At first the syntax was mount -t bind.
102Since Linux 2.4.0 it is possible to remount part of the
103file hierarchy somewhere else. The call is
104.RS
105.br
106.B "mount --bind olddir newdir"
107.RE
108
6dbe3af9 109The
726f69e2
KZ
110.I proc
111file system is not associated with a special device, and when
112mounting it, an arbitrary keyword, such as
113.I proc
fd6b7a7f
KZ
114can be used instead of a device specification.
115(The customary choice
726f69e2 116.I none
fd6b7a7f
KZ
117is less fortunate: the error message `none busy' from
118.B umount
726f69e2 119can be confusing.)
6dbe3af9 120
fd6b7a7f
KZ
121Most devices are indicated by a file name (of a block special device), like
122.IR /dev/sda1 ,
123but there are other possibilities. For example, in the case of an NFS mount,
124.I device
125may look like
126.IR knuth.cwi.nl:/dir .
5c36a0eb
KZ
127It is possible to indicate a block special device using its
128volume label or UUID (see the \-L and \-U options below).
fd6b7a7f
KZ
129
130The file
131.I /etc/fstab
132(see
133.BR fstab (5)),
134may contain lines describing what devices are usually
135mounted where, using which options. This file is used in three ways:
136.LP
137(i) The command
138.RS
139.br
140.BI "mount \-a [-t" " type" ]
141.RE
142(usually given in a bootscript) causes all file systems mentioned in
143.I fstab
144(of the proper type) to be mounted as indicated, except for those
145whose line contains the
146.B noauto
147keyword. Adding the
148.B \-F
149option will make mount fork, so that the
150filesystems are mounted simultaneously.
151.LP
152(ii) When mounting a file system mentioned in
153.IR fstab ,
154it suffices to give only the device, or only the mount point.
155.LP
156(iii) Normally, only the superuser can mount file systems.
157However, when
158.I fstab
159contains the
160.B user
161option on a line, then anybody can mount the corresponding system.
162.LP
163Thus, given a line
164.RS
165.br
166.B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
167.RE
168any user can mount the iso9660 file system found on his CDROM
169using the command
170.RS
171.br
172.B "mount /dev/cdrom"
173.RE
174or
175.RS
176.br
177.B "mount /cd"
178.RE
179For more details, see
180.BR fstab (5).
5c36a0eb
KZ
181Only the user that mounted a filesystem can unmount it again.
182If any user should be able to unmount, then use
183.B users
184instead of
185.B user
186in the
187.I fstab
188line.
eb63b9b8
KZ
189The
190.B owner
191option is similar to the
192.B user
193option, with the restriction that the user must be the owner
194of the special file. This may be useful e.g. for
195.I /dev/fd
196if a login script makes the console user owner of this device.
fd6b7a7f
KZ
197
198The programs
199.B mount
200and
201.B umount
202maintain a list of currently mounted file systems in the file
203.IR /etc/mtab .
204If no arguments are given to
6dbe3af9
KZ
205.BR mount ,
206this list is printed.
fd6b7a7f
KZ
207When the
208.I proc
209filesystem is mounted (say at
210.IR /proc ),
211the files
212.I /etc/mtab
213and
214.I /proc/mounts
215have very similar contents. The former has somewhat
216more information, such as the mount options used,
217but is not necessarily up-to-date (cf. the
218.B \-n
219option below). It is possible to replace
220.I /etc/mtab
221by a symbolic link to
222.IR /proc/mounts ,
223but some information is lost that way, and in particular
eb63b9b8
KZ
224working with the loop device will be less convenient. Also,
225pathnames containing spaces are handled correctly by
226.I /etc/mtab
227but not (yet) by
228.IR /proc/mounts .
fd6b7a7f
KZ
229
230.SH OPTIONS
231The full set of options used by an invocation of
232.B mount
233is determined by first extracting the
234options for the file system from the
235.I fstab
236table, then applying any options specified by the
237.B \-o
238argument, and finally applying a
239.BR \-r " or " \-w
240option, when present.
6dbe3af9
KZ
241
242Options available for the
243.B mount
244command:
245.TP
fd6b7a7f
KZ
246.B \-V
247Output version.
248.TP
249.B \-h
250Print a help message.
251.TP
252.B \-v
253Verbose mode.
254.TP
255.B \-a
256Mount all filesystems (of the given types) mentioned in
257.IR fstab .
258.TP
259.B \-F
260(Used in conjunction with
261.BR \-a .)
262Fork off a new incarnation of mount for each device.
2b6fc908
KZ
263This will do the mounts on different devices or different NFS servers
264in parallel.
fd6b7a7f
KZ
265This has the advantage that it is faster; also NFS timeouts go in
266parallel. A disadvantage is that the mounts are done in undefined order.
267Thus, you cannot use this option if you want to mount both
268.I /usr
269and
270.IR /usr/spool .
271.TP
6dbe3af9
KZ
272.B \-f
273Causes everything to be done except for the actual system call; if it's not
274obvious, this ``fakes'' mounting the file system. This option is useful in
275conjunction with the
276.B \-v
277flag to determine what the
278.B mount
fd6b7a7f
KZ
279command is trying to do. It can also be used to add entries for devices
280that were mounted earlier with the -n option.
281.TP
22853e4a
KZ
282.B \-l
283Add the ext2 labels in the mount output. Mount must have permission to
284read the disk device (e.g. be suid root) for this to work.
285One can set such a label
286using the
287.BR e2label (8)
288utility.
289.TP
fd6b7a7f
KZ
290.B \-n
291Mount without writing in
292.IR /etc/mtab .
293This is necessary for example when
294.I /etc
295is on a read-only file system.
296.TP
2b6fc908
KZ
297.B \-s
298Tolerate sloppy mount options rather than failing. This will ignore
299mount options not supported by a filesystem type. Not all filesystems
300support this option. This option exists for support of the Linux
301autofs\-based automounter.
302.TP
fd6b7a7f
KZ
303.B \-r
304Mount the file system read-only. A synonym is
305.BR "\-o ro" .
306.TP
307.B \-w
308Mount the file system read/write. This is the default. A synonym is
309.BR "\-o rw" .
310.TP
5c36a0eb
KZ
311.BI \-L " label"
312Mount the partition that has the specified
313.IR label .
314.TP
315.BI \-U " uuid"
316Mount the partition that has the specified
317.IR uuid .
318These two options require the file
319.I /proc/partitions
320(present since Linux 2.1.116) to exist.
321.TP
fd6b7a7f
KZ
322.BI \-t " vfstype"
323The argument following the
324.B \-t
325is used to indicate the file system type. The file system types which are
326currently supported are listed in
327.IR linux/fs/filesystems.c :
5c36a0eb
KZ
328.IR adfs ,
329.IR affs ,
eb63b9b8 330.IR autofs ,
5c36a0eb 331.IR coda ,
eb63b9b8
KZ
332.IR coherent ,
333.IR devpts ,
334.IR efs ,
335.IR ext ,
336.IR ext2 ,
5c36a0eb
KZ
337.IR hfs ,
338.IR hpfs ,
eb63b9b8
KZ
339.IR iso9660 ,
340.IR minix ,
341.IR msdos ,
342.IR ncpfs ,
343.IR nfs ,
5c36a0eb 344.IR ntfs ,
eb63b9b8 345.IR proc ,
5c36a0eb
KZ
346.IR qnx4 ,
347.IR romfs ,
eb63b9b8
KZ
348.IR smbfs ,
349.IR sysv ,
350.IR udf ,
5c36a0eb 351.IR ufs ,
eb63b9b8
KZ
352.IR umsdos ,
353.IR vfat ,
354.IR xenix ,
355.IR xiafs .
356Note that coherent, sysv and xenix are equivalent and that
fd6b7a7f
KZ
357.I xenix
358and
359.I coherent
360will be removed at some point in the future \(em use
361.I sysv
362instead. Since kernel version 2.1.21 the types
363.I ext
364and
365.I xiafs
366do not exist anymore.
367
5c36a0eb
KZ
368For most types all the
369.B mount
370program has to do is issue a simple
371.IR mount (2)
372system call, and no detailed knowledge of the filesystem type is required.
373For a few types however (like nfs, smbfs, ncpfs) ad hoc code is
374necessary. The nfs ad hoc code is built in, but smbfs and ncpfs
375have a separate mount program. In order to make it possible to
376treat all types in a uniform way, mount will execute the program
377.I /sbin/mount.TYPE
66ee8158
KZ
378(if that exists) when called with type
379.IR TYPE .
5c36a0eb
KZ
380Since various versions of the
381.I smbmount
382program have different calling conventions,
383.I /sbin/mount.smb
384may have to be a shell script that sets up the desired call.
385
fd6b7a7f
KZ
386The type
387.I iso9660
388is the default. If no
389.B \-t
390option is given, or if the
391.B auto
392type is specified, the superblock is probed for the filesystem type
393.RI ( minix ", " ext ", " ext2 ", " xiafs ", " iso9660 ", " romfs
eb63b9b8 394.RI , ufs ", " ntfs ", " qnx4 ", " bfs
fd6b7a7f 395are supported).
5c36a0eb
KZ
396If this probe fails, mount will try to read the file
397.IR /etc/filesystems ,
398or, if that does not exist,
399.IR /proc/filesystems .
400All of the filesystem types listed there will be tried,
fd6b7a7f 401except for those that are labeled "nodev" (e.g.,
eb63b9b8 402.IR devpts ,
fd6b7a7f
KZ
403.I proc
404and
405.IR nfs ).
406
407Note that the
408.B auto
409type may be useful for user-mounted floppies.
5c36a0eb
KZ
410Creating a file
411.I /etc/filesystems
412can be useful to change the probe order (e.g., to try vfat before msdos)
413or if you use a kernel module autoloader.
fd6b7a7f
KZ
414Warning: the probing uses a heuristic (the presence of appropriate `magic'),
415and could recognize the wrong filesystem type.
416
417More than one type may be specified in a comma separated
418list. The list of file system types can be prefixed with
419.B no
420to specify the file system types on which no action should be taken.
421(This can be meaningful with the
422.B \-a
423option.)
424
425For example, the command:
426.RS
427.RS
428.B "mount \-a \-t nomsdos,ext"
429.RE
430mounts all file systems except those of type
431.I msdos
432and
433.IR ext .
434.RE
6dbe3af9
KZ
435.TP
436.B \-o
437Options are specified with a
438.B \-o
439flag followed by a comma separated string of options.
fd6b7a7f 440Some of these options are only useful when they appear in the
6dbe3af9
KZ
441.I /etc/fstab
442file. The following options apply to any file system that is being
443mounted:
444.RS
445.TP
446.B async
447All I/O to the file system should be done asynchronously.
448.TP
fd6b7a7f
KZ
449.B atime
450Update inode access time for each access. This is the default.
451.TP
6dbe3af9
KZ
452.B auto
453Can be mounted with the
454.B \-a
455option.
456.TP
457.B defaults
458Use default options:
459.BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async.
460.TP
461.B dev
462Interpret character or block special devices on the file system.
463.TP
464.B exec
465Permit execution of binaries.
466.TP
fd6b7a7f
KZ
467.B noatime
468Do not update inode access times on this file system (e.g, for faster
469access on the news spool to speed up news servers).
470.TP
6dbe3af9
KZ
471.B noauto
472Can only be mounted explicitly (i.e., the
473.B \-a
474option will not cause the file system to be mounted).
475.TP
476.B nodev
477Do not interpret character or block special devices on the file
fd6b7a7f 478system.
6dbe3af9
KZ
479.TP
480.B noexec
481Do not allow execution of any binaries on the mounted file system.
fd6b7a7f 482This option might be useful for a server that has file systems containing
6dbe3af9
KZ
483binaries for architectures other than its own.
484.TP
485.B nosuid
486Do not allow set-user-identifier or set-group-identifier bits to take
5c36a0eb
KZ
487effect. (This seems safe, but is in fact rather unsafe if you have
488suidperl(1) installed.)
6dbe3af9
KZ
489.TP
490.B nouser
491Forbid an ordinary (i.e., non-root) user to mount the file system.
fd6b7a7f 492This is the default.
6dbe3af9
KZ
493.TP
494.B remount
495Attempt to remount an already-mounted file system. This is commonly
496used to change the mount flags for a file system, especially to make a
497readonly file system writeable.
498.TP
499.B ro
500Mount the file system read-only.
501.TP
502.B rw
503Mount the file system read-write.
504.TP
505.B suid
506Allow set-user-identifier or set-group-identifier bits to take
507effect.
508.TP
509.B sync
510All I/O to the file system should be done synchronously.
511.TP
512.B user
fd6b7a7f
KZ
513Allow an ordinary user to mount the file system. This option implies
514the options
6dbe3af9 515.BR noexec ", " nosuid ", and " nodev
fd6b7a7f
KZ
516(unless overridden by subsequent options, as in the option line
517.BR user,exec,dev,suid ).
518.RE
519
520.SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
521The following options apply only to certain file systems.
522We sort them by file system. They all follow the
523.B \-o
524flag.
525
526.SH "Mount options for affs"
6dbe3af9 527.TP
fd6b7a7f
KZ
528\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
529Set the owner and group of the root of the file system (default: uid=gid=0,
530but with option
531.B uid
6dbe3af9 532or
fd6b7a7f
KZ
533.B gid
534without specified value, the uid and gid of the current process are taken).
6dbe3af9 535.TP
fd6b7a7f
KZ
536\fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP
537Set the owner and group of all files.
538.TP
539.BI mode= value
540Set the mode of all files to
541.IR value " & 0777"
542disregarding the original permissions.
543Add search permission to directories that have read permission.
544The value is given in octal.
545.TP
546.B protect
547Do not allow any changes to the protection bits on the file system.
548.TP
549.B usemp
550Set uid and gid of the root of the file system to the uid and gid
551of the mount point upon the first sync or umount, and then
552clear this option. Strange...
553.TP
554.B verbose
555Print an informational message for each successful mount.
556.TP
557.BI prefix= string
558Prefix used before volume name, when following a link.
559.TP
560.BI volume= string
561Prefix (of length at most 30) used before '/' when following a symbolic link.
562.TP
563.BI reserved= value
564(Default: 2.) Number of unused blocks at the start of the device.
565.TP
566.BI root= value
567Give explicitly the location of the root block.
6dbe3af9 568.TP
fd6b7a7f
KZ
569.BI bs= value
570Give blocksize. Allowed values are 512, 1024, 2048, 4096.
6dbe3af9 571.TP
fd6b7a7f
KZ
572.BR grpquota " / " noquota " / " quota " / " usrquota
573These options are accepted but ignored.
574
575.SH "Mount options for coherent"
576None.
577
eb63b9b8
KZ
578.SH "Mount options for devpts"
579The devpts file system is a pseudo file system, traditionally mounted on
580.IR /dev/pts .
581In order to acquire a pseudo terminal, a process opens
582.IR /dev/ptmx ;
583the number of the pseudo terminal is then made available to the process
584and the pseudo terminal slave can be accessed as
585.IR /dev/pts/ <number>.
586.TP
587\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
588This sets the owner or the group of newly created PTYs to
589the specified values. When nothing is specified, they will
590be set to the UID and GID of the creating process.
591For example, if there is a tty group with GID 5, then
592.B gid=5
593will cause newly created PTYs to belong to the tty group.
594.TP
595.BI mode= value
596Set the mode of newly created PTYs to the specified value.
597The default is 0600.
598A value of
599.B mode=620
600and
601.B gid=5
602makes "mesg y" the default on newly created PTYs.
603
fd6b7a7f
KZ
604.SH "Mount options for ext"
605None.
606Note that the `ext' file system is obsolete. Don't use it.
607Since Linux version 2.1.21 extfs is no longer part of the kernel source.
608
609.SH "Mount options for ext2"
610The `ext2' file system is the standard Linux file system.
611Due to a kernel bug, it may be mounted with random mount options
612(fixed in Linux 2.0.4).
613.TP
614.BR bsddf " / " minixdf
615Set the behaviour for the
616.I statfs
617system call. The
618.B minixdf
619behaviour is to return in the
620.I f_blocks
621field the total number of blocks of the file system, while the
622.B bsddf
623behaviour (which is the default) is to subtract the overhead blocks
624used by the ext2 file system and not available for file storage. Thus
6dbe3af9 625.RE
fd6b7a7f
KZ
626.nf
627
628% mount /k -o minixdf; df /k; umount /k
629Filesystem 1024-blocks Used Available Capacity Mounted on
630/dev/sda6 2630655 86954 2412169 3% /k
631% mount /k -o bsddf; df /k; umount /k
632Filesystem 1024-blocks Used Available Capacity Mounted on
633/dev/sda6 2543714 13 2412169 0% /k
634
635.fi
636(Note that this example shows that one can add command line options
637to the options given in
638.IR /etc/fstab .)
639
6dbe3af9 640.TP
fd6b7a7f
KZ
641.BR check " / " check=normal " / " check=strict
642Set checking level. When at least one of these options is set (and
643.B check=normal
644is set by default) the inodes and blocks bitmaps are checked upon mount
22853e4a 645(which can take half a minute or so on a big disk, and is rather useless).
fd6b7a7f
KZ
646With strict checking, block deallocation checks that the block to free
647is in the data zone.
648.TP
649.BR check=none " / " nocheck
22853e4a
KZ
650No checking is done. This is fast. Recent kernels do not have a
651check option anymore - checking with
652.BR e2fsck (8)
653is more meaningful.
fd6b7a7f
KZ
654.TP
655.B debug
656Print debugging info upon each (re)mount.
657.TP
658.BR errors=continue " / " errors=remount-ro " / " errors=panic
659Define the behaviour when an error is encountered.
660(Either ignore errors and just mark the file system erroneous and continue,
661or remount the file system read-only, or panic and halt the system.)
662The default is set in the filesystem superblock, and can be
663changed using
664.BR tune2fs (8).
665.TP
666.BR grpid " or " bsdgroups " / " nogrpid " or " sysvgroups
667These options define what group id a newly created file gets.
668When
669.BR grpid
670is set, it takes the group id of the directory in which it is created;
671otherwise (the default) it takes the fsgid of the current process, unless
672the directory has the setgid bit set, in which case it takes the gid
673from the parent directory, and also gets the setgid bit set
674if it is a directory itself.
675.TP
676\fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP
677The ext2 file system reserves a certain percentage of the available
678space (by default 5%, see
679.BR mke2fs (8)
680and
681.BR tune2fs (8)).
682These options determine who can use the reserved blocks.
683(Roughly: whoever has the specified uid, or belongs to the specified group.)
684.TP
685.BI sb= n
686Instead of block 1, use block
687.I n
688as superblock. This could be useful when the filesystem has been damaged.
eb63b9b8
KZ
689(Earlier, copies of the superblock would be made every 8192 blocks: in
690block 1, 8193, 16385, ... (and one got hundreds or even thousands
691of copies on a big filesystem). Since version 1.08,
692.B mke2fs
693has a \-s (sparse superblock) option to reduce the number of backup
694superblocks, and since version 1.15 this is the default. Note
695that this may mean that ext2 filesystems created by a recent
696.B mke2fs
697cannot be mounted r/w under Linux 2.0.*.)
fd6b7a7f
KZ
698.TP
699.BR grpquota " / " noquota " / " quota " / " usrquota
700These options are accepted but ignored.
701
702.SH "Mount options for fat"
703(Note:
704.I fat
705is not a separate filesystem, but a common part of the
706.IR msdos ,
707.I umsdos
708and
709.I vfat
710filesystems.)
711.TP
eb63b9b8 712.BR blocksize=512 " / " blocksize=1024 " / " blocksize=2048
fd6b7a7f
KZ
713Set blocksize (default 512).
714.TP
715\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
716Set the owner and group of all files. (Default: the uid and gid
717of the current process.)
718.TP
719.BI umask= value
720Set the umask (the bitmask of the permissions that are
721.B not
722present). The default is the umask of the current process.
723The value is given in octal.
724.TP
725.BI check= value
726Three different levels of pickyness can be chosen:
6dbe3af9
KZ
727.RS
728.TP
fd6b7a7f 729.B r[elaxed]
6dbe3af9 730Upper and lower case are accepted and equivalent, long name parts are
fd6b7a7f
KZ
731truncated (e.g.
732.I verylongname.foobar
733becomes
734.IR verylong.foo ),
735leading and embedded spaces are accepted in each name part (name and extension).
6dbe3af9 736.TP
fd6b7a7f 737.B n[ormal]
6dbe3af9
KZ
738Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
739rejected. This is the default.
740.TP
fd6b7a7f 741.B s[trict]
6dbe3af9
KZ
742Like "normal", but names may not contain long parts and special characters
743that are sometimes used on Linux, but are not accepted by MS-DOS are
744rejected. (+, =, spaces, etc.)
745.RE
746.TP
eb63b9b8
KZ
747.BI codepage= value
748Sets the codepage for converting to shortname characters on FAT
749and VFAT filesystems. By default, codepage 437 is used.
750.TP
fd6b7a7f 751.BR conv=b[inary] " / " conv=t[ext] " / " conv=a[uto]
6dbe3af9 752The
fd6b7a7f 753.I fat
6dbe3af9
KZ
754file system can perform CRLF<-->NL (MS-DOS text format to UNIX text
755format) conversion in the kernel. The following conversion modes are
756available:
757.RS
758.TP
fd6b7a7f 759.B binary
6dbe3af9
KZ
760no translation is performed. This is the default.
761.TP
fd6b7a7f 762.B text
6dbe3af9
KZ
763CRLF<-->NL translation is performed on all files.
764.TP
fd6b7a7f 765.B auto
6dbe3af9
KZ
766CRLF<-->NL translation is performed on all files that don't have a
767"well-known binary" extension. The list of known extensions can be found at
768the beginning of
fd6b7a7f
KZ
769.I fs/fat/misc.c
770(as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,
6dbe3af9 771lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,
726f69e2 772gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).
6dbe3af9
KZ
773.PP
774Programs that do computed lseeks won't like in-kernel text conversion.
726f69e2 775Several people have had their data ruined by this translation. Beware!
6dbe3af9 776
fd6b7a7f
KZ
777For file systems mounted in binary mode, a conversion tool
778(fromdos/todos) is available.
6dbe3af9
KZ
779.RE
780.TP
eb63b9b8
KZ
781.BI cvf_format= module
782Forces the driver to use the CVF (Compressed Volume File) module
783.RI cvf_ module
784instead of auto-detection. If the kernel supports kmod, the
785cvf_format=xxx option also controls on-demand CVF module loading.
786.TP
787.BI cvf_option= option
788Option passed to the CVF module.
789.TP
6dbe3af9 790.B debug
fd6b7a7f 791Turn on the
6dbe3af9
KZ
792.I debug
793flag. A version string and a list of file system parameters will be
794printed (these data are also printed if the parameters appear to be
795inconsistent).
796.TP
eb63b9b8
KZ
797.BR fat=12 " / " fat=16 " / " fat=32
798Specify a 12, 16 or 32 bit fat. This overrides
fd6b7a7f 799the automatic FAT type detection routine. Use with caution!
6dbe3af9 800.TP
eb63b9b8
KZ
801.BI iocharset= value
802Character set to use for converting between 8 bit characters
803and 16 bit Unicode characters. The default is iso8859-1.
804Long filenames are stored on disk in Unicode format.
805.TP
fd6b7a7f
KZ
806.B quiet
807Turn on the
808.I quiet
809flag. Attempts to chown or chmod files do not return errors,
810although they fail. Use with caution!
6dbe3af9 811.TP
fd6b7a7f
KZ
812.B "sys_immutable, showexec, dots, nodots, dotsOK=[yes|no]"
813Various misguided attempts to force Unix or DOS conventions
814onto a FAT file system.
815
816.SH "Mount options for hpfs"
6dbe3af9 817.TP
fd6b7a7f
KZ
818\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
819Set the owner and group of all files. (Default: the uid and gid
820of the current process.)
6dbe3af9 821.TP
fd6b7a7f
KZ
822.BI umask= value
823Set the umask (the bitmask of the permissions that are
824.B not
825present). The default is the umask of the current process.
826The value is given in octal.
827.TP
828.BR case=lower " / " case=asis
829Convert all files names to lower case, or leave them.
830(Default:
831.BR case=lower .)
832.TP
833.BR conv=binary " / " conv=text " / " conv=auto
834For
835.BR conv=text ,
836delete some random CRs (in particular, all followed by NL)
837when reading a file.
838For
839.BR conv=auto ,
840choose more or less at random between
841.BR conv=binary " and " conv=text .
842For
843.BR conv=binary ,
844just read what is in the file. This is the default.
6dbe3af9
KZ
845.TP
846.B nocheck
fd6b7a7f
KZ
847Do not abort mounting when certain consistency checks fail.
848
849.SH "Mount options for iso9660"
6dbe3af9 850Normal
fd6b7a7f 851.I iso9660
6dbe3af9
KZ
852filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
853length), and in addition all characters are in upper case. Also there is
854no field for file ownership, protection, number of links, provision for
855block/character devices, etc.
856
857Rock Ridge is an extension to iso9660 that provides all of these unix like
858features. Basically there are extensions to each directory record that
859supply all of the additional information, and when Rock Ridge is in use,
860the filesystem is indistinguishable from a normal UNIX file system (except
861that it is read-only, of course).
fd6b7a7f 862.TP
6dbe3af9 863.B norock
fd6b7a7f 864Disable the use of Rock Ridge extensions, even if available. Cf.\&
6dbe3af9 865.BR map .
eb63b9b8
KZ
866.B nojoliet
867Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
868.BR map .
6dbe3af9 869.TP
fd6b7a7f
KZ
870.BR check=r[elaxed] " / " check=s[trict]
871With
872.BR check=relaxed ,
873a filename is first converted to lower case before doing the lookup.
874This is probably only meaningful together with
875.B norock
6dbe3af9 876and
fd6b7a7f
KZ
877.BR map=normal .
878(Default:
879.BR check=strict .)
880.TP
881\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
882Give all files in the file system the indicated user or group id,
883possibly overriding the information found in the Rock Ridge extensions.
884(Default:
885.BR uid=0,gid=0 .)
886.TP
eb63b9b8 887.BR map=n[ormal] " / " map=o[ff] " / " map=a[corn]
fd6b7a7f
KZ
888For non-Rock Ridge volumes, normal name translation maps upper
889to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
890With
891.B map=off
892no name translation is done. See
893.BR norock .
894(Default:
895.BR map=normal .)
eb63b9b8
KZ
896.B map=acorn
897is like
898.BR map=normal
899but also apply Acorn extensions if present.
fd6b7a7f
KZ
900.TP
901.BI mode= value
902For non-Rock Ridge volumes, give all files the indicated mode.
903(Default: read permission for everybody.)
904Since Linux 2.1.37 one no longer needs to specify the mode in
905decimal. (Octal is indicated by a leading 0.)
906.TP
907.B unhide
908Also show hidden and associated files.
909.TP
910.B block=[512|1024|2048]
911Set the block size to the indicated value.
912(Default:
913.BR block=1024 .)
914.TP
915.BR conv=a[uto] " / " conv=b[inary] " / " conv=m[text] " / " conv=t[ext]
916(Default:
917.BR conv=binary .)
918Since Linux 1.3.54 this option has no effect anymore.
919(And non-binary settings used to be very dangerous,
eb63b9b8 920possibly leading to silent data corruption.)
6dbe3af9 921.TP
fd6b7a7f
KZ
922.B cruft
923If the high byte of the file length contains other garbage,
924set this mount option to ignore the high order bits of the file length.
925This implies that a file cannot be larger than 16MB.
926The `cruft' option is set automatically if the entire CDROM
927has a weird size (negative, or more than 800MB). It is also
928set when volume sequence numbers other than 0 or 1 are seen.
eb63b9b8
KZ
929.TP
930.B session=x
931Select number of session on multisession CD. (Since 2.3.4.)
932.TP
933.B sbsector=xxx
934Session begins from sector xxx. (Since 2.3.4.)
fd6b7a7f
KZ
935
936.SH "Mount options for minix"
937None.
6dbe3af9 938
fd6b7a7f
KZ
939.SH "Mount options for msdos"
940See mount options for fat.
6dbe3af9
KZ
941If the
942.I msdos
943file system detects an inconsistency, it reports an error and sets the file
944system read-only. The file system can be made writeable again by remounting
945it.
6dbe3af9 946
fd6b7a7f
KZ
947.SH "Mount options for ncp"
948Just like
949.IR nfs ", the " ncp
950implementation expects a binary argument (a
951.IR "struct ncp_mount_data" )
952to the mount system call. This argument is constructed by
953.BR ncpmount (8)
954and the current version of
6dbe3af9 955.B mount
fd6b7a7f 956(2.6h) does not know anything about ncp.
6dbe3af9 957
fd6b7a7f
KZ
958.SH "Mount options for nfs"
959Instead of a textual option string, parsed by the kernel, the
960.I nfs
961file system expects a binary argument of type
962.IR "struct nfs_mount_data" .
963The program
964.B mount
965itself parses the following options of the form `tag=value',
966and puts them in the structure mentioned:
967.BI rsize= n,
968.BI wsize= n,
969.BI timeo= n,
970.BI retrans= n,
971.BI acregmin= n,
972.BI acregmax= n,
973.BI acdirmin= n,
974.BI acdirmax= n,
975.BI actimeo= n,
976.BI retry= n,
977.BI port= n,
978.BI mountport= n,
979.BI mounthost= name,
980.BI mountprog= n,
981.BI mountvers= n,
982.BI nfsprog= n,
983.BI nfsvers= n,
984.BI namlen= n.
985The option
986.BI addr= n
987is accepted but ignored.
988Also the following Boolean options, possibly preceded by
989.B no
990are recognized:
991.BR bg ,
992.BR fg ,
993.BR soft ,
994.BR hard ,
995.BR intr ,
996.BR posix ,
997.BR cto ,
998.BR ac ,
999.BR tcp ,
1000.BR udp ,
1001.BR lock .
1002For details, see
1003.BR nfs (5).
6dbe3af9 1004
fd6b7a7f 1005Especially useful options include
6dbe3af9 1006.TP
fd6b7a7f
KZ
1007.B rsize=8192,wsize=8192
1008This will make your nfs connection much faster than with the default
22853e4a
KZ
1009buffer size of 1024. (NFSv2 does not work with larger values of
1010.B rsize
1011and
1012.BR wsize .)
6dbe3af9 1013.TP
fd6b7a7f
KZ
1014.B hard
1015The program accessing a file on a NFS mounted file system will hang
1016when the server crashes. The process cannot be interrupted or
1017killed unless you also specify
1018.BR intr .
1019When the NFS server is back online the program will continue undisturbed
1020from where it was. This is probably what you want.
6dbe3af9 1021.TP
fd6b7a7f
KZ
1022.B soft
1023This option allows the kernel to time out if the nfs server is not
1024responding for some time. The time can be
1025specified with
1026.BR timeo=time .
1027This option might be useful if your nfs server sometimes doesn't respond
1028or will be rebooted while some process tries to get a file from the server.
1029Usually it just causes lots of trouble.
6dbe3af9 1030.TP
fd6b7a7f
KZ
1031.B nolock
1032Do not use locking. Do not start lockd.
1033
eb63b9b8
KZ
1034.SH "Mount options for ntfs"
1035.TP
1036.BI iocharset= name
1037Character set to use when returning file names.
1038Unlike VFAT, NTFS suppresses names that contain
1039unconvertible characters.
1040.TP
1041.BR utf8
1042Use UTF-8 for converting file names.
1043.TP
1044.B uni_xlate=[0|1|2]
1045For 0 (or `no' or `false') or 1 (or `yes' or `true'):
1046use the VFAT-style encoding for file names outside the current
1047character set. A value of 2 will disable the encoding with ":".
1048.TP
1049.B posix=[0|1]
1050If enabled (posix=1), the file system distinguishes between
1051upper and lower case. The 8.3 alias names are presented as
1052hard links instead of being suppressed.
1053.TP
1054\fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP
1055Set the file permission on the filesystem.
1056By default, the files are owned by root and not readable by somebody else.
1057
fd6b7a7f 1058.SH "Mount options for proc"
6dbe3af9 1059.TP
fd6b7a7f
KZ
1060\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
1061These options are recognized, but have no effect as far as I can see.
1062
1063.SH "Mount options for romfs"
1064None.
1065
1066.SH "Mount options for smbfs"
1067Just like
1068.IR nfs ", the " smb
1069implementation expects a binary argument (a
1070.IR "struct smb_mount_data" )
1071to the mount system call. This argument is constructed by
1072.BR smbmount (8)
1073and the current version of
6dbe3af9 1074.B mount
eb63b9b8 1075(2.9w) does not know anything about smb.
fd6b7a7f
KZ
1076
1077.SH "Mount options for sysv"
1078None.
1079
eb63b9b8
KZ
1080.SH "Mount options for udf"
1081.TP
1082.B gid=
1083Set the default group.
1084.TP
1085.B umask=
1086Set the default umask.
1087.TP
1088.B uid=
1089Set the default user.
1090.TP
1091.B unhide
1092Show otherwise hidden files.
1093.TP
1094.B undelete
1095Show deleted files in lists.
1096.TP
1097.B strict
1098Set strict conformance (unused).
1099.TP
1100.B utf8
1101(unused).
1102.TP
1103.B iocharset
1104(unused).
1105.TP
1106.B bs=
1107Set the block size. (May not work unless 2048.)
1108.TP
1109.B novrs
1110Skip volume sequence recognition.
1111.TP
1112.B session=
1113Set the CDROM session counting from 0. Default: last session.
1114.TP
1115.B anchor=
1116Override standard anchor location. Default: 256.
1117.TP
1118.B volume=
1119Override the VolumeDesc location. (unused)
1120.TP
1121.B partition=
1122Override the PartitionDesc location. (unused)
1123.TP
1124.B lastblock=
1125Set the last block of the filesystem.
1126.TP
1127.B fileset=
1128Override the fileset block location. (unused)
1129.TP
1130.B rootdir=
1131Override the root directory location. (unused)
1132
fd6b7a7f 1133.SH "Mount options for ufs"
eb63b9b8
KZ
1134.TP
1135.BI ufstype= value
1136UFS is a file system widely used in different operating systems.
1137The problem are differences among implementations. Features of some
1138implementations are undocumented, so its hard to recognize the
1139type of ufs automatically.
1140That's why user must specify the type of ufs by mount option.
1141Possible values are:
1142.RS
1143.TP
1144.B old
1145Old format of ufs, this is the default, read only.
1146.TP
1147.B 44bsd
1148For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
1149.TP
1150.B sun
1151For filesystems created by SunOS or Solaris on Sparc.
1152.TP
1153.B sunx86
1154For filesystems created by Solaris on x86.
1155.TP
1156.B nextstep
1157For filesystems created by NeXTStep (on NeXT station) (currently read only).
1158.TP
1159.B nextstep-cd
1160For NextStep CDROMs (block_size == 2048), read-only.
1161.TP
1162.B openstep
1163For filesystems created by OpenStep (currently read only).
1164.RE
1165
1166.TP
1167.BI onerror= value
1168Set behaviour on error:
1169.RS
1170.TP
1171.B panic
1172If an error is encountered, cause a kernel panic.
1173.TP
1174.B [lock|umount|repair]
1175These mount options don't do anything at present;
1176when an error is encountered only a console message is printed.
1177.RE
fd6b7a7f
KZ
1178
1179.SH "Mount options for umsdos"
1180See mount options for msdos.
1181The
1182.B dotsOK
1183option is explicitly killed by
1184.IR umsdos .
1185
1186.SH "Mount options for vfat"
1187First of all, the mount options for
1188.I fat
1189are recognized.
1190The
1191.B dotsOK
1192option is explicitly killed by
1193.IR vfat .
1194Furthermore, there are
1195.TP
1196.B uni_xlate
1197Translate unhandled Unicode characters to special escaped sequences.
1198This lets you backup and restore filenames that are created with any
1199Unicode characters. Without this option, a '?' is used when no
1200translation is possible. The escape character is ':' because it is
1201otherwise illegal on the vfat filesystem. The escape sequence
1202that gets used, where u is the unicode character,
1203is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
1204.TP
1205.B posix
1206Allow two files with names that only differ in case.
1207.TP
1208.B nonumtail
1209First try to make a short name without sequence number,
1210before trying
1211.IR name~num.ext .
eb63b9b8
KZ
1212.TP
1213.B utf8
1214UTF8 is the filesystem safe 8-bit encoding of Unicode that is used
1215by the console. It can be be enabled for the filesystem with this option.
1216If `uni_xlate' gets set, UTF8 gets disabled.
fd6b7a7f
KZ
1217
1218.SH "Mount options for xenix"
1219None.
1220
1221.SH "Mount options for xiafs"
1222None. Although nothing is wrong with xiafs, it is not used much,
1223and is not maintained. Probably one shouldn't use it.
1224Since Linux version 2.1.21 xiafs is no longer part of the kernel source.
1225
1226.SH "THE LOOP DEVICE"
1227One further possible type is a mount via the loop device. For example,
1228the command
1229
1230.nf
1231.B " mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024"
1232.fi
1233
1234will set up the loop device
1235.I /dev/loop3
1236to correspond to the file
1237.IR /tmp/fdimage ,
1238and then mount this device on
1239.IR /mnt .
1240This type of mount knows about three options, namely
1241.BR loop ", " offset " and " encryption ,
1242that are really options to
1243.BR losetup (8).
1244If no explicit loop device is mentioned
1245(but just an option `\fB\-o loop\fP' is given), then
1246.B mount
1247will try to find some unused loop device and use that.
7eda085c
KZ
1248If you are not so unwise as to make
1249.I /etc/mtab
1250a symbolic link to
1251.I /proc/mounts
1252then any loop device allocated by
1253.B mount
1254will be freed by
1255.BR umount .
1256You can also free a loop device by hand, using `losetup -d', see
1257.BR losetup (8).
6dbe3af9
KZ
1258
1259.SH FILES
1260.I /etc/fstab
1261file system table
1262.br
fd6b7a7f
KZ
1263.I /etc/mtab
1264table of mounted file systems
1265.br
6dbe3af9
KZ
1266.I /etc/mtab~
1267lock file
1268.br
1269.I /etc/mtab.tmp
1270temporary file
1271.SH "SEE ALSO"
fd6b7a7f
KZ
1272.BR mount (2),
1273.BR umount (2),
1274.BR fstab (5),
1275.BR umount (8),
1276.BR swapon (8),
1277.BR nfs (5),
22853e4a 1278.BR e2label (8),
fd6b7a7f
KZ
1279.BR mountd (8),
1280.BR nfsd (8),
1281.BR mke2fs (8),
1282.BR tune2fs (8),
1283.BR losetup (8)
6dbe3af9
KZ
1284.SH BUGS
1285It is possible for a corrupted file system to cause a crash.
1286.PP
1287Some Linux file systems don't support
fd6b7a7f 1288.B "\-o sync"
6dbe3af9
KZ
1289(the ext2fs
1290.I does
1291support synchronous updates (a la BSD) when mounted with the
1292.B sync
1293option).
1294.PP
1295The
fd6b7a7f 1296.B "\-o remount"
6dbe3af9 1297may not be able to change mount parameters (all
fd6b7a7f 1298.IR ext2fs -specific
6dbe3af9
KZ
1299parameters, except
1300.BR sb ,
1301are changeable with a remount, for example, but you can't change
1302.B gid
1303or
1304.B umask
1305for the
fd6b7a7f 1306.IR fatfs ).
6dbe3af9
KZ
1307.SH HISTORY
1308A
1309.B mount
5c36a0eb 1310command existed in Version 5 AT&T UNIX.