mount(8)


NAME

mount, umount - mount and dismount file systems

SYNOPSIS

mount [-afrwvn] [-t vfstype ]
mount [-frwvn] [-o remount [,...]] special | node
mount [-frwn] [-t vfstype ] [-o options ] special node
umount [-ahnvV] [-t vfstype ]
umount [-nv] special | node [...]

DESCRIPTION

The mount command calls the mount (2) system call to prepare and graft a special device on to the file system tree at the point node . If either special " or " node are not provided, the appropriate information is taken from the fstab (5) file. The proc file system is not associated with a special device, and when mounting it, an arbitrary keyword, such as proc can be used instead of a path or node specification. (The customary choice none is less fortunate: the error message `none busy' from umount can be confusing.)
The system maintains a list of currently mounted file systems. If no arguments are given to mount , this list is printed.
Options available for the mount command:

-f
Causes everything to be done except for the actual system call; if it's not obvious, this ``fakes'' mounting the file system. This option is useful in conjunction with the -v flag to determine what the mount command is trying to do.

-o
Options are specified with a -o flag followed by a comma separated string of options. N.B., many of these options are only useful when they appear in the /etc/fstab file. The following options apply to any file system that is being mounted:

async
All I/O to the file system should be done asynchronously.

auto
Can be mounted with the -a option.

defaults
Use default options: rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async.

dev
Interpret character or block special devices on the file system.

exec
Permit execution of binaries.

noauto
Can only be mounted explicitly (i.e., the -a option will not cause the file system to be mounted).

nodev
Do not interpret character or block special devices on the file system. This options is useful for a server that has file systems containing special devices for architectures other than its own.

noexec
Do not allow execution of any binaries on the mounted file system. This options is useful for a server that has file systems containing binaries for architectures other than its own.

nosuid
Do not allow set-user-identifier or set-group-identifier bits to take effect.

nouser
Forbid an ordinary (i.e., non-root) user to mount the file system.

remount
Attempt to remount an already-mounted file system. This is commonly used to change the mount flags for a file system, especially to make a readonly file system writeable.

ro
Mount the file system read-only.

rw
Mount the file system read-write.

suid
Allow set-user-identifier or set-group-identifier bits to take effect.

sync
All I/O to the file system should be done synchronously.

user
Allow an ordinary user to mount the file system. Ordinary users always have the following options activated: noexec ", " nosuid ", and " nodev (unless overridden by the superuser by using, for example, the following option line: user,exec,dev,suid ).

The following options apply only to certain file systems:

case= value
For the hpfs file system, specify case as lower or asis .

check= value
Tells the ext2 file sysem kernel code to do some more checks while the file system is mounted. Currently (1.3.11), the following values can be specified with this option:

none
no extra check is performed by the kernel code

normal
The inodes and blocks bitmaps are checked when the file system is mounted (this is the default)

strict
In addition to the normal checks, block deallocation checks that the block to free is in the data zone.

check= value
For the msdos file system, three different levels of pickyness can be chosen:

relaxed
Upper and lower case are accepted and equivalent, long name parts are truncated (e.g. verlongname.foobar becomes verylong.foo), leading and embedded spaces are accepted in each name part (name and extension).

normal
Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are rejected. This is the default.

strict
Like "normal", but names may not contain long parts and special characters that are sometimes used on Linux, but are not accepted by MS-DOS are rejected. (+, =, spaces, etc.)

conv= value
For the msdos , hpfs , and iso9660 file systems, specify file conversion as binary ", " text ", or " auto . The iso9660 file system also allows value to be mtext .
The msdos file system can perform CRLF<-->NL (MS-DOS text format to UNIX text format) conversion in the kernel. The following conversion modes are available:

binary
no translation is performed. This is the default.

text
CRLF<-->NL translation is performed on all files.

auto
CRLF<-->NL translation is performed on all files that don't have a "well-known binary" extension. The list of known extensions can be found at the beginning of fs/msdos/misc.c (as of 1.3.11, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj, lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz, gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).

Programs that do computed lseeks won't like in-kernel text conversion. Several people have had their data ruined by this translation. Beware!
For file systems mounted in binary mode, a conversion tool (fromdos/todos) is available.

block= value
For the iso9660 file system, set the blocksize.

bsdgroups
See grpid

cruft
For the iso9660 file system, set the cruft flag to 'y'. This option is available because there are buggy premastering programs out there that leave junk in the top byte of the file size. This option clears the top byte, but restricts files to 16Mb maximum in the process.

debug
For the msdos and ext2 file systems, turn on the debug flag. A version string and a list of file system parameters will be printed (these data are also printed if the parameters appear to be inconsistent).

debug
For the ext2fs file system, causes the kernel code to display the file system parameters when the file system is mounted.

errors= value
For the ext2 file system, specifies the error behavior:

continue
No special action is taken on errors (except marking the file system as erroneous). This is the default.

remount

ro
The file system is remounted read only, and subsequent writes are refused.

panic
When an error is detected, the system panics.

fat= value
For the msdos file system, specify either a 12 bit fat or a 16 bit fat. This overrides the automatic FAT type detection routine. Use with caution!

gid= value
For the msdos and hpfs file systems, give every file a gid equal to value .

grpid
Causes the ext2fs to use the BSD behavior when creating files: file are created with the group id of their parent directory.

map= value
For the iso9660 file system, specify mapping as off " or " normal . In general, non-Rock Ridge discs have all of the filenames in upper case, and all of the filenames have a ";1" appended. The map option strips the ";1" and makes the name lower case. C.f. norock .

nocheck
For the ext2fs , turns of checking (see check=none ).

nogrpid
Causes the ext2fs to use the System V behaviour when creating files: files are created with the group id of the creating process, unless the setgid bit is set on the parent directory. This is the default for all Linux file systems.

norock
Normal iso9600 filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename length), and in addition all characters are in upper case. Also there is no field for file ownership, protection, number of links, provision for block/character devices, etc.
Rock Ridge is an extension to iso9660 that provides all of these unix like features. Basically there are extensions to each directory record that supply all of the additional information, and when Rock Ridge is in use, the filesystem is indistinguishable from a normal UNIX file system (except that it is read-only, of course).
The norock switch disables the use of Rock Ridge extensions, even if available. C.f. map .

quiet
For the msdos file system, turn on the quiet flag. Attempts to chown or chmod files do not yield errors, although they fail. Use with caution!

sb= value
For the ext2 file system, use an alternate superblock located at block value . value is numbered in 1024 bytes blocks. An ext2 file system usually has backups of the super block at blocks 1, 8193, 16385 and so on.

soft
For the nfs file system this allows the kernel to time out if the nfs server is not responding for some time, otherwise it will try forever. The time can be specified with timeo=time . For more information look at nfs (5).
This option is useful if your nfs server sometimes doesn't respond or will be rebooted while some process tries to get a file from the server.

sysvgroups
See nogrpid

sys_immutable, showexec, dots, nodots, dotsOK= yes|no
For the msdos file system, various misguided attempts to force Unix or DOS conventions onto a FAT file system.

uid= value
For the msdos and hpfs file systems, give every file a uid equal to value .

umask= value
For the msdos and hpfs file systems, give every file a umask of value . The radix defaults to octal.

The full set of options applied is determined by first extracting the options for the file system from the fstab table, then applying any options specified by the -o argument, and finally applying the -r " or " -w option.
If the msdos file system detects an inconsistency, it reports an error and sets the file system read-only. The file system can be made writeable again by remounting it.

-r
The file system object is to be mounted read-only.

-t vfstype
The argument following the -t is used to indicate the file system type. The file system types which are currently supported are listed in linux/fs/filesystems.c : minix ", " ext ", " ext2 ", " xiafs ", " msdos ", " umsdos , hpfs ", " proc ", " nfs ", " iso9660 ", " smbfs , sysv ", " xenix ", " coherent . Note that that last three are equivalent and that "xenix" and "coherent" will be removed at some point in the future \(em use "sysv" instead.
The type iso9660 is the default. If no -t option is given, or if the "auto" type is specified, the superblock is probed for the filesystem type (minix, ext, ext2, xia, iso9660 are supported). If this probe fails and /proc/filesystems exists, then all of the filesystems listed will be tried, except for those that are labeled "nodev" (e.g., "proc" and "nfs").
Note that the "auto" type may be useful for user-mounted floppies.
For example, the mount command:

mount -a -t nomsdos,ext

mounts all file systems except those of type msdos and ext .

-v
Verbose mode.

-w
The file system object is to be read and write.

-n
Mount without writing in /etc/mtab .

One further possible type is a mount via the loop device. For example, the command
mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024
will set up the loop device /dev/loop3 to correspond to the file /tmp/fdimage, and then mount this device on /mnt. This type of mount knows about three options, namely loop, offset and encryption, that are really options to losetup (8). If no explicit loop device is mentioned (but just an option `-o loop' is given), then mount will try to find some unused loop device and use that.

Umount removes the special device, or the device grafted at point node , from the file system tree. It will also free the loop device (if any) associated with the mount, in case it finds the option `loop=...' in /etc/mtab . Any pending loop devices can be freed using `losetup -d', see losetup (8).
Options for the umount command:

-a
All of the file systems described in /etc/mtab are unmounted.

-n
Unmount without writing in /etc/mtab .

-t vfstype
Is used to indicate the actions should only be taken on file systems of the specified type. More than one type may be specified in a comma separated list. The list of file system types can be prefixed with ``no'' to specify the file system types on which no action should be taken. (See example above for the mount command.)

-V
Print version and exit.

-h
Print help message and exit.

-v
Verbose mode.

FILES

/etc/fstab file system table
/etc/mtab~ lock file
/etc/mtab.tmp temporary file

SEE ALSO

mount (2), umount (2), fstab (5), swapon (8), nfs (5), mountd (8), nfsd (8), losetup (8)

BUGS

It is possible for a corrupted file system to cause a crash.

Some Linux file systems don't support -o " synchronous" (the ext2fs does support synchronous updates (a la BSD) when mounted with the sync option).

The -o " remount" may not be able to change mount parameters (all ext2fs parameters, except sb , are changeable with a remount, for example, but you can't change gid or umask for the dosfs ).

HISTORY

A mount command appeared in Version 6 AT&T UNIX.