Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
QNX Community Resources

QNX Community Resources

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Next]

mount

Mount partitions and filesystems (UNIX)

Syntax:

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

mount [-v] [-w secs] block_special_file directory [flags]

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 [flags]
Mount the named block special file as a filesystem named directory. Optional flags modify the way Fsys will work with the filesystem. Flags are:
-r
Mount as a read-only filesystem.
-a
Make all metadata (system) updates asynchronous.
-e
Don't allow executables to load.
-g
Don't allow persistent pregrown files.
-s
All data (user) updates are synchronous.
-u
Don't honor setuid bits.

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 (e.g. DOS, ISO 9660, NFS). 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.)


Note: Since the -t type option requires that mount exec() into another program, you can't use this form of mount within a QNX boot image. If you need 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_dos, mount_iso9660).

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 ISO 9660 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

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

buildqnx, mount_cdfs, mount_dos, mount_iso9660, mount_smb, umount


[Previous] [Contents] [Next]