xref: /freebsd/sbin/mount_msdosfs/mount_msdosfs.8 (revision 7660b554bc59a07be0431c17e0e33815818baa69)
1.\"	$NetBSD: mount_msdos.8,v 1.13 1998/02/06 05:57:00 perry 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 acknowledgment:
16.\"      This product includes software developed by Christopher G. Demetriou.
17.\" 3. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.\" $FreeBSD$
32.\"
33.Dd April 7, 1994
34.Dt MOUNT_MSDOSFS 8
35.Os
36.Sh NAME
37.Nm mount_msdosfs
38.Nd mount an MS-DOS file system
39.Sh SYNOPSIS
40.Nm
41.Op Fl o Ar options
42.Op Fl u Ar uid
43.Op Fl g Ar gid
44.Op Fl m Ar mask
45.Op Fl M Ar mask
46.Op Fl s
47.Op Fl l
48.Op Fl 9
49.\".Op Fl G
50.Op Fl L Ar locale
51.Op Fl W Ar table
52.Pa special
53.Pa node
54.Sh DESCRIPTION
55The
56.Nm
57utility attaches the MS-DOS file system residing on
58the device
59.Pa special
60to the global file system namespace at the location
61indicated by
62.Pa node .
63This command is normally executed by
64.Xr mount 8
65at boot time, but can be used by any user to mount an
66MS-DOS file system on any directory that they own (provided,
67of course, that they have appropriate access to the device that
68contains the file system).
69.Pp
70The options are as follows:
71.Bl -tag -width Ds
72.It Fl o Ar options
73Use the specified mount
74.Ar options ,
75as described in
76.Xr mount 8 .
77The following MSDOS file system-specific options are available:
78.Bl -tag -width indent
79.It Cm longnames
80Force Windows 95 long filenames to be visible.
81.It Cm shortnames
82Force only the old MS-DOS 8.3 style filenames to be visible.
83.It Cm nowin95
84Completely ignore Windows 95 extended file information.
85.El
86.It Fl u Ar uid
87Set the owner of the files in the file system to
88.Ar uid .
89The default owner is the owner of the directory
90on which the file system is being mounted.
91.It Fl g Ar gid
92Set the group of the files in the file system to
93.Ar gid .
94The default group is the group of the directory
95on which the file system is being mounted.
96.It Fl m Ar mask
97Specify the maximum file permissions for files
98in the file system.
99(For example, a
100.Ar mask
101of
102.Li 755
103specifies that, by default, the owner should have
104read, write, and execute permissions for files, but
105others should only have read and execute permissions.
106See
107.Xr chmod 1
108for more information about octal file modes.
109Only the nine low-order bits of
110.Ar mask
111are used.
112The value of
113.Ar -M
114is used if it is supplied and
115.Ar -m
116is omitted.
117The default
118.Ar mask
119is taken from the
120directory on which the file system is being mounted.
121.It Fl M Ar mask
122Specify the maximum file permissions for directories
123in the file system.
124The value of
125.Ar -m
126is used if it is supplied and
127.Ar -M
128is omitted.
129See the previous option's description for details.
130.It Fl s
131Force behaviour to
132ignore and not generate Win'95 long filenames.
133.It Fl l
134Force listing and generation of
135Win'95 long filenames
136and separate creation/modification/access dates.
137.Pp
138If neither
139.Fl s
140nor
141.Fl l
142are given,
143.Nm
144searches the root directory of the file system to
145be mounted for any existing Win'95 long filenames.
146If no such entries are found, but short DOS filenames are found,
147.Fl s
148is the default.
149Otherwise
150.Fl l
151is assumed.
152.It Fl 9
153Ignore the special Win'95 directory entries even
154if deleting or renaming a file.
155This forces
156.Fl s .
157.\".It Fl G
158.\"This option causes the file system to be interpreted as an Atari-Gemdos
159.\"file system. The differences to the MS-DOS file system are minimal and
160.\"limited to the boot block. This option enforces
161.\".Fl s .
162.It Fl L Ar locale
163Specify locale name used for internal uppercase and lowercase conversions
164for DOS and Win'95 names.
165By default ISO 8859-1 assumed as local character set.
166.It Fl W Ar table
167Specify text file with 3 conversion tables:
168.Bl -enum
169.It
170Local character set to Unicode conversion table (upper half) for Win'95 long
171names, 128 Unicode codes separated by 8 per row.
172If some code not present in Unicode, use
1730x003F code ('?') as replacement.
174.It
175DOS to local character set conversion table (upper half) for DOS names,
176128 character codes separated by 8 per row.
177Code 0x3F ('?') used for impossible translations.
178.It
179Local character set to DOS conversion table (upper half) for DOS names,
180128 character codes separated by 8 per row.
181Some codes have special meaning:
182.Bl -hang
183.It 0x00
184character disallowed in DOS file name;
185.It 0x01
186character should be replaced by '_' in DOS file name;
187.It 0x02
188character should be skipped in DOS file name;
189.El
190.El
191.Pp
192By default ISO 8859-1 assumed as local character set.
193If file path isn't absolute,
194.Pa /usr/libdata/msdosfs/
195prefix prepended.
196.El
197.Sh FILES
198.Bl -tag -width /usr/libdata/msdosfs -compact
199.It Pa /usr/libdata/msdosfs
200default place for character sets conversion tables
201.El
202.Sh SEE ALSO
203.Xr mount 2 ,
204.Xr unmount 2 ,
205.Xr fstab 5 ,
206.Xr mount 8
207.Sh CAVEATS
208The use of the
209.Fl 9
210flag could result in damaged file systems,
211albeit the damage is in part taken care of by
212procedures similar to the ones used in Win'95.
213.Pp
214.Fx 2.1
215and earlier versions could not handle cluster sizes larger than 16K.
216Just mounting an MS-DOS file system could cause corruption to any
217mounted file system.
218Cluster sizes larger than 16K are unavoidable for file system sizes
219larger than 1G, and also occur when file systems larger than 1G are
220shrunk to smaller than 1G using FIPS.
221.Sh HISTORY
222The
223.Nm
224utility first appeared in
225.Fx 2.0 .
226Its predecessor, the
227.Nm mount_pcfs
228utility appeared in
229.Fx 1.0 ,
230and was abandoned in favor
231of the more aptly-named
232.Nm .
233