Fix markup. Fix backslashes to surive roff.
[netbsd-mini2440.git] / sbin / mount_msdos / mount_msdos.8
blob0980ddad709213a82073e56ab1081092e9c3a987
1 .\" $NetBSD: mount_msdos.8,v 1.32 2009/01/23 12:48:49 jmcneill 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 January 23, 2009
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
53 The
54 .Nm
55 command attaches the MS-DOS filesystem residing on
56 the device
57 .Pa special
58 to the global filesystem namespace at the location
59 indicated by
60 .Pa node .
61 Both
62 .Ar special
63 and
64 .Ar node
65 are converted to absolute paths before use.
66 This command is normally executed by
67 .Xr mount 8
68 at boot time, but can be used by any user to mount an
69 MS-DOS file system on any directory that they own (provided,
70 of course, that they have appropriate access to the device that
71 contains the file system).
72 .Pp
73 Support for FAT16 and VFAT32 as well as long file names is available.
74 .Pp
75 The options are as follows:
76 .Bl -tag -width XoXoptionsXX
77 .It Fl 9
78 Ignore the special Win'95 directory entries even
79 if deleting or renaming a file.
80 This forces
81 .Fl s .
82 .It Fl G
83 This option causes the filesystem to be interpreted as an Atari-Gemdos
84 filesystem.
85 The differences to the MSDOS filesystem are minimal and
86 limited to the boot block.
87 This option enforces
88 .Fl s .
89 .It Fl g Ar gid
90 Set the group of the files in the file system to
91 .Ar gid .
92 The default group is the group of the directory
93 on which the file system is being mounted.
94 .It Fl l
95 Force listing and generation of
96 Win'95 long filenames
97 and separate creation/modification/access dates.
98 .Pp
99 If neither
100 .Fl s
102 .Fl l
103 are given,
105 searches the root directory of the filesystem to
106 be mounted for any existing Win'95 long filenames.
107 If the filesystem is not empty and no such entries are found,
108 .Fl s
109 is the default.
110 Otherwise
111 .Fl l
112 is assumed.
113 .It Fl M Ar mask
114 Specify the maximum file permissions for directories
115 in the file system.
116 The value of
117 .Fl m
118 is used if it is supplied and
119 .Fl M
120 is omitted.
121 .It Fl m Ar mask
122 Specify the maximum file permissions for files
123 in the file system.
124 (For example, a mask of
125 .Li 755
126 specifies that, by default, the owner should have
127 read, write, and execute permissions for files, but
128 others should only have read and execute permissions.
130 .Xr chmod 1
131 for more information about octal file modes.)
132 Only the nine low-order bits of
133 .Ar mask
134 are used.
135 The value of
136 .Fl M
137 is used if it is supplied and
138 .Fl m
139 is omitted.
140 The default mask is taken from the
141 directory on which the file system is being mounted.
142 .It Fl o Ar options
143 Use the specified mount
144 .Ar options ,
145 as described in
146 .Xr mount 8 .
147 .It Fl s
148 Force behaviour to
149 ignore and not generate Win'95 long filenames.
150 See also
151 .Fl l .
152 .It Fl t Ar gmtoff
153 Set the time zone offset (in seconds) from UTC to
154 .Ar gmtoff ,
155 with positive values indicating east of the Prime Meridian.
156 If not set, the user's current time zone will be used.
157 .It Fl u Ar uid
158 Set the owner of the files in the file system to
159 .Ar uid .
160 The default owner is the owner of the directory
161 on which the file system is being mounted.
163 .Sh EXAMPLES
164 To remove the 'execute' permission bit for all files, but still keep
165 directories searchable, use:
166 .Bl -item -offset indent
168 mount_msdos -m 0644 -M 0755 /dev/wd0e /msdos
170 .Sh SEE ALSO
171 .Xr mount 2 ,
172 .Xr unmount 2 ,
173 .Xr fstab 5 ,
174 .Xr mount 8
175 .Sh HISTORY
178 utility first appeared in
179 .Nx 0.9 .
180 Its predecessor, the
181 .Ic mount_pcfs
182 utility appeared in
183 .Nx 0.8 ,
184 and was abandoned in favor
185 of the more aptly-named
186 .Nm .
187 .Sh BUGS
188 Compressed partitions are not supported.
190 The use of the
191 .Fl 9
192 flag could result in damaged filesystems,
193 albeit the damage is in part taken care of by
194 procedures similar to the ones used in Win'95.
196 The default handling for
197 .Fl s
199 .Fl l
200 will result in empty filesystems to be populated
201 with short filenames only.
202 To generate long filenames
203 on empty DOS filesystems use
204 .Fl l .