1.\" $NetBSD: mount_msdos.8,v 1.33 2009/01/24 10:45:44 wiz 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 acknowledgement: 16.\" This product includes software developed for the 17.\" NetBSD Project. See http://www.NetBSD.org/ for 18.\" information about NetBSD. 19.\" 4. The name of the author may not be used to endorse or promote products 20.\" derived from this software without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32.\" 33.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 34.\" 35.Dd January 23, 2009 36.Dt MOUNT_MSDOS 8 37.Os 38.Sh NAME 39.Nm mount_msdos 40.Nd mount an MS-DOS file system 41.Sh SYNOPSIS 42.Nm 43.Op Fl 9Gls 44.Op Fl g Ar gid 45.Op Fl M Ar mask 46.Op Fl m Ar mask 47.Op Fl o Ar options 48.Op Fl t Ar gmtoff 49.Op Fl u Ar uid 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 . 61Both 62.Ar special 63and 64.Ar node 65are converted to absolute paths before use. 66This command is normally executed by 67.Xr mount 8 68at boot time, but can be used by any user to mount an 69MS-DOS file system on any directory that they own (provided, 70of course, that they have appropriate access to the device that 71contains the file system). 72.Pp 73Support for FAT16 and VFAT32 as well as long file names is available. 74.Pp 75The options are as follows: 76.Bl -tag -width XoXoptionsXX 77.It Fl 9 78Ignore the special Win'95 directory entries even 79if deleting or renaming a file. 80This forces 81.Fl s . 82.It Fl G 83This option causes the filesystem to be interpreted as an Atari-Gemdos 84filesystem. 85The differences to the MSDOS filesystem are minimal and 86limited to the boot block. 87This option enforces 88.Fl s . 89.It Fl g Ar gid 90Set the group of the files in the file system to 91.Ar gid . 92The default group is the group of the directory 93on which the file system is being mounted. 94.It Fl l 95Force listing and generation of 96Win'95 long filenames 97and separate creation/modification/access dates. 98.Pp 99If neither 100.Fl s 101nor 102.Fl l 103are given, 104.Nm 105searches the root directory of the filesystem to 106be mounted for any existing Win'95 long filenames. 107If the filesystem is not empty and no such entries are found, 108.Fl s 109is the default. 110Otherwise 111.Fl l 112is assumed. 113.It Fl M Ar mask 114Specify the maximum file permissions for directories 115in the file system. 116The value of 117.Fl m 118is used if it is supplied and 119.Fl M 120is omitted. 121.It Fl m Ar mask 122Specify the maximum file permissions for files 123in the file system. 124(For example, a mask of 125.Li 755 126specifies that, by default, the owner should have 127read, write, and execute permissions for files, but 128others should only have read and execute permissions. 129See 130.Xr chmod 1 131for more information about octal file modes.) 132Only the nine low-order bits of 133.Ar mask 134are used. 135The value of 136.Fl M 137is used if it is supplied and 138.Fl m 139is omitted. 140The default mask is taken from the 141directory on which the file system is being mounted. 142.It Fl o Ar options 143Use the specified mount 144.Ar options , 145as described in 146.Xr mount 8 . 147.It Fl s 148Force behaviour to 149ignore and not generate Win'95 long filenames. 150See also 151.Fl l . 152.It Fl t Ar gmtoff 153Set the time zone offset (in seconds) from UTC to 154.Ar gmtoff , 155with positive values indicating east of the Prime Meridian. 156If not set, the user's current time zone will be used. 157.It Fl u Ar uid 158Set the owner of the files in the file system to 159.Ar uid . 160The default owner is the owner of the directory 161on which the file system is being mounted. 162.El 163.Sh EXAMPLES 164To remove the 'execute' permission bit for all files, but still keep 165directories searchable, use: 166.Bl -item -offset indent 167.It 168mount_msdos -m 0644 -M 0755 /dev/wd0e /msdos 169.El 170.Sh SEE ALSO 171.Xr mount 2 , 172.Xr unmount 2 , 173.Xr fstab 5 , 174.Xr mount 8 175.Sh HISTORY 176The 177.Nm 178utility first appeared in 179.Nx 0.9 . 180Its predecessor, the 181.Ic mount_pcfs 182utility appeared in 183.Nx 0.8 , 184and was abandoned in favor 185of the more aptly-named 186.Nm . 187.Sh BUGS 188Compressed partitions are not supported. 189.Pp 190The use of the 191.Fl 9 192flag could result in damaged filesystems, 193albeit the damage is in part taken care of by 194procedures similar to the ones used in Win'95. 195.Pp 196The default handling for 197.Fl s 198and 199.Fl l 200will result in empty filesystems to be populated 201with short filenames only. 202To generate long filenames 203on empty DOS filesystems use 204.Fl l . 205