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.\" $Id: mount_msdos.8,v 1.15 1999/01/11 18:35:14 dt Exp $ 32.\" 33.Dd April 7, 1994 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 mount_msdos 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 s 46.Op Fl l 47.Op Fl 9 48.\".Op Fl G 49.Op Fl L Ar locale 50.Op Fl W Ar table 51.Pa special 52.Pa node 53.Sh DESCRIPTION 54The 55.Nm 56command attaches the MS-DOS filesystem residing on 57the device 58.Pa special 59to the global filesystem namespace at the location 60indicated by 61.Pa node . 62This command is normally executed by 63.Xr mount 8 64at boot time, but can be used by any user to mount an 65MS-DOS file system on any directory that they own (provided, 66of course, that they have appropriate access to the device that 67contains the file system). 68.Pp 69The options are as follows: 70.Bl -tag -width Ds 71.It Fl o Ar options 72Use the specified mount 73.Ar options , 74as described in 75.Xr mount 8 , 76or one of the MSDOS filesystem-specific options 77.Ar shortnames , 78.Ar longnames 79or 80.Ar nowin95 , 81all of which can be used to affect Windows name translation in the 82underlying filesystem. 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 default 110.Ar mask 111is taken from the 112directory on which the file system is being mounted. 113.It Fl s 114Force behaviour to 115ignore and not generate Win'95 long filenames. 116.It Fl l 117Force listing and generation of 118Win'95 long filenames 119and separate creation/modification/access dates. 120.Pp 121If neither 122.Fl s 123nor 124.Fl l 125are given, 126.Nm 127searches the root directory of the filesystem to 128be mounted for any existing Win'95 long filenames. 129If no such entries are found, but short DOS filenames are found, 130.Fl s 131is the default. Otherwise 132.Fl l 133is assumed. 134.It Fl 9 135Ignore the special Win'95 directory entries even 136if deleting or renaming a file. This forces 137.Fl s . 138.\".It Fl G 139.\"This option causes the filesystem to be interpreted as an Atari-Gemdos 140.\"filesystem. The differences to the MS-DOS filesystem are minimal and 141.\"limited to the boot block. This option enforces 142.\".Fl s . 143.It Fl L Ar locale 144Specify locale name used for internal uppercase and lowercase conversions 145for DOS and Win'95 names. 146By default ISO 8859-1 assumed as local character set. 147.It Fl W Ar table 148Specify text file with 3 conversion tables: 149.Bl -enum 150.It 151Local character set to Unicode conversion table (upper half) for Win'95 long 152names, 128 Unicode codes. 153If some code not present in Unicode, use 1540x003F code ('?') as replacement. 155.It 156DOS to local character set conversion table (upper half) for DOS names, 157128 character codes. Code 0x3F ('?') used for impossible translations. 158.It 159Local character set to DOS conversion table (upper half) for DOS names, 160128 character codes. Some codes have special meaning: 161.Bl -hang 162.It 0x00 163character disallowed in DOS file name; 164.It 0x01 165character should be replaced by '_' in DOS file name; 166.It 0x02 167character should be skipped in DOS file name; 168.El 169.El 170.Pp 171By default ISO 8859-1 assumed as local character set. 172If file path isn't absolute, 173.Pa /usr/libdata/msdosfs/ 174prefix prepended. 175.El 176.Sh FILES 177.Bl -tag -width /usr/libdata/msdosfs -compact 178.It Pa /usr/libdata/msdosfs 179default place for character sets conversion tables 180.El 181.Sh SEE ALSO 182.Xr mount 2 , 183.Xr unmount 2 , 184.Xr fstab 5 , 185.Xr mount 8 186.Sh CAVEATS 187The use of the 188.Fl 9 189flag could result in damaged filesystems, 190albeit the damage is in part taken care of by 191procedures similar to the ones used in Win'95. 192.Pp 193.Fx 2.1 194and earlier versions could not handle cluster sizes larger than 16K. 195Just mounting an MS-DOS file system could cause corruption to any 196mounted file system. 197Cluster sizes larger than 16K are unavoidable for file system sizes 198larger than 1G, and also occur when filesystems larger than 1G are 199shrunk to smaller than 1G using FIPS. 200.Sh HISTORY 201The 202.Nm 203utility first appeared in 204.Fx 2.0 . 205Its predecessor, the 206.Nm mount_pcfs 207utility appeared in 208.Fx 1.0 , 209and was abandoned in favor 210of the more aptly-named 211.Nm Ns . 212