xref: /freebsd/sbin/mount_msdosfs/mount_msdosfs.8 (revision 2357939bc239bd5334a169b62313806178dd8f30)
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. The differences to the MS-DOS file system are minimal and
161.\"limited to the boot block. This option enforces
162.\".Fl s .
163.It Fl L Ar locale
164Specify locale name used for file name conversions
165for DOS and Win'95 names.
166By default ISO 8859-1 assumed as local character set.
167.It Fl D Ar dos-codepage
168Specify the MS-DOS code page (aka IBM/OEM code page) name used for
169file name conversions for DOS names.
170.It Fl W Ar table
171This option is remained for backward compatibility purpose, and will be
172removed in the future. Please do not use this option.
173.Pp
174Specify text file name with conversion table: iso22dos, iso72dos, koi2dos,
175koi8u2dos.
176.El
177.Sh EXAMPLES
178To mount a Russian msdos file system located in /dev/ad1s1:
179.Bd -literal -offset indent
180# mount_msdosfs -L ru_RU.KOI8-R -D CP866 /dev/ad1s1 /mnt
181.Ed
182.Pp
183To mount a Japanese msdos file system located in /dev/ad1s1:
184.Bd -literal -offset indent
185# mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ad1s1 /mnt
186.Ed
187.Sh SEE ALSO
188.Xr mount 2 ,
189.Xr unmount 2 ,
190.Xr fstab 5 ,
191.Xr mount 8
192.Pp
193List of Localized MS Operating Systems:
194.Pa http://www.microsoft.com/globaldev/reference/oslocversion.mspx .
195.Sh CAVEATS
196The use of the
197.Fl 9
198flag could result in damaged file systems,
199albeit the damage is in part taken care of by
200procedures similar to the ones used in Win'95.
201.Pp
202.Fx 2.1
203and earlier versions could not handle cluster sizes larger than 16K.
204Just mounting an MS-DOS file system could cause corruption to any
205mounted file system.
206Cluster sizes larger than 16K are unavoidable for file system sizes
207larger than 1G, and also occur when file systems larger than 1G are
208shrunk to smaller than 1G using FIPS.
209.Sh HISTORY
210The
211.Nm
212utility first appeared in
213.Fx 2.0 .
214Its predecessor, the
215.Nm mount_pcfs
216utility appeared in
217.Fx 1.0 ,
218and was abandoned in favor
219of the more aptly-named
220.Nm .
221.Pp
222The character code conversion routine was added by
223.An Ryuichiro Imura Aq imura@ryu16.org
224at 2003.
225