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