xref: /dragonfly/sbin/mount_msdos/mount_msdos.8 (revision 944cd60c)
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: src/sbin/mount_msdos/mount_msdos.8,v 1.19.2.1 2000/12/08 14:03:59 ru Exp $
32.\"
33.Dd September 10, 2019
34.Dt MOUNT_MSDOS 8
35.Os
36.Sh NAME
37.Nm mount_msdos
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 G
50.Pa special
51.Pa node
52.Sh DESCRIPTION
53The
54.Nm
55command attaches the MS-DOS filesystem residing on
56the device
57.Pa special
58to the global filesystem namespace at the location
59indicated by
60.Pa node .
61This command is normally executed by
62.Xr mount 8
63at boot time, but can be used by any user to mount an
64MS-DOS file system on any directory that they own (provided,
65of course, that they have appropriate access to the device that
66contains the file system).
67.Pp
68The options are as follows:
69.Bl -tag -width Ds
70.It Fl o Ar options
71Use the specified mount
72.Ar options ,
73as described in
74.Xr mount 8 ,
75or one of the MS-DOS filesystem-specific options
76.Ar shortnames ,
77.Ar longnames
78or
79.Ar nowin95 ,
80all of which can be used to affect Windows name translation in the
81underlying filesystem.
82.It Fl u Ar uid
83Set the owner of the files in the file system to
84.Ar uid .
85The default owner is the owner of the directory
86on which the file system is being mounted.
87.It Fl g Ar gid
88Set the group of the files in the file system to
89.Ar gid .
90The default group is the group of the directory
91on which the file system is being mounted.
92.It Fl m Ar mask
93Specify the maximum file permissions for files
94in the file system.
95(For example, a
96.Ar mask
97of
98.Li 755
99specifies that, by default, the owner should have
100read, write, and execute permissions for files, but
101others should only have read and execute permissions.
102See
103.Xr chmod 1
104for more information about octal file modes.)
105Only the nine low-order bits of
106.Ar mask
107are used.
108The value of
109.Ar -M
110is used if it is supplied and
111.Ar -m
112is omitted.
113The default
114.Ar mask
115is taken from the
116directory on which the file system is being mounted.
117.It Fl M Ar mask
118Specify the maximum file permissions for directories
119in the file system.
120The value of
121.Ar -m
122is used if it is supplied and
123.Ar -M
124is omitted.
125See the previous option's description for details.
126.It Fl s
127Force behaviour to
128ignore and not generate Win'95 long filenames.
129.It Fl l
130Force listing and generation of
131Win'95 long filenames
132and separate creation/modification/access dates.
133.Pp
134If neither
135.Fl s
136nor
137.Fl l
138are given,
139.Nm
140searches the root directory of the filesystem to
141be mounted for any existing Win'95 long filenames.
142If no such entries are found, but short DOS filenames are found,
143.Fl s
144is the default.
145Otherwise
146.Fl l
147is assumed.
148.It Fl 9
149Ignore the special Win'95 directory entries even
150if deleting or renaming a file.
151This forces
152.Fl s .
153.\".It Fl G
154.\"This option causes the filesystem to be interpreted as an Atari-Gemdos
155.\"filesystem. The differences to the MS-DOS filesystem are minimal and
156.\"limited to the boot block. This option enforces
157.\".Fl s .
158.It Fl L Ar locale
159Specify locale name used for internal uppercase and lowercase conversions
160for DOS and Win'95 names.
161By default ISO 8859-1 assumed as local character set.
162.It Fl D Ar DOS_codepage
163Specify the MS-DOS code page (aka IBM/OEM code page) name used for
164file name conversions for DOS names.
165.El
166.Sh SEE ALSO
167.Xr mount 2 ,
168.Xr unmount 2 ,
169.Xr fstab 5 ,
170.Xr mount 8
171.Sh HISTORY
172The predecessor to
173.Nm
174utility named
175.Nm mount_pcfs
176appeared in
177.Bx 386 .
178It was rewritten in
179.Nx 1.0
180and first appeared in
181.Fx 2.0 .
182.Sh AUTHORS
183Initial implementation as
184.Nm mount_pcfs
185was written by
186.An -nosplit
187.An Paul Popelka Aq Mt paulp@uts.amdahl.com .
188It was rewritten by
189.An Christopher G. Demetriou Aq Mt cgd@NetBSD.org .
190.Sh CAVEATS
191The use of the
192.Fl 9
193flag could result in damaged filesystems,
194albeit the damage is in part taken care of by
195procedures similar to the ones used in Win'95.
196.Pp
197.Fx 2.1
198and earlier versions could not handle cluster sizes larger than 16K.
199Just mounting an MS-DOS file system could cause corruption to any
200mounted file system.
201Cluster sizes larger than 16K are unavoidable for file system sizes
202larger than 1G, and also occur when filesystems larger than 1G are
203shrunk to smaller than 1G using FIPS.
204