xref: /netbsd-src/sbin/mount_msdos/mount_msdos.8 (revision 413d532bcc3f62d122e56d92e13ac64825a40baf)
1.\" $NetBSD: mount_msdos.8,v 1.36 2012/11/16 15:00:18 tsutsui Exp $
2.\"
3.\" Copyright (c) 1993, 1994 Christopher G. Demetriou
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"          This product includes software developed for the
17.\"          NetBSD Project.  See http://www.NetBSD.org/ for
18.\"          information about NetBSD.
19.\" 4. The name of the author may not be used to endorse or promote products
20.\"    derived from this software without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32.\"
33.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
34.\"
35.Dd November 16, 2012
36.Dt MOUNT_MSDOS 8
37.Os
38.Sh NAME
39.Nm mount_msdos
40.Nd mount an MS-DOS file system
41.Sh SYNOPSIS
42.Nm
43.Op Fl 9Gls
44.Op Fl g Ar gid
45.Op Fl M Ar mask
46.Op Fl m Ar mask
47.Op Fl o Ar options
48.Op Fl t Ar gmtoff
49.Op Fl u Ar uid
50.Pa special
51.Pa node
52.Sh DESCRIPTION
53The
54.Nm
55command attaches the MS-DOS filesystem residing on
56the device
57.Pa special
58to the global filesystem namespace at the location
59indicated by
60.Pa node .
61Both
62.Ar special
63and
64.Ar node
65are converted to absolute paths before use.
66This command is normally executed by
67.Xr mount 8
68at boot time, but can be used by any user to mount an
69MS-DOS file system on any directory that they own (provided,
70of course, that they have appropriate access to the device that
71contains the file system).
72.Pp
73Support for FAT16 and VFAT32 as well as long file names is available.
74.Pp
75The options are as follows:
76.Bl -tag -width XoXoptionsXX
77.It Fl 9
78Ignore the special Win'95 directory entries even
79if deleting or renaming a file.
80This forces
81.Fl s .
82.It Fl G
83This option causes the filesystem to be interpreted as an Atari-Gemdos
84filesystem.
85The differences to the MS-DOS filesystem are minimal and
86limited to the boot block.
87This option also allows mounting X680x0's Human68k floppies.
88This option enforces
89.Fl s .
90.It Fl g Ar gid
91Set the group of the files in the file system to
92.Ar gid .
93The default group is the group of the directory
94on which the file system is being mounted.
95.It Fl l
96Force listing and generation of
97Win'95 long filenames
98and separate creation/modification/access dates.
99.Pp
100If neither
101.Fl s
102nor
103.Fl l
104are given,
105.Nm
106searches the root directory of the filesystem to
107be mounted for any existing Win'95 long filenames.
108If the filesystem is not empty and no such entries are found,
109.Fl s
110is the default.
111Otherwise
112.Fl l
113is assumed.
114.It Fl M Ar mask
115Specify the maximum file permissions for directories
116in the file system.
117The value of
118.Fl m
119is used if it is supplied and
120.Fl M
121is omitted.
122.It Fl m Ar mask
123Specify the maximum file permissions for files
124in the file system.
125(For example, a mask of
126.Li 755
127specifies that, by default, the owner should have
128read, write, and execute permissions for files, but
129others should only have read and execute permissions.
130See
131.Xr chmod 1
132for more information about octal file modes.)
133Only the nine low-order bits of
134.Ar mask
135are used.
136The value of
137.Fl M
138is used if it is supplied and
139.Fl m
140is omitted.
141The default mask is taken from the
142directory on which the file system is being mounted.
143.It Fl o Ar options
144Use the specified mount
145.Ar options ,
146as described in
147.Xr mount 8 .
148.It Fl s
149Force behaviour to
150ignore and not generate Win'95 long filenames.
151See also
152.Fl l .
153.It Fl t Ar gmtoff
154Set the time zone offset (in seconds) from UTC to
155.Ar gmtoff ,
156with positive values indicating east of the Prime Meridian.
157If not set, the user's current time zone will be used.
158.It Fl u Ar uid
159Set the owner of the files in the file system to
160.Ar uid .
161The default owner is the owner of the directory
162on which the file system is being mounted.
163.El
164.Sh EXAMPLES
165To remove the 'execute' permission bit for all files, but still keep
166directories searchable, use:
167.Bl -item -offset indent
168.It
169mount_msdos -m 0644 -M 0755 /dev/wd0e /msdos
170.El
171.Sh SEE ALSO
172.Xr mount 2 ,
173.Xr unmount 2 ,
174.Xr fstab 5 ,
175.Xr mount 8
176.Sh HISTORY
177The
178.Nm
179utility first appeared in
180.Nx 0.9 .
181Its predecessor, the
182.Ic mount_pcfs
183utility appeared in
184.Nx 0.8 ,
185and was abandoned in favor
186of the more aptly-named
187.Nm .
188.Sh BUGS
189Compressed partitions are not supported.
190.Pp
191The use of the
192.Fl 9
193flag could result in damaged filesystems,
194albeit the damage is in part taken care of by
195procedures similar to the ones used in Win'95.
196