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