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