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