xref: /freebsd/sbin/mount_msdosfs/mount_msdosfs.8 (revision 6b3455a7665208c366849f0b2b3bc916fb97516e)
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 D Ar dos-codepage
52.Op Fl W Ar table
53.Pa special
54.Pa node
55.Sh DESCRIPTION
56The
57.Nm
58utility attaches the MS-DOS file system residing on
59the device
60.Pa special
61to the global file system namespace at the location
62indicated by
63.Pa node .
64This command is normally executed by
65.Xr mount 8
66at boot time, but can be used by any user to mount an
67MS-DOS file system on any directory that they own (provided,
68of course, that they have appropriate access to the device that
69contains the file system).
70.Pp
71The options are as follows:
72.Bl -tag -width Ds
73.It Fl o Ar options
74Use the specified mount
75.Ar options ,
76as described in
77.Xr mount 8 .
78The following MSDOS file system-specific options are available:
79.Bl -tag -width indent
80.It Cm longnames
81Force Windows 95 long filenames to be visible.
82.It Cm shortnames
83Force only the old MS-DOS 8.3 style filenames to be visible.
84.It Cm nowin95
85Completely ignore Windows 95 extended file information.
86.El
87.It Fl u Ar uid
88Set the owner of the files in the file system to
89.Ar uid .
90The default owner is the owner of the directory
91on which the file system is being mounted.
92.It Fl g Ar gid
93Set the group of the files in the file system to
94.Ar gid .
95The default group is the group of the directory
96on which the file system is being mounted.
97.It Fl m Ar mask
98Specify the maximum file permissions for files
99in the file system.
100(For example, a
101.Ar mask
102of
103.Li 755
104specifies that, by default, the owner should have
105read, write, and execute permissions for files, but
106others should only have read and execute permissions.
107See
108.Xr chmod 1
109for more information about octal file modes.
110Only the nine low-order bits of
111.Ar mask
112are used.
113The value of
114.Ar -M
115is used if it is supplied and
116.Ar -m
117is omitted.
118The default
119.Ar mask
120is taken from the
121directory on which the file system is being mounted.
122.It Fl M Ar mask
123Specify the maximum file permissions for directories
124in the file system.
125The value of
126.Ar -m
127is used if it is supplied and
128.Ar -M
129is omitted.
130See the previous option's description for details.
131.It Fl s
132Force behaviour to
133ignore and not generate Win'95 long filenames.
134.It Fl l
135Force listing and generation of
136Win'95 long filenames
137and separate creation/modification/access dates.
138.Pp
139If neither
140.Fl s
141nor
142.Fl l
143are given,
144.Nm
145searches the root directory of the file system to
146be mounted for any existing Win'95 long filenames.
147If no such entries are found, but short DOS filenames are found,
148.Fl s
149is the default.
150Otherwise
151.Fl l
152is assumed.
153.It Fl 9
154Ignore the special Win'95 directory entries even
155if deleting or renaming a file.
156This forces
157.Fl s .
158.\".It Fl G
159.\"This option causes the file system to be interpreted as an Atari-Gemdos
160.\"file system.
161.\"The differences to the MS-DOS file system are minimal and
162.\"limited to the boot block.
163.\"This option enforces
164.\".Fl s .
165.It Fl L Ar locale
166Specify locale name used for file name conversions
167for DOS and Win'95 names.
168By default ISO 8859-1 assumed as local character set.
169.It Fl D Ar dos-codepage
170Specify the MS-DOS code page (aka IBM/OEM code page) name used for
171file name conversions for DOS names.
172.It Fl W Ar table
173.Bf Em
174This option is preserved for backward compatibility purpose only,
175and will be removed in the future.
176Please avoid using this option.
177.Ef
178.Pp
179Specify text file name with conversion table:
180.Pa iso22dos , iso72dos , koi2dos , koi8u2dos .
181.El
182.Sh EXAMPLES
183To mount a Russian MS-DOS file system located in
184.Pa /dev/ad1s1 :
185.Pp
186.Dl "mount_msdosfs -L ru_RU.KOI8-R -D CP866 /dev/ad1s1 /mnt"
187.Pp
188To mount a Japanese MS-DOS file system located in
189.Pa /dev/ad1s1 :
190.Pp
191.Dl "mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ad1s1 /mnt"
192.Sh SEE ALSO
193.Xr mount 2 ,
194.Xr unmount 2 ,
195.Xr fstab 5 ,
196.Xr mount 8
197.Pp
198List of Localized MS Operating Systems:
199.Pa http://www.microsoft.com/globaldev/reference/oslocversion.mspx .
200.Sh CAVEATS
201The use of the
202.Fl 9
203flag could result in damaged file systems,
204albeit the damage is in part taken care of by
205procedures similar to the ones used in Win'95.
206.Pp
207.Fx 2.1
208and earlier versions could not handle cluster sizes larger than 16K.
209Just mounting an MS-DOS file system could cause corruption to any
210mounted file system.
211Cluster sizes larger than 16K are unavoidable for file system sizes
212larger than 1G, and also occur when file systems larger than 1G are
213shrunk to smaller than 1G using FIPS.
214.Sh HISTORY
215The
216.Nm
217utility first appeared in
218.Fx 2.0 .
219Its predecessor, the
220.Nm mount_pcfs
221utility appeared in
222.Fx 1.0 ,
223and was abandoned in favor
224of the more aptly-named
225.Nm .
226.Pp
227The character code conversion routine was added by
228.An Ryuichiro Imura Aq imura@ryu16.org
229at 2003.
230