xref: /freebsd/sbin/mount_msdosfs/mount_msdosfs.8 (revision 93f4377caba08e4a47fb9f1878bf609bd4181564)
1a92aaa1aSJordan K. Hubbard.\"	$NetBSD: mount_msdos.8,v 1.13 1998/02/06 05:57:00 perry Exp $
25cb2bca1SDoug Rabson.\"
35cb2bca1SDoug Rabson.\" Copyright (c) 1993,1994 Christopher G. Demetriou
45cb2bca1SDoug Rabson.\" All rights reserved.
55cb2bca1SDoug Rabson.\"
65cb2bca1SDoug Rabson.\" Redistribution and use in source and binary forms, with or without
75cb2bca1SDoug Rabson.\" modification, are permitted provided that the following conditions
85cb2bca1SDoug Rabson.\" are met:
95cb2bca1SDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
105cb2bca1SDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
115cb2bca1SDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
125cb2bca1SDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
135cb2bca1SDoug Rabson.\"    documentation and/or other materials provided with the distribution.
145cb2bca1SDoug Rabson.\" 3. All advertising materials mentioning features or use of this software
15750f6fe3SPhilippe Charnier.\"    must display the following acknowledgment:
165cb2bca1SDoug Rabson.\"      This product includes software developed by Christopher G. Demetriou.
175cb2bca1SDoug Rabson.\" 3. The name of the author may not be used to endorse or promote products
185cb2bca1SDoug Rabson.\"    derived from this software without specific prior written permission
195cb2bca1SDoug Rabson.\"
205cb2bca1SDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
215cb2bca1SDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
225cb2bca1SDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
235cb2bca1SDoug Rabson.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
245cb2bca1SDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
255cb2bca1SDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
265cb2bca1SDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
275cb2bca1SDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
285cb2bca1SDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
295cb2bca1SDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
305cb2bca1SDoug Rabson.\"
3140373cf5SKonstantin Belousov.Dd May 28, 2017
324ccd7546SRuslan Ermilov.Dt MOUNT_MSDOSFS 8
33a92aaa1aSJordan K. Hubbard.Os
345cb2bca1SDoug Rabson.Sh NAME
354ccd7546SRuslan Ermilov.Nm mount_msdosfs
36*93f4377cSAlexander Ziaee.Nd mount an MS-DOS (FAT) file system
375cb2bca1SDoug Rabson.Sh SYNOPSIS
387c7fb079SRuslan Ermilov.Nm
398d646af5SRuslan Ermilov.Op Fl 9ls
408d646af5SRuslan Ermilov.Op Fl D Ar DOS_codepage
418d646af5SRuslan Ermilov.Op Fl g Ar gid
428d646af5SRuslan Ermilov.Op Fl L Ar locale
438d646af5SRuslan Ermilov.Op Fl M Ar mask
448d646af5SRuslan Ermilov.Op Fl m Ar mask
45a92aaa1aSJordan K. Hubbard.Op Fl o Ar options
465cb2bca1SDoug Rabson.Op Fl u Ar uid
4721831438SAndrey A. Chernov.Op Fl W Ar table
488d646af5SRuslan Ermilov.Ar special node
495cb2bca1SDoug Rabson.Sh DESCRIPTION
505cb2bca1SDoug RabsonThe
51a92aaa1aSJordan K. Hubbard.Nm
52e1205e80SPhilippe Charnierutility attaches the MS-DOS file system residing on
535cb2bca1SDoug Rabsonthe device
545cb2bca1SDoug Rabson.Pa special
555cb2bca1SDoug Rabsonto the global file system namespace at the location
565cb2bca1SDoug Rabsonindicated by
575cb2bca1SDoug Rabson.Pa node .
585cb2bca1SDoug RabsonThis command is normally executed by
595cb2bca1SDoug Rabson.Xr mount 8
605cb2bca1SDoug Rabsonat boot time, but can be used by any user to mount an
615cb2bca1SDoug RabsonMS-DOS file system on any directory that they own (provided,
625cb2bca1SDoug Rabsonof course, that they have appropriate access to the device that
635cb2bca1SDoug Rabsoncontains the file system).
645cb2bca1SDoug Rabson.Pp
655cb2bca1SDoug RabsonThe options are as follows:
665cb2bca1SDoug Rabson.Bl -tag -width Ds
67a92aaa1aSJordan K. Hubbard.It Fl o Ar options
68a92aaa1aSJordan K. HubbardUse the specified mount
69a92aaa1aSJordan K. Hubbard.Ar options ,
70a92aaa1aSJordan K. Hubbardas described in
71b6b3bf12SBruce M Simpson.Xr mount 8 .
72b6b3bf12SBruce M SimpsonThe following MSDOS file system-specific options are available:
73b6b3bf12SBruce M Simpson.Bl -tag -width indent
74b6b3bf12SBruce M Simpson.It Cm longnames
75b6b3bf12SBruce M SimpsonForce Windows 95 long filenames to be visible.
76b6b3bf12SBruce M Simpson.It Cm shortnames
77b6b3bf12SBruce M SimpsonForce only the old MS-DOS 8.3 style filenames to be visible.
78b6b3bf12SBruce M Simpson.It Cm nowin95
79b6b3bf12SBruce M SimpsonCompletely ignore Windows 95 extended file information.
80b6b3bf12SBruce M Simpson.El
81a92aaa1aSJordan K. Hubbard.It Fl u Ar uid
825cb2bca1SDoug RabsonSet the owner of the files in the file system to
835cb2bca1SDoug Rabson.Ar uid .
845cb2bca1SDoug RabsonThe default owner is the owner of the directory
855cb2bca1SDoug Rabsonon which the file system is being mounted.
86a92aaa1aSJordan K. Hubbard.It Fl g Ar gid
875cb2bca1SDoug RabsonSet the group of the files in the file system to
885cb2bca1SDoug Rabson.Ar gid .
895cb2bca1SDoug RabsonThe default group is the group of the directory
905cb2bca1SDoug Rabsonon which the file system is being mounted.
91a92aaa1aSJordan K. Hubbard.It Fl m Ar mask
925cb2bca1SDoug RabsonSpecify the maximum file permissions for files
935cb2bca1SDoug Rabsonin the file system.
94750f6fe3SPhilippe Charnier(For example, a
95750f6fe3SPhilippe Charnier.Ar mask
96750f6fe3SPhilippe Charnierof
975cb2bca1SDoug Rabson.Li 755
985cb2bca1SDoug Rabsonspecifies that, by default, the owner should have
995cb2bca1SDoug Rabsonread, write, and execute permissions for files, but
1005cb2bca1SDoug Rabsonothers should only have read and execute permissions.
1015cb2bca1SDoug RabsonSee
1025cb2bca1SDoug Rabson.Xr chmod 1
103c98a31caSTom Rhodesfor more information about octal file modes.
1045cb2bca1SDoug RabsonOnly the nine low-order bits of
1055cb2bca1SDoug Rabson.Ar mask
1065cb2bca1SDoug Rabsonare used.
107c98a31caSTom RhodesThe value of
108c98a31caSTom Rhodes.Ar -M
109c98a31caSTom Rhodesis used if it is supplied and
110c98a31caSTom Rhodes.Ar -m
111c98a31caSTom Rhodesis omitted.
112750f6fe3SPhilippe CharnierThe default
113750f6fe3SPhilippe Charnier.Ar mask
114750f6fe3SPhilippe Charnieris taken from the
1155cb2bca1SDoug Rabsondirectory on which the file system is being mounted.
116c98a31caSTom Rhodes.It Fl M Ar mask
117c98a31caSTom RhodesSpecify the maximum file permissions for directories
118c98a31caSTom Rhodesin the file system.
119c98a31caSTom RhodesThe value of
120c98a31caSTom Rhodes.Ar -m
121c98a31caSTom Rhodesis used if it is supplied and
122c98a31caSTom Rhodes.Ar -M
123c98a31caSTom Rhodesis omitted.
124c98a31caSTom RhodesSee the previous option's description for details.
125a92aaa1aSJordan K. Hubbard.It Fl s
126a92aaa1aSJordan K. HubbardForce behaviour to
127a92aaa1aSJordan K. Hubbardignore and not generate Win'95 long filenames.
128a92aaa1aSJordan K. Hubbard.It Fl l
129a92aaa1aSJordan K. HubbardForce listing and generation of
130a92aaa1aSJordan K. HubbardWin'95 long filenames
131a92aaa1aSJordan K. Hubbardand separate creation/modification/access dates.
132a92aaa1aSJordan K. Hubbard.Pp
133a92aaa1aSJordan K. HubbardIf neither
134a92aaa1aSJordan K. Hubbard.Fl s
135a92aaa1aSJordan K. Hubbardnor
136a92aaa1aSJordan K. Hubbard.Fl l
137a92aaa1aSJordan K. Hubbardare given,
138a92aaa1aSJordan K. Hubbard.Fl l
1390696afbeSAlan Somersis the default.
140a92aaa1aSJordan K. Hubbard.It Fl 9
141a92aaa1aSJordan K. HubbardIgnore the special Win'95 directory entries even
142ef8f7ac9SSheldon Hearnif deleting or renaming a file.
143ef8f7ac9SSheldon HearnThis forces
144a92aaa1aSJordan K. Hubbard.Fl s .
145a92aaa1aSJordan K. Hubbard.\".It Fl G
146a92aaa1aSJordan K. Hubbard.\"This option causes the file system to be interpreted as an Atari-Gemdos
147d04b5dfeSRuslan Ermilov.\"file system.
148d04b5dfeSRuslan Ermilov.\"The differences to the MS-DOS file system are minimal and
149d04b5dfeSRuslan Ermilov.\"limited to the boot block.
150d04b5dfeSRuslan Ermilov.\"This option enforces
151a92aaa1aSJordan K. Hubbard.\".Fl s .
15221831438SAndrey A. Chernov.It Fl L Ar locale
153c4f02a89SMax KhonSpecify locale name used for file name conversions
15421831438SAndrey A. Chernovfor DOS and Win'95 names.
15528847281SAndrey A. ChernovBy default ISO 8859-1 assumed as local character set.
1568d646af5SRuslan Ermilov.It Fl D Ar DOS_codepage
157c4f02a89SMax KhonSpecify the MS-DOS code page (aka IBM/OEM code page) name used for
158c4f02a89SMax Khonfile name conversions for DOS names.
15921831438SAndrey A. Chernov.It Fl W Ar table
160d04b5dfeSRuslan Ermilov.Bf Em
161d04b5dfeSRuslan ErmilovThis option is preserved for backward compatibility purpose only,
162d04b5dfeSRuslan Ermilovand will be removed in the future.
163d04b5dfeSRuslan ErmilovPlease avoid using this option.
164d04b5dfeSRuslan Ermilov.Ef
1659934eb16SAndrey A. Chernov.Pp
166d04b5dfeSRuslan ErmilovSpecify text file name with conversion table:
167d04b5dfeSRuslan Ermilov.Pa iso22dos , iso72dos , koi2dos , koi8u2dos .
1684e3e206eSAndrey A. Chernov.El
169c4f02a89SMax Khon.Sh EXAMPLES
170d04b5dfeSRuslan ErmilovTo mount a Russian MS-DOS file system located in
17105d98029SSergey Kandaurov.Pa /dev/ada1s1 :
172c4f02a89SMax Khon.Pp
17305d98029SSergey Kandaurov.Dl "mount_msdosfs -L ru_RU.KOI8-R -D CP866 /dev/ada1s1 /mnt"
174d04b5dfeSRuslan Ermilov.Pp
175d04b5dfeSRuslan ErmilovTo mount a Japanese MS-DOS file system located in
17605d98029SSergey Kandaurov.Pa /dev/ada1s1 :
177d04b5dfeSRuslan Ermilov.Pp
17805d98029SSergey Kandaurov.Dl "mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ada1s1 /mnt"
1795cb2bca1SDoug Rabson.Sh SEE ALSO
1805cb2bca1SDoug Rabson.Xr mount 2 ,
1815cb2bca1SDoug Rabson.Xr unmount 2 ,
1821a720cbeSAlexander Ziaee.Xr msdosfs 4 ,
183a92aaa1aSJordan K. Hubbard.Xr fstab 5 ,
184a92aaa1aSJordan K. Hubbard.Xr mount 8
185c4f02a89SMax Khon.Pp
186c4f02a89SMax KhonList of Localized MS Operating Systems:
187c4f02a89SMax Khon.Pa http://www.microsoft.com/globaldev/reference/oslocversion.mspx .
1885cb2bca1SDoug Rabson.Sh HISTORY
1898049a471SSevan JaniyanThe predecessor to
1908049a471SSevan Janiyan.Nm mount_msdos
1918049a471SSevan Janiyanutility named
1925cb2bca1SDoug Rabson.Nm mount_pcfs
1938049a471SSevan Janiyanappeared in
194a40dd3caSSevan Janiyan.Nx 0.8 .
1958049a471SSevan JaniyanIt was rewritten in
1968049a471SSevan Janiyan.Nx 1.0
1978049a471SSevan Janiyanand first appeared in
1988049a471SSevan Janiyan.Fx 2.0 .
1998049a471SSevan Janiyan.Nm mount_msdos
2008049a471SSevan Janiyanwas renamed to the more aptly-named
2018049a471SSevan Janiyan.Nm
2028049a471SSevan Janiyanin
2038049a471SSevan Janiyan.Fx 5.0 .
2048049a471SSevan JaniyanThe character code conversion routine was added in 2003.
2058049a471SSevan Janiyan.Sh AUTHORS
2068049a471SSevan JaniyanInitial implementation as
2078049a471SSevan Janiyan.Nm mount_pcfs
2088049a471SSevan Janiyanwas written by
2098049a471SSevan Janiyan.An -nosplit
2108049a471SSevan Janiyan.An Paul Popelka Aq Mt paulp@uts.amdahl.com .
2118049a471SSevan JaniyanIt was rewritten by
2128049a471SSevan Janiyan.An Christopher G. Demetriou Aq Mt cgd@NetBSD.org .
213c4f02a89SMax KhonThe character code conversion routine was added by
2148049a471SSevan Janiyan.An Ryuichiro Imura Aq Mt imura@ryu16.org .
2150afc94c1SUlrich Spörlein.Sh CAVEATS
2160afc94c1SUlrich SpörleinThe use of the
2170afc94c1SUlrich Spörlein.Fl 9
2180afc94c1SUlrich Spörleinflag could result in damaged file systems,
2190afc94c1SUlrich Spörleinalbeit the damage is in part taken care of by
2200afc94c1SUlrich Spörleinprocedures similar to the ones used in Win'95.
221