mount

mount partitions and filesystems (UNIX)

Syntax:

mount [-v] [-w secs] -p block_special_file

mount [-v] [-w secs] block_special_file directory [-r]...

mount [-v] -t type type_specific_options

Options:

-p block_special_file
Read the partition table from the named block special file and mount all partitions found. The partitions will appear as block special files with the form:

block_special_filetpartition-type-num

That is, if the block special file was named /dev/hd0 and the QNX 4 partition (type 77) was found, the block special file /dev/hd0t77 would be created.

-t type
Mount the type of filesystem specified. The mount utility does not know about all types of filesystem. For types other than qnx4, mount will invoke another utility named mount_type, with the remaining command-line parameters supplied. The interpretation of the remaining parameters is therefore up to that utility. If there are no at-signs (@) or colons (:) in the arguments, the default type is qnx4. If at-signs or colons are found, mount will default to type nfs and will invoke the mount_nfs utility (QNX TCP/IP runtime product) to perform the mount operation.
-v
Be verbose; write diagnostic messages indicating actions performed to the standard output.
-w secs
Wait up to the indicated number of seconds for the block special file to appear. This is useful at boot time for slow-resetting devices. Default: 60 seconds.
block_special_file directory [-r]
Mount, as a filesystem named directory, the named block special file. If the -r option is given, mount it as a read-only filesystem.

Examples:

Mount all partitions found on hard disk 0, and mount the QNX 4 partition as the root (this line is commonly seen in OS build files):

    mount -p /dev/hd0 /dev/hd0t77 /

Mount floppy disk 0 as the directory /fd and make it read-only:

    mount /dev/fd0 /fd -r

Mount the ramdisk as the temporary directory:

    mount /dev/ram /tmp

Mount the QNX 4 partition found on the second hard disk as the user directory:

    mount /dev/hd1t77 /home

Mount the iso9660 filesystem present on the CD-ROM device /dev/cd0 as /cd0:

    mount -t iso9660 /dev/cd0 /cd0

Note that in the above case, mount would invoke the following utility:

    mount_iso9660 /dev/cd0 /cd0

Description:

You use the mount utility to mount disk partitions as block special files, and to mount block special files as QNX 4 filesystems. When you're mounting a block special file as a filesystem, the location in the pathname space where the filesystem is mounted is called a mount point.

The mount utility can also be used as a common front-end for mounting other types of filesystems, such as ISO 9660 filesystems and NFS filesystems. This is accomplished by passing a -t type option to mount which tells it to invoke another utility to perform the actual mount operation. (The secondary mount utility must be found in the current path, $PATH. The filename of the executable will be mount_type.)

Because use of -t type requires that mount exec() into another program, this form of mount may not be utilized within a QNX boot image. If it is necessary to mount a non-QNX filesystem from the processes in the boot image, you must use the specific mount command for the filesystem type desired e.g. mount_iso9660.

Exit status:

0
Successful completion.
>0
An error occurred.

See also: