xref: /aosp_15_r20/external/mtools/mtools.info (revision d5c9a868b113e0ec0db2f27bc2ce8a253e77c4b0)
1*d5c9a868SElliott HughesThis is mtools.info, produced by makeinfo version 6.7 from mtools.texi.
2*d5c9a868SElliott Hughes
3*d5c9a868SElliott HughesThis manual is for Mtools (version 4.0.37, January 2022), which is a
4*d5c9a868SElliott Hughescollection of tools to allow Unix systems to manipulate MS-DOS files.
5*d5c9a868SElliott Hughes
6*d5c9a868SElliott Hughes   Copyright (C) 2007, 2009 Free Software Foundation, Inc.  Copyright
7*d5c9a868SElliott Hughes(C) 1996-2005,2007-2011,2013 Alain Knaff.
8*d5c9a868SElliott Hughes
9*d5c9a868SElliott Hughes     Permission is granted to copy, distribute and/or modify this
10*d5c9a868SElliott Hughes     document under the terms of the GNU Free Documentation License,
11*d5c9a868SElliott Hughes     Version 1.3 or any later version published by the Free Software
12*d5c9a868SElliott Hughes     Foundation; with no Invariant Sections, with no Front-Cover Texts,
13*d5c9a868SElliott Hughes     and with no Back-Cover Texts.  A copy of the license is included in
14*d5c9a868SElliott Hughes     the section entitled "GNU Free Documentation License".
15*d5c9a868SElliott HughesINFO-DIR-SECTION DOS
16*d5c9a868SElliott HughesSTART-INFO-DIR-ENTRY
17*d5c9a868SElliott Hughes* Mtools: (mtools).        Mtools: utilities to access DOS disks in Unix.
18*d5c9a868SElliott HughesEND-INFO-DIR-ENTRY
19*d5c9a868SElliott Hughes
20*d5c9a868SElliott Hughes
21*d5c9a868SElliott HughesFile: mtools.info,  Node: Top,  Next: Location,  Prev: (dir),  Up: (dir)
22*d5c9a868SElliott Hughes
23*d5c9a868SElliott HughesMtools doc
24*d5c9a868SElliott Hughes**********
25*d5c9a868SElliott Hughes
26*d5c9a868SElliott HughesThis is mtools' documentation.
27*d5c9a868SElliott Hughes
28*d5c9a868SElliott Hughes* Menu:
29*d5c9a868SElliott Hughes
30*d5c9a868SElliott Hughes* Location::
31*d5c9a868SElliott Hughes* Common features::
32*d5c9a868SElliott Hughes* Configuration::
33*d5c9a868SElliott Hughes* Commands::
34*d5c9a868SElliott Hughes* Compiling mtools::
35*d5c9a868SElliott Hughes* Porting mtools::
36*d5c9a868SElliott Hughes* Command Index::
37*d5c9a868SElliott Hughes* Variable Index::
38*d5c9a868SElliott Hughes* Concept Index::
39*d5c9a868SElliott Hughes
40*d5c9a868SElliott HughesIntroduction
41*d5c9a868SElliott Hughes************
42*d5c9a868SElliott Hughes
43*d5c9a868SElliott HughesMtools is a collection of tools to allow Unix systems to manipulate
44*d5c9a868SElliott HughesMS-DOS files: read, write, and move around files on an MS-DOS file
45*d5c9a868SElliott Hughessystem (typically a floppy disk).  Where reasonable, each program
46*d5c9a868SElliott Hughesattempts to emulate the MS-DOS equivalent command.  However, unnecessary
47*d5c9a868SElliott Hughesrestrictions and oddities of DOS are not emulated.  For instance, it is
48*d5c9a868SElliott Hughespossible to move subdirectories from one subdirectory to another.
49*d5c9a868SElliott Hughes
50*d5c9a868SElliott Hughes   Mtools is sufficient to give access to MS-DOS file systems.  For
51*d5c9a868SElliott Hughesinstance, commands such as 'mdir a:' work on the 'a:' floppy without any
52*d5c9a868SElliott Hughespreliminary mounting or initialization (assuming the default
53*d5c9a868SElliott Hughes'/etc/mtools.conf' works on your machine).  With mtools, one can change
54*d5c9a868SElliott Hughesfloppies too without unmounting and mounting.
55*d5c9a868SElliott Hughes
56*d5c9a868SElliott Hughes   This manual is for Mtools (version 4.0.37, January 2022), which is a
57*d5c9a868SElliott Hughescollection of tools to allow Unix systems to manipulate MS-DOS files.
58*d5c9a868SElliott Hughes
59*d5c9a868SElliott Hughes   Copyright (C) 2007, 2009 Free Software Foundation, Inc.  Copyright
60*d5c9a868SElliott Hughes(C) 1996-2005,2007-2011,2013 Alain Knaff.
61*d5c9a868SElliott Hughes
62*d5c9a868SElliott Hughes     Permission is granted to copy, distribute and/or modify this
63*d5c9a868SElliott Hughes     document under the terms of the GNU Free Documentation License,
64*d5c9a868SElliott Hughes     Version 1.3 or any later version published by the Free Software
65*d5c9a868SElliott Hughes     Foundation; with no Invariant Sections, with no Front-Cover Texts,
66*d5c9a868SElliott Hughes     and with no Back-Cover Texts.  A copy of the license is included in
67*d5c9a868SElliott Hughes     the section entitled "GNU Free Documentation License".
68*d5c9a868SElliott Hughes
69*d5c9a868SElliott Hughes* Menu:
70*d5c9a868SElliott Hughes
71*d5c9a868SElliott Hughes* Location::          Where to find mtools and early bug fixes
72*d5c9a868SElliott Hughes* Common features::   Common features of all mtools commands
73*d5c9a868SElliott Hughes* Configuration::     How to configure mtools for your environment
74*d5c9a868SElliott Hughes* Commands::          The available mtools commands
75*d5c9a868SElliott Hughes* Compiling mtools::  Architecture specific compilation flags
76*d5c9a868SElliott Hughes* Porting mtools::    Porting mtools to architectures which are not
77*d5c9a868SElliott Hughes                      yet supported
78*d5c9a868SElliott Hughes
79*d5c9a868SElliott Hughes* Command Index::     Command Index
80*d5c9a868SElliott Hughes* Variable Index::    Variable Index
81*d5c9a868SElliott Hughes* Concept Index::     Concept Index
82*d5c9a868SElliott Hughes
83*d5c9a868SElliott Hughes
84*d5c9a868SElliott HughesFile: mtools.info,  Node: Location,  Next: Common features,  Prev: Top,  Up: Top
85*d5c9a868SElliott Hughes
86*d5c9a868SElliott Hughes1 Where to get mtools
87*d5c9a868SElliott Hughes*********************
88*d5c9a868SElliott Hughes
89*d5c9a868SElliott HughesMtools can be found at the following places (and their mirrors):
90*d5c9a868SElliott Hughes     http://ftp.gnu.org/gnu/mtools/mtools-4.0.37.tar.gz
91*d5c9a868SElliott Hughes
92*d5c9a868SElliott Hughes   These patches are named 'mtools-'VERSION'-'DDMM'.taz', where version
93*d5c9a868SElliott Hughesstands for the base version, DD for the day and MM for the month.  Due
94*d5c9a868SElliott Hughesto a lack of space, I usually leave only the most recent patch.
95*d5c9a868SElliott Hughes
96*d5c9a868SElliott Hughes   There is an mtools mailing list at info-mtools @ gnu.org .  Please
97*d5c9a868SElliott Hughessend all bug reports to this list.  You may subscribe to the list at
98*d5c9a868SElliott Hugheshttps://lists.gnu.org/mailman/listinfo/info-mtools.  (N.B. Please remove
99*d5c9a868SElliott Hughesthe spaces around the "@".  I left them there in order to fool
100*d5c9a868SElliott Hughesspambots.)  Announcements of new mtools versions will also be sent to
101*d5c9a868SElliott Hughesthe list, in addition to the Linux announce newsgroups.  The mailing
102*d5c9a868SElliott Hugheslist is archived at http://lists.gnu.org/pipermail/info-mtools/
103*d5c9a868SElliott Hughes
104*d5c9a868SElliott Hughes
105*d5c9a868SElliott HughesFile: mtools.info,  Node: Common features,  Next: Configuration,  Prev: Location,  Up: Top
106*d5c9a868SElliott Hughes
107*d5c9a868SElliott Hughes2 Common features of all mtools commands
108*d5c9a868SElliott Hughes****************************************
109*d5c9a868SElliott Hughes
110*d5c9a868SElliott Hughes* Menu:
111*d5c9a868SElliott Hughes
112*d5c9a868SElliott Hughes* arguments::              What the command line parameters of mtools
113*d5c9a868SElliott Hughes                           mean
114*d5c9a868SElliott Hughes* drive letters::          Which drives are defined by default
115*d5c9a868SElliott Hughes* directory::              Current working directory
116*d5c9a868SElliott Hughes* long names::             VFAT-style long filenames
117*d5c9a868SElliott Hughes* name clashes::           Name clash handling, and associated command
118*d5c9a868SElliott Hughes                           line options
119*d5c9a868SElliott Hughes* case sensitivity::       Case sensitivity
120*d5c9a868SElliott Hughes* high capacity formats::  How to fit more data on your floppies
121*d5c9a868SElliott Hughes* exit codes::             Exit codes
122*d5c9a868SElliott Hughes* bugs::                   Happens to everybody
123*d5c9a868SElliott Hughes
124*d5c9a868SElliott Hughes
125*d5c9a868SElliott HughesFile: mtools.info,  Node: arguments,  Next: drive letters,  Prev: Common features,  Up: Common features
126*d5c9a868SElliott Hughes
127*d5c9a868SElliott Hughes2.1 Options and filenames
128*d5c9a868SElliott Hughes=========================
129*d5c9a868SElliott Hughes
130*d5c9a868SElliott HughesMS-DOS filenames are composed of a drive letter followed by a colon, a
131*d5c9a868SElliott Hughessubdirectory, and a filename.  Only the filename part is mandatory, the
132*d5c9a868SElliott Hughesdrive letter and the subdirectory are optional.  Filenames without a
133*d5c9a868SElliott Hughesdrive letter refer to Unix files.  Subdirectory names can use either the
134*d5c9a868SElliott Hughes''/'' or ''\'' separator.  The use of the ''\'' separator or wildcards
135*d5c9a868SElliott Hughesrequires the names to be enclosed in quotes to protect them from the
136*d5c9a868SElliott Hughesshell.  However, wildcards in Unix filenames should not be enclosed in
137*d5c9a868SElliott Hughesquotes, because here we *want* the shell to expand them.
138*d5c9a868SElliott Hughes
139*d5c9a868SElliott Hughes   The regular expression "pattern matching" routines follow the
140*d5c9a868SElliott HughesUnix-style rules.  For example, ''*'' matches all MS-DOS files in lieu
141*d5c9a868SElliott Hughesof ''*.*''.  The archive, hidden, read-only and system attribute bits
142*d5c9a868SElliott Hughesare ignored during pattern matching.
143*d5c9a868SElliott Hughes
144*d5c9a868SElliott Hughes   All options use the '-' (minus) as their first character, not '/' as
145*d5c9a868SElliott Hughesyou'd expect in MS-DOS.
146*d5c9a868SElliott Hughes
147*d5c9a868SElliott Hughes   Most mtools commands allow multiple filename parameters, which
148*d5c9a868SElliott Hughesdoesn't follow MS-DOS conventions, but which is more user-friendly.
149*d5c9a868SElliott Hughes
150*d5c9a868SElliott Hughes   Most mtools commands allow options that instruct them how to handle
151*d5c9a868SElliott Hughesfile name clashes.  *Note name clashes::, for more details on these.
152*d5c9a868SElliott Hughes
153*d5c9a868SElliott Hughes   All commands accept the '-i' flag which allows to specify an image
154*d5c9a868SElliott Hughesfile (*Note drive letters::).
155*d5c9a868SElliott Hughes
156*d5c9a868SElliott Hughes   All commands accept the '-V' flag which prints the version, and most
157*d5c9a868SElliott Hughesaccept the '-v' flag, which switches on verbose mode.  In verbose mode,
158*d5c9a868SElliott Hughesthese commands print out the name of the MS-DOS files upon which they
159*d5c9a868SElliott Hughesact, unless stated otherwise.  *Note Commands::, for a description of
160*d5c9a868SElliott Hughesthe options which are specific to each command.
161*d5c9a868SElliott Hughes
162*d5c9a868SElliott Hughes
163*d5c9a868SElliott HughesFile: mtools.info,  Node: drive letters,  Next: directory,  Prev: arguments,  Up: Common features
164*d5c9a868SElliott Hughes
165*d5c9a868SElliott Hughes2.2 Drive letters
166*d5c9a868SElliott Hughes=================
167*d5c9a868SElliott Hughes
168*d5c9a868SElliott HughesThe meaning of the drive letters depends on the target architectures.
169*d5c9a868SElliott HughesHowever, on most target architectures, drive A is the first floppy
170*d5c9a868SElliott Hughesdrive, drive B is the second floppy drive (if available), drive J is a
171*d5c9a868SElliott HughesJaz drive (if available), and drive Z is a Zip drive (if available).  On
172*d5c9a868SElliott Hughesthose systems where the device name is derived from the SCSI id, the Jaz
173*d5c9a868SElliott Hughesdrive is assumed to be at SCSI target 4, and the Zip at SCSI target 5
174*d5c9a868SElliott Hughes(factory default settings).  On Linux, both drives are assumed to be the
175*d5c9a868SElliott Hughessecond drive on the SCSI bus (/dev/sdb).  The default settings can be
176*d5c9a868SElliott Hugheschanges using a configuration file (*note Configuration::).
177*d5c9a868SElliott Hughes
178*d5c9a868SElliott Hughes   The drive letter : (colon) has a special meaning.  It is used to
179*d5c9a868SElliott Hughesaccess image files which are directly specified on the command line
180*d5c9a868SElliott Hughesusing the '-i' options.
181*d5c9a868SElliott Hughes
182*d5c9a868SElliott Hughes   Example:
183*d5c9a868SElliott Hughes      mcopy -i my-image-file.bin ::file1 ::file2 .
184*d5c9a868SElliott Hughes
185*d5c9a868SElliott Hughes   This copies 'file1' and 'file2' from the image file
186*d5c9a868SElliott Hughes('my-image-file.bin') to the '/tmp' directory.
187*d5c9a868SElliott Hughes
188*d5c9a868SElliott Hughes   You can also supply an offset within the image file by including
189*d5c9a868SElliott Hughes'@@'OFFSET into the file name.
190*d5c9a868SElliott Hughes
191*d5c9a868SElliott Hughes   Example:
192*d5c9a868SElliott Hughes      mcopy -i my-image-file.bin@@1M ::file1 ::file2 .
193*d5c9a868SElliott Hughes
194*d5c9a868SElliott Hughes   This looks for the image at the offset of 1M in the file, rather than
195*d5c9a868SElliott Hughesat its beginning.
196*d5c9a868SElliott Hughes
197*d5c9a868SElliott Hughes
198*d5c9a868SElliott HughesFile: mtools.info,  Node: directory,  Next: long names,  Prev: drive letters,  Up: Common features
199*d5c9a868SElliott Hughes
200*d5c9a868SElliott Hughes2.3 Current working directory
201*d5c9a868SElliott Hughes=============================
202*d5c9a868SElliott Hughes
203*d5c9a868SElliott HughesThe 'mcd' command (*note mcd::) is used to establish the device and the
204*d5c9a868SElliott Hughescurrent working directory (relative to the MS-DOS file system),
205*d5c9a868SElliott Hughesotherwise the default is assumed to be 'A:/'.  However, unlike MS-DOS,
206*d5c9a868SElliott Hughesthere is only one working directory for all drives, and not one per
207*d5c9a868SElliott Hughesdrive.
208*d5c9a868SElliott Hughes
209*d5c9a868SElliott Hughes
210*d5c9a868SElliott HughesFile: mtools.info,  Node: long names,  Next: name clashes,  Prev: directory,  Up: Common features
211*d5c9a868SElliott Hughes
212*d5c9a868SElliott Hughes2.4 VFAT-style long file names
213*d5c9a868SElliott Hughes==============================
214*d5c9a868SElliott Hughes
215*d5c9a868SElliott HughesThis version of mtools supports VFAT style long filenames.  If a Unix
216*d5c9a868SElliott Hughesfilename is too long to fit in a short DOS name, it is stored as a VFAT
217*d5c9a868SElliott Hugheslong name, and a companion short name is generated.  This short name is
218*d5c9a868SElliott Hugheswhat you see when you examine the disk with a pre-7.0 version of DOS.
219*d5c9a868SElliott HughesThe following table shows some examples of short names:
220*d5c9a868SElliott Hughes
221*d5c9a868SElliott Hughes     Long name       MS-DOS name     Reason for the change
222*d5c9a868SElliott Hughes     ---------       ----------      ---------------------
223*d5c9a868SElliott Hughes     thisisatest     THISIS~1        filename too long
224*d5c9a868SElliott Hughes     alain.knaff     ALAIN~1.KNA     extension too long
225*d5c9a868SElliott Hughes     prn.txt         PRN~1.TXT       PRN is a device name
226*d5c9a868SElliott Hughes     .abc            ABC~1           null filename
227*d5c9a868SElliott Hughes     hot+cold        HOT_CO~1        illegal character
228*d5c9a868SElliott Hughes
229*d5c9a868SElliott Hughes   As you see, the following transformations happen to derive a short
230*d5c9a868SElliott Hughesname:
231*d5c9a868SElliott Hughes   * Illegal characters are replaced by underscores.  The illegal
232*d5c9a868SElliott Hughes     characters are ';+=[]',\"*\\<>/?:|'.
233*d5c9a868SElliott Hughes   * Extra dots, which cannot be interpreted as a main name/extension
234*d5c9a868SElliott Hughes     separator are removed
235*d5c9a868SElliott Hughes   * A '~'N number is generated,
236*d5c9a868SElliott Hughes   * The name is shortened so as to fit in the 8+3 limitation
237*d5c9a868SElliott Hughes
238*d5c9a868SElliott Hughes   The initial Unix-style file name (whether long or short) is also
239*d5c9a868SElliott Hughescalled the "primary" name, and the derived short name is also called the
240*d5c9a868SElliott Hughes"secondary" name.
241*d5c9a868SElliott Hughes
242*d5c9a868SElliott Hughes   Example:
243*d5c9a868SElliott Hughes      mcopy /etc/motd a:Reallylongname
244*d5c9a868SElliott Hughes   Mtools creates a VFAT entry for Reallylongname, and uses REALLYLO as
245*d5c9a868SElliott Hughesa short name.  Reallylongname is the primary name, and REALLYLO is the
246*d5c9a868SElliott Hughessecondary name.
247*d5c9a868SElliott Hughes      mcopy /etc/motd a:motd
248*d5c9a868SElliott Hughes   Motd fits into the DOS filename limits.  Mtools doesn't need to
249*d5c9a868SElliott Hughesderivate another name.  Motd is the primary name, and there is no
250*d5c9a868SElliott Hughessecondary name.
251*d5c9a868SElliott Hughes
252*d5c9a868SElliott Hughes   In a nutshell: The primary name is the long name, if one exists, or
253*d5c9a868SElliott Hughesthe short name if there is no long name.
254*d5c9a868SElliott Hughes
255*d5c9a868SElliott Hughes   Although VFAT is much more flexible than FAT, there are still names
256*d5c9a868SElliott Hughesthat are not acceptable, even in VFAT. There are still some illegal
257*d5c9a868SElliott Hughescharacters left ('\"*\\<>/?:|'), and device names are still reserved.
258*d5c9a868SElliott Hughes
259*d5c9a868SElliott Hughes     Unix name       Long name       Reason for the change
260*d5c9a868SElliott Hughes     ---------       ----------      ---------------------
261*d5c9a868SElliott Hughes     prn             prn-1           PRN is a device name
262*d5c9a868SElliott Hughes     ab:c            ab_c-1          illegal character
263*d5c9a868SElliott Hughes
264*d5c9a868SElliott Hughes   As you see, the following transformations happen if a long name is
265*d5c9a868SElliott Hughesillegal:
266*d5c9a868SElliott Hughes   * Illegal characters are replaces by underscores,
267*d5c9a868SElliott Hughes   * A '-'N number is generated,
268*d5c9a868SElliott Hughes
269*d5c9a868SElliott Hughes
270*d5c9a868SElliott HughesFile: mtools.info,  Node: name clashes,  Next: case sensitivity,  Prev: long names,  Up: Common features
271*d5c9a868SElliott Hughes
272*d5c9a868SElliott Hughes2.5 Name clashes
273*d5c9a868SElliott Hughes================
274*d5c9a868SElliott Hughes
275*d5c9a868SElliott HughesWhen writing a file to disk, its long name or short name may collide
276*d5c9a868SElliott Hugheswith an already existing file or directory.  This may happen for all
277*d5c9a868SElliott Hughescommands which create new directory entries, such as 'mcopy', 'mmd',
278*d5c9a868SElliott Hughes'mren', 'mmove'.  When a name clash happens, mtools asks you what it
279*d5c9a868SElliott Hughesshould do.  It offers several choices:
280*d5c9a868SElliott Hughes
281*d5c9a868SElliott Hughes'overwrite'
282*d5c9a868SElliott Hughes     Overwrites the existing file.  It is not possible to overwrite a
283*d5c9a868SElliott Hughes     directory with a file.
284*d5c9a868SElliott Hughes'rename'
285*d5c9a868SElliott Hughes     Renames the newly created file.  Mtools prompts for the new
286*d5c9a868SElliott Hughes     filename
287*d5c9a868SElliott Hughes'autorename'
288*d5c9a868SElliott Hughes     Renames the newly created file.  Mtools chooses a name by itself,
289*d5c9a868SElliott Hughes     without prompting
290*d5c9a868SElliott Hughes'skip'
291*d5c9a868SElliott Hughes     Gives up on this file, and moves on to the next (if any)
292*d5c9a868SElliott Hughes
293*d5c9a868SElliott Hughes   To chose one of these actions, type its first letter at the prompt.
294*d5c9a868SElliott HughesIf you use a lower case letter, the action only applies for this file
295*d5c9a868SElliott Hughesonly, if you use an upper case letter, the action applies to all files,
296*d5c9a868SElliott Hughesand you won't be prompted again.
297*d5c9a868SElliott Hughes
298*d5c9a868SElliott Hughes   You may also chose actions (for all files) on the command line, when
299*d5c9a868SElliott Hughesinvoking mtools:
300*d5c9a868SElliott Hughes
301*d5c9a868SElliott Hughes'-D o'
302*d5c9a868SElliott Hughes     Overwrites primary names by default.
303*d5c9a868SElliott Hughes'-D O'
304*d5c9a868SElliott Hughes     Overwrites secondary names by default.
305*d5c9a868SElliott Hughes'-D r'
306*d5c9a868SElliott Hughes     Renames primary name by default.
307*d5c9a868SElliott Hughes'-D R'
308*d5c9a868SElliott Hughes     Renames secondary name by default.
309*d5c9a868SElliott Hughes'-D a'
310*d5c9a868SElliott Hughes     Autorenames primary name by default.
311*d5c9a868SElliott Hughes'-D A'
312*d5c9a868SElliott Hughes     Autorenames secondary name by default.
313*d5c9a868SElliott Hughes'-D s'
314*d5c9a868SElliott Hughes     Skip primary name by default.
315*d5c9a868SElliott Hughes'-D S'
316*d5c9a868SElliott Hughes     Skip secondary name by default.
317*d5c9a868SElliott Hughes'-D m'
318*d5c9a868SElliott Hughes     Ask user what to do with primary name.
319*d5c9a868SElliott Hughes'-D M'
320*d5c9a868SElliott Hughes     Ask user what to do with secondary name.
321*d5c9a868SElliott Hughes
322*d5c9a868SElliott Hughes   Note that for command line switches lower/upper differentiates
323*d5c9a868SElliott Hughesbetween primary/secondary name whereas for interactive choices,
324*d5c9a868SElliott Hugheslower/upper differentiates between just-this-time/always.
325*d5c9a868SElliott Hughes
326*d5c9a868SElliott Hughes   The primary name is the name as displayed in Windows 95 or Windows
327*d5c9a868SElliott HughesNT: i.e.  the long name if it exists, and the short name otherwise.  The
328*d5c9a868SElliott Hughessecondary name is the "hidden" name, i.e.  the short name if a long name
329*d5c9a868SElliott Hughesexists.
330*d5c9a868SElliott Hughes
331*d5c9a868SElliott Hughes   By default, the user is prompted if the primary name clashes, and the
332*d5c9a868SElliott Hughessecondary name is autorenamed.
333*d5c9a868SElliott Hughes
334*d5c9a868SElliott Hughes   If a name clash occurs in a Unix directory, mtools only asks whether
335*d5c9a868SElliott Hughesto overwrite the file, or to skip it.
336*d5c9a868SElliott Hughes
337*d5c9a868SElliott Hughes
338*d5c9a868SElliott HughesFile: mtools.info,  Node: case sensitivity,  Next: high capacity formats,  Prev: name clashes,  Up: Common features
339*d5c9a868SElliott Hughes
340*d5c9a868SElliott Hughes2.6 Case sensitivity of the VFAT file system
341*d5c9a868SElliott Hughes============================================
342*d5c9a868SElliott Hughes
343*d5c9a868SElliott HughesThe VFAT file system is able to remember the case of the filenames.
344*d5c9a868SElliott HughesHowever, filenames which differ only in case are not allowed to coexist
345*d5c9a868SElliott Hughesin the same directory.  For example if you store a file called
346*d5c9a868SElliott HughesLongFileName on a VFAT file system, mdir shows this file as
347*d5c9a868SElliott HughesLongFileName, and not as Longfilename.  However, if you then try to add
348*d5c9a868SElliott HughesLongFilename to the same directory, it is refused, because case is
349*d5c9a868SElliott Hughesignored for clash checks.
350*d5c9a868SElliott Hughes
351*d5c9a868SElliott Hughes   The VFAT file system allows you to store the case of a filename in
352*d5c9a868SElliott Hughesthe attribute byte, if all letters of the filename are the same case,
353*d5c9a868SElliott Hughesand if all letters of the extension are the same case too.  Mtools uses
354*d5c9a868SElliott Hughesthis information when displaying the files, and also to generate the
355*d5c9a868SElliott HughesUnix filename when mcopying to a Unix directory.  This may have
356*d5c9a868SElliott Hughesunexpected results when applied to files written using an pre-7.0
357*d5c9a868SElliott Hughesversion of DOS: Indeed, the old style filenames map to all upper case.
358*d5c9a868SElliott HughesThis is different from the behavior of the old version of mtools which
359*d5c9a868SElliott Hughesused to generate lower case Unix filenames.
360*d5c9a868SElliott Hughes
361*d5c9a868SElliott Hughes
362*d5c9a868SElliott HughesFile: mtools.info,  Node: high capacity formats,  Next: exit codes,  Prev: case sensitivity,  Up: Common features
363*d5c9a868SElliott Hughes
364*d5c9a868SElliott Hughes2.7 high capacity formats
365*d5c9a868SElliott Hughes=========================
366*d5c9a868SElliott Hughes
367*d5c9a868SElliott HughesMtools supports a number of formats which allow storage of more data on
368*d5c9a868SElliott Hughesdisk than usual.  Due to different operating system abilities, these
369*d5c9a868SElliott Hughesformats are not supported on all operating systems.  Mtools recognizes
370*d5c9a868SElliott Hughesthese formats transparently where supported.
371*d5c9a868SElliott Hughes
372*d5c9a868SElliott Hughes   In order to format these disks, you need to use an operating system
373*d5c9a868SElliott Hughesspecific tool.  For Linux, suitable floppy tools can be found in the
374*d5c9a868SElliott Hughes'fdutils' package at the following locations~:
375*d5c9a868SElliott Hughes     http://www.fdutils.linux.lu/.
376*d5c9a868SElliott Hughes
377*d5c9a868SElliott Hughes   See the manual pages included in that package for further detail: Use
378*d5c9a868SElliott Hughes'superformat' to format all formats except XDF, and use 'xdfcopy' to
379*d5c9a868SElliott Hughesformat XDF.
380*d5c9a868SElliott Hughes
381*d5c9a868SElliott Hughes* Menu:
382*d5c9a868SElliott Hughes
383*d5c9a868SElliott Hughes* more sectors::      Putting more sectors per track on the disk
384*d5c9a868SElliott Hughes* bigger sectors::    Use bigger sectors to save header space
385*d5c9a868SElliott Hughes* 2m::                Use a standard first track
386*d5c9a868SElliott Hughes* XDF::               OS/2's eXtended density format
387*d5c9a868SElliott Hughes
388*d5c9a868SElliott Hughes
389*d5c9a868SElliott HughesFile: mtools.info,  Node: more sectors,  Next: bigger sectors,  Prev: high capacity formats,  Up: high capacity formats
390*d5c9a868SElliott Hughes
391*d5c9a868SElliott Hughes2.7.1 More sectors
392*d5c9a868SElliott Hughes------------------
393*d5c9a868SElliott Hughes
394*d5c9a868SElliott HughesThe oldest method of fitting more data on a disk is to use more sectors
395*d5c9a868SElliott Hughesand more cylinders.  Although the standard format uses 80 cylinders and
396*d5c9a868SElliott Hughes18 sectors (on a 3 1/2 high density disk), it is possible to use up to
397*d5c9a868SElliott Hughes83 cylinders (on most drives) and up to 21 sectors.  This method allows
398*d5c9a868SElliott Hughesto store up to 1743K on a 3 1/2 HD disk.  However, 21 sector disks are
399*d5c9a868SElliott Hughestwice as slow as the standard 18 sector disks because the sectors are
400*d5c9a868SElliott Hughespacked so close together that we need to interleave them.  This problem
401*d5c9a868SElliott Hughesdoesn't exist for 20 sector formats.
402*d5c9a868SElliott Hughes
403*d5c9a868SElliott Hughes   These formats are supported by numerous DOS shareware utilities such
404*d5c9a868SElliott Hughesas 'fdformat' and 'vgacopy'.  In his infinite hubris, Bill Gate$
405*d5c9a868SElliott Hughesbelieved that he invented this, and called it 'DMF disks', or 'Windows
406*d5c9a868SElliott Hughesformatted disks'.  But in reality, it has already existed years before!
407*d5c9a868SElliott HughesMtools supports these formats on Linux, on SunOS and on the DELL Unix
408*d5c9a868SElliott HughesPC.
409*d5c9a868SElliott Hughes
410*d5c9a868SElliott Hughes
411*d5c9a868SElliott HughesFile: mtools.info,  Node: bigger sectors,  Next: 2m,  Prev: more sectors,  Up: high capacity formats
412*d5c9a868SElliott Hughes
413*d5c9a868SElliott Hughes2.7.2 Bigger sectors
414*d5c9a868SElliott Hughes--------------------
415*d5c9a868SElliott Hughes
416*d5c9a868SElliott HughesBy using bigger sectors it is possible to go beyond the capacity which
417*d5c9a868SElliott Hughescan be obtained by the standard 512-byte sectors.  This is because of
418*d5c9a868SElliott Hughesthe sector header.  The sector header has the same size, regardless of
419*d5c9a868SElliott Hugheshow many data bytes are in the sector.  Thus, we save some space by
420*d5c9a868SElliott Hughesusing _fewer_, but bigger sectors.  For example, 1 sector of 4K only
421*d5c9a868SElliott Hughestakes up header space once, whereas 8 sectors of 512 bytes have also 8
422*d5c9a868SElliott Hughesheaders, for the same amount of useful data.
423*d5c9a868SElliott Hughes
424*d5c9a868SElliott Hughes   This method permits storage of up to 1992K on a 3 1/2 HD disk.
425*d5c9a868SElliott Hughes
426*d5c9a868SElliott Hughes   Mtools supports these formats only on Linux.
427*d5c9a868SElliott Hughes
428*d5c9a868SElliott Hughes
429*d5c9a868SElliott HughesFile: mtools.info,  Node: 2m,  Next: XDF,  Prev: bigger sectors,  Up: high capacity formats
430*d5c9a868SElliott Hughes
431*d5c9a868SElliott Hughes2.7.3 2m
432*d5c9a868SElliott Hughes--------
433*d5c9a868SElliott Hughes
434*d5c9a868SElliott HughesThe 2m format was originally invented by Ciriaco Garcia de Celis.  It
435*d5c9a868SElliott Hughesalso uses bigger sectors than usual in order to fit more data on the
436*d5c9a868SElliott Hughesdisk.  However, it uses the standard format (18 sectors of 512 bytes
437*d5c9a868SElliott Hugheseach) on the first cylinder, in order to make these disks easier to
438*d5c9a868SElliott Hugheshandle by DOS. Indeed this method allows you to have a standard sized
439*d5c9a868SElliott Hughesboot sector, which contains a description of how the rest of the disk
440*d5c9a868SElliott Hughesshould be read.
441*d5c9a868SElliott Hughes
442*d5c9a868SElliott Hughes   However, the drawback of this is that the first cylinder can hold
443*d5c9a868SElliott Hughesless data than the others.  Unfortunately, DOS can only handle disks
444*d5c9a868SElliott Hugheswhere each track contains the same amount of data.  Thus 2m hides the
445*d5c9a868SElliott Hughesfact that the first track contains less data by using a "shadow FAT".
446*d5c9a868SElliott Hughes(Usually, DOS stores the FAT in two identical copies, for additional
447*d5c9a868SElliott Hughessafety.  XDF stores only one copy, but tells DOS that it stores two.
448*d5c9a868SElliott HughesThus the space that would be taken up by the second FAT copy is saved.)
449*d5c9a868SElliott HughesThis also means that you should *never use a 2m disk to store anything
450*d5c9a868SElliott Hugheselse than a DOS file system*.
451*d5c9a868SElliott Hughes
452*d5c9a868SElliott Hughes   Mtools supports these formats only on Linux.
453*d5c9a868SElliott Hughes
454*d5c9a868SElliott Hughes
455*d5c9a868SElliott HughesFile: mtools.info,  Node: XDF,  Prev: 2m,  Up: high capacity formats
456*d5c9a868SElliott Hughes
457*d5c9a868SElliott Hughes2.7.4 XDF
458*d5c9a868SElliott Hughes---------
459*d5c9a868SElliott Hughes
460*d5c9a868SElliott HughesXDF is a high capacity format used by OS/2.  It can hold 1840 K per
461*d5c9a868SElliott Hughesdisk.  That's lower than the best 2m formats, but its main advantage is
462*d5c9a868SElliott Hughesthat it is fast: 600 milliseconds per track.  That's faster than the 21
463*d5c9a868SElliott Hughessector format, and almost as fast as the standard 18 sector format.  In
464*d5c9a868SElliott Hughesorder to access these disks, make sure mtools has been compiled with XDF
465*d5c9a868SElliott Hughessupport, and set the 'use_xdf' variable for the drive in the
466*d5c9a868SElliott Hughesconfiguration file.  *Note Compiling mtools::, and *note miscellaneous
467*d5c9a868SElliott Hughesvariables::, for details on how to do this.  Fast XDF access is only
468*d5c9a868SElliott Hughesavailable for Linux kernels which are more recent than 1.1.34.
469*d5c9a868SElliott Hughes
470*d5c9a868SElliott Hughes   Mtools supports this format only on Linux.
471*d5c9a868SElliott Hughes
472*d5c9a868SElliott Hughes   *Caution / Attention distributors*: If mtools is compiled on a Linux
473*d5c9a868SElliott Hugheskernel more recent than 1.3.34, it won't run on an older kernel.
474*d5c9a868SElliott HughesHowever, if it has been compiled on an older kernel, it still runs on a
475*d5c9a868SElliott Hughesnewer kernel, except that XDF access is slower.  It is recommended that
476*d5c9a868SElliott Hughesdistribution authors only include mtools binaries compiled on kernels
477*d5c9a868SElliott Hughesolder than 1.3.34 until 2.0 comes out.  When 2.0 will be out, mtools
478*d5c9a868SElliott Hughesbinaries compiled on newer kernels may (and should) be distributed.
479*d5c9a868SElliott HughesMtools binaries compiled on kernels older than 1.3.34 won't run on any
480*d5c9a868SElliott Hughes2.1 kernel or later.
481*d5c9a868SElliott Hughes
482*d5c9a868SElliott Hughes
483*d5c9a868SElliott HughesFile: mtools.info,  Node: exit codes,  Next: bugs,  Prev: high capacity formats,  Up: Common features
484*d5c9a868SElliott Hughes
485*d5c9a868SElliott Hughes2.8 Exit codes
486*d5c9a868SElliott Hughes==============
487*d5c9a868SElliott Hughes
488*d5c9a868SElliott HughesAll the Mtools commands return 0 on success, 1 on utter failure, or 2 on
489*d5c9a868SElliott Hughespartial failure.  All the Mtools commands perform a few sanity checks
490*d5c9a868SElliott Hughesbefore going ahead, to make sure that the disk is indeed an MS-DOS disk
491*d5c9a868SElliott Hughes(as opposed to, say an ext2 or MINIX disk).  These checks may reject
492*d5c9a868SElliott Hughespartially corrupted disks, which might otherwise still be readable.  To
493*d5c9a868SElliott Hughesavoid these checks, set the MTOOLS_SKIP_CHECK environmental variable or
494*d5c9a868SElliott Hughesthe corresponding configuration file variable (*note global variables::)
495*d5c9a868SElliott Hughes
496*d5c9a868SElliott Hughes
497*d5c9a868SElliott HughesFile: mtools.info,  Node: bugs,  Prev: exit codes,  Up: Common features
498*d5c9a868SElliott Hughes
499*d5c9a868SElliott Hughes2.9 Bugs
500*d5c9a868SElliott Hughes========
501*d5c9a868SElliott Hughes
502*d5c9a868SElliott HughesAn unfortunate side effect of not guessing the proper device (when
503*d5c9a868SElliott Hughesmultiple disk capacities are supported) is an occasional error message
504*d5c9a868SElliott Hughesfrom the device driver.  These can be safely ignored.
505*d5c9a868SElliott Hughes
506*d5c9a868SElliott Hughes   The fat checking code chokes on 1.72 Mb disks mformatted with
507*d5c9a868SElliott Hughespre-2.0.7 mtools.  Set the environmental variable
508*d5c9a868SElliott HughesMTOOLS_FAT_COMPATIBILITY (or the corresponding configuration file
509*d5c9a868SElliott Hughesvariable, *note global variables::) to bypass the fat checking.
510*d5c9a868SElliott Hughes
511*d5c9a868SElliott Hughes
512*d5c9a868SElliott HughesFile: mtools.info,  Node: Configuration,  Next: Commands,  Prev: Common features,  Up: Top
513*d5c9a868SElliott Hughes
514*d5c9a868SElliott Hughes3 How to configure mtools for your environment
515*d5c9a868SElliott Hughes**********************************************
516*d5c9a868SElliott Hughes
517*d5c9a868SElliott Hughes* Menu:
518*d5c9a868SElliott Hughes
519*d5c9a868SElliott Hughes* configuration file location::
520*d5c9a868SElliott Hughes* default values::
521*d5c9a868SElliott Hughes* global variables::
522*d5c9a868SElliott Hughes* per drive variables::
523*d5c9a868SElliott Hughes* parsing order::
524*d5c9a868SElliott Hughes* old style configuration::
525*d5c9a868SElliott Hughes
526*d5c9a868SElliott Hughes3.1 Description
527*d5c9a868SElliott Hughes===============
528*d5c9a868SElliott Hughes
529*d5c9a868SElliott HughesThis sections explains the syntax of the configurations files for
530*d5c9a868SElliott Hughesmtools.  The configuration files are called '/etc/mtools.conf' and
531*d5c9a868SElliott Hughes'~/.mtoolsrc'.  If the environmental variable 'MTOOLSRC' is set, its
532*d5c9a868SElliott Hughescontents is used as the filename for a third configuration file.  These
533*d5c9a868SElliott Hughesconfiguration files describe the following items:
534*d5c9a868SElliott Hughes
535*d5c9a868SElliott Hughes   * Global configuration flags and variables
536*d5c9a868SElliott Hughes   * Per drive flags and variables
537*d5c9a868SElliott Hughes
538*d5c9a868SElliott Hughes* Menu:
539*d5c9a868SElliott Hughes
540*d5c9a868SElliott Hughes* configuration file location::  Where mtools looks for its configuration files
541*d5c9a868SElliott Hughes* general syntax::        The layout of the configuration files
542*d5c9a868SElliott Hughes* default values::        Why you don't need a configuration file in most cases
543*d5c9a868SElliott Hughes* global variables::      Variables that are independent of the drive
544*d5c9a868SElliott Hughes* per drive variables::   Variables that are specific to a given drive
545*d5c9a868SElliott Hughes* parsing order::         Location of configuration files and parsing order
546*d5c9a868SElliott Hughes* old style configuration::      Backwards compatibility
547*d5c9a868SElliott Hughes
548*d5c9a868SElliott Hughes
549*d5c9a868SElliott HughesFile: mtools.info,  Node: configuration file location,  Next: general syntax,  Prev: Configuration,  Up: Configuration
550*d5c9a868SElliott Hughes
551*d5c9a868SElliott Hughes3.2 Location of the configuration files
552*d5c9a868SElliott Hughes=======================================
553*d5c9a868SElliott Hughes
554*d5c9a868SElliott Hughes'/etc/mtools.conf' is the system-wide configuration file, and
555*d5c9a868SElliott Hughes'~/.mtoolsrc' is the user's private configuration file.
556*d5c9a868SElliott Hughes
557*d5c9a868SElliott Hughes   On some systems, the system-wide configuration file is called
558*d5c9a868SElliott Hughes'/etc/default/mtools.conf' instead.
559*d5c9a868SElliott Hughes
560*d5c9a868SElliott Hughes* Menu:
561*d5c9a868SElliott Hughes
562*d5c9a868SElliott Hughes* general syntax::
563*d5c9a868SElliott Hughes
564*d5c9a868SElliott Hughes
565*d5c9a868SElliott HughesFile: mtools.info,  Node: general syntax,  Next: default values,  Prev: configuration file location,  Up: Configuration
566*d5c9a868SElliott Hughes
567*d5c9a868SElliott Hughes3.2.1 General configuration file syntax
568*d5c9a868SElliott Hughes---------------------------------------
569*d5c9a868SElliott Hughes
570*d5c9a868SElliott HughesThe configuration files is made up of sections.  Each section starts
571*d5c9a868SElliott Hugheswith a keyword identifying the section followed by a colon.  Then follow
572*d5c9a868SElliott Hughesvariable assignments and flags.  Variable assignments take the following
573*d5c9a868SElliott Hughesform:
574*d5c9a868SElliott Hughes     name=value
575*d5c9a868SElliott Hughes   Flags are lone keywords without an equal sign and value following
576*d5c9a868SElliott Hughesthem.  A section either ends at the end of the file or where the next
577*d5c9a868SElliott Hughessection begins.
578*d5c9a868SElliott Hughes
579*d5c9a868SElliott Hughes   Lines starting with a hash ('#') are comments.  Newline characters
580*d5c9a868SElliott Hughesare equivalent to whitespace (except where ending a comment).  The
581*d5c9a868SElliott Hughesconfiguration file is case insensitive, except for item enclosed in
582*d5c9a868SElliott Hughesquotes (such as filenames).
583*d5c9a868SElliott Hughes
584*d5c9a868SElliott Hughes
585*d5c9a868SElliott HughesFile: mtools.info,  Node: default values,  Next: global variables,  Prev: general syntax,  Up: Configuration
586*d5c9a868SElliott Hughes
587*d5c9a868SElliott Hughes3.3 Default values
588*d5c9a868SElliott Hughes==================
589*d5c9a868SElliott Hughes
590*d5c9a868SElliott HughesFor most platforms, mtools contains reasonable compiled-in defaults for
591*d5c9a868SElliott Hughesphysical floppy drives.  Thus, you usually don't need to bother with the
592*d5c9a868SElliott Hughesconfiguration file, if all you want to do with mtools is to access your
593*d5c9a868SElliott Hughesfloppy drives.  On the other hand, the configuration file is needed if
594*d5c9a868SElliott Hughesyou also want to use mtools to access your hard disk partitions and
595*d5c9a868SElliott HughesDOSEMU image files.
596*d5c9a868SElliott Hughes
597*d5c9a868SElliott Hughes
598*d5c9a868SElliott HughesFile: mtools.info,  Node: global variables,  Next: per drive variables,  Prev: default values,  Up: Configuration
599*d5c9a868SElliott Hughes
600*d5c9a868SElliott Hughes3.4 Global variables
601*d5c9a868SElliott Hughes====================
602*d5c9a868SElliott Hughes
603*d5c9a868SElliott HughesGlobal flags may be set to 1 or to 0.
604*d5c9a868SElliott Hughes
605*d5c9a868SElliott Hughes   The following global flags are recognized:
606*d5c9a868SElliott Hughes
607*d5c9a868SElliott Hughes'MTOOLS_SKIP_CHECK'
608*d5c9a868SElliott Hughes     If this is set to 1, mtools skips most of its sanity checks.  This
609*d5c9a868SElliott Hughes     is needed to read some Atari disks which have been made with the
610*d5c9a868SElliott Hughes     earlier ROMs, and which would not be recognized otherwise.
611*d5c9a868SElliott Hughes'MTOOLS_FAT_COMPATIBILITY'
612*d5c9a868SElliott Hughes     If this is set to 1, mtools skips the fat size checks.  Some disks
613*d5c9a868SElliott Hughes     have a bigger FAT than they really need to.  These are rejected if
614*d5c9a868SElliott Hughes     this option is not set.
615*d5c9a868SElliott Hughes'MTOOLS_LOWER_CASE'
616*d5c9a868SElliott Hughes     If this is set to 1, mtools displays all-upper-case short filenames
617*d5c9a868SElliott Hughes     as lowercase.  This has been done to allow a behavior which is
618*d5c9a868SElliott Hughes     consistent with older versions of mtools which didn't know about
619*d5c9a868SElliott Hughes     the case bits.
620*d5c9a868SElliott Hughes'MTOOLS_NO_VFAT'
621*d5c9a868SElliott Hughes     If this is set to 1, mtools won't generate VFAT entries for
622*d5c9a868SElliott Hughes     filenames which are mixed-case, but otherwise legal dos filenames.
623*d5c9a868SElliott Hughes     This is useful when working with DOS versions which can't grok VFAT
624*d5c9a868SElliott Hughes     long names, such as FreeDOS.
625*d5c9a868SElliott Hughes'MTOOLS_DOTTED_DIR'
626*d5c9a868SElliott Hughes     In a wide directory, prints the short name with a dot instead of
627*d5c9a868SElliott Hughes     spaces separating the basename and the extension.
628*d5c9a868SElliott Hughes'MTOOLS_NAME_NUMERIC_TAIL'
629*d5c9a868SElliott Hughes     If this is set to one (default), generate numeric tails for all
630*d5c9a868SElliott Hughes     long names (~1).  If set to zero, only generate numeric tails if
631*d5c9a868SElliott Hughes     otherwise a clash would have happened.
632*d5c9a868SElliott Hughes'MTOOLS_TWENTY_FOUR_HOUR_CLOCK'
633*d5c9a868SElliott Hughes     If 1, uses the European notation for times (twenty four hour
634*d5c9a868SElliott Hughes     clock), else uses the UK/US notation (am/pm)
635*d5c9a868SElliott Hughes'MTOOLS_LOCK_TIMEOUT'
636*d5c9a868SElliott Hughes     How long, in seconds, to wait for a locked device to become free.
637*d5c9a868SElliott Hughes     Defaults to 30.
638*d5c9a868SElliott Hughes
639*d5c9a868SElliott Hughes   Example: Inserting the following line into your configuration file
640*d5c9a868SElliott Hughesinstructs mtools to skip the sanity checks:
641*d5c9a868SElliott Hughes       MTOOLS_SKIP_CHECK=1
642*d5c9a868SElliott Hughes
643*d5c9a868SElliott Hughes   Global variables may also be set via the environment:
644*d5c9a868SElliott Hughes       export MTOOLS_SKIP_CHECK=1
645*d5c9a868SElliott Hughes
646*d5c9a868SElliott Hughes   Global string variables may be set to any value:
647*d5c9a868SElliott Hughes'MTOOLS_DATE_STRING'
648*d5c9a868SElliott Hughes     The format used for printing dates of files.  By default, is
649*d5c9a868SElliott Hughes     dd-mm-yyyy.
650*d5c9a868SElliott Hughes
651*d5c9a868SElliott Hughes
652*d5c9a868SElliott HughesFile: mtools.info,  Node: per drive variables,  Next: parsing order,  Prev: global variables,  Up: Configuration
653*d5c9a868SElliott Hughes
654*d5c9a868SElliott Hughes3.5 Per drive flags and variables
655*d5c9a868SElliott Hughes=================================
656*d5c9a868SElliott Hughes
657*d5c9a868SElliott Hughes* Menu:
658*d5c9a868SElliott Hughes
659*d5c9a868SElliott Hughes* general information::   What a drive description looks like
660*d5c9a868SElliott Hughes* location information::  Where is the drive data physically stored
661*d5c9a868SElliott Hughes* geometry description::  Describes the physical characteristics of
662*d5c9a868SElliott Hughes                          the media
663*d5c9a868SElliott Hughes* open flags::            Flags passed to the open system call when the
664*d5c9a868SElliott Hughes                          device is opened
665*d5c9a868SElliott Hughes* miscellaneous variables::        Variables which don't fit in either category
666*d5c9a868SElliott Hughes* miscellaneous flags::		  Switch variables, which can be enabled or disabled
667*d5c9a868SElliott Hughes* multiple descriptions:: How to supply several descriptions for a
668*d5c9a868SElliott Hughes                          drive, to be tried one after the other.
669*d5c9a868SElliott Hughes
670*d5c9a868SElliott Hughes
671*d5c9a868SElliott HughesFile: mtools.info,  Node: general information,  Next: location information,  Prev: per drive variables,  Up: per drive variables
672*d5c9a868SElliott Hughes
673*d5c9a868SElliott Hughes3.5.1 General information
674*d5c9a868SElliott Hughes-------------------------
675*d5c9a868SElliott Hughes
676*d5c9a868SElliott HughesPer drive flags and values may be described in a drive section.  A drive
677*d5c9a868SElliott Hughessection starts with 'drive' "DRIVELETTER" :
678*d5c9a868SElliott Hughes
679*d5c9a868SElliott Hughes   Then follow variable-value pairs and flags.
680*d5c9a868SElliott Hughes
681*d5c9a868SElliott Hughes   This is a sample drive description:
682*d5c9a868SElliott Hughes       drive a:
683*d5c9a868SElliott Hughes         file="/dev/fd0" use_xdf=1
684*d5c9a868SElliott Hughes
685*d5c9a868SElliott Hughes
686*d5c9a868SElliott HughesFile: mtools.info,  Node: location information,  Next: geometry description,  Prev: general information,  Up: per drive variables
687*d5c9a868SElliott Hughes
688*d5c9a868SElliott Hughes3.5.2 Location information
689*d5c9a868SElliott Hughes--------------------------
690*d5c9a868SElliott Hughes
691*d5c9a868SElliott HughesFor each drive, you need to describe where its data is physically stored
692*d5c9a868SElliott Hughes(image file, physical device, partition, offset).
693*d5c9a868SElliott Hughes
694*d5c9a868SElliott Hughes'file'
695*d5c9a868SElliott Hughes     The name of the file or device holding the disk image.  This is
696*d5c9a868SElliott Hughes     mandatory.  The file name should be enclosed in quotes.
697*d5c9a868SElliott Hughes
698*d5c9a868SElliott Hughes'partition'
699*d5c9a868SElliott Hughes     Tells mtools to treat the drive as a partitioned device, and to use
700*d5c9a868SElliott Hughes     the given partition.  Only primary partitions are accessible using
701*d5c9a868SElliott Hughes     this method, and they are numbered from 1 to 4.  For logical
702*d5c9a868SElliott Hughes     partitions, use the more general 'offset' variable.  The
703*d5c9a868SElliott Hughes     'partition' variable is intended for removable media such as
704*d5c9a868SElliott Hughes     Syquest disks, ZIP drives, and magneto-optical disks.  Although
705*d5c9a868SElliott Hughes     traditional DOS sees Syquest disks and magneto-optical disks as
706*d5c9a868SElliott Hughes     'giant floppy disks' which are unpartitioned, OS/2 and Windows NT
707*d5c9a868SElliott Hughes     treat them like hard disks, i.e.  partitioned devices.  The
708*d5c9a868SElliott Hughes     'partition' flag is also useful DOSEMU hdimages.  It is not
709*d5c9a868SElliott Hughes     recommended for hard disks for which direct access to partitions is
710*d5c9a868SElliott Hughes     available through mounting.
711*d5c9a868SElliott Hughes
712*d5c9a868SElliott Hughes'offset'
713*d5c9a868SElliott Hughes     Describes where in the file the MS-DOS file system starts.  This is
714*d5c9a868SElliott Hughes     useful for logical partitions in DOSEMU hdimages, and for ATARI ram
715*d5c9a868SElliott Hughes     disks.  By default, this is zero, meaning that the file system
716*d5c9a868SElliott Hughes     starts right at the beginning of the device or file.
717*d5c9a868SElliott Hughes
718*d5c9a868SElliott Hughes
719*d5c9a868SElliott HughesFile: mtools.info,  Node: geometry description,  Next: open flags,  Prev: location information,  Up: per drive variables
720*d5c9a868SElliott Hughes
721*d5c9a868SElliott Hughes3.5.3 Disk Geometry Configuration
722*d5c9a868SElliott Hughes---------------------------------
723*d5c9a868SElliott Hughes
724*d5c9a868SElliott HughesGeometry information describes the physical characteristics about the
725*d5c9a868SElliott Hughesdisk.  Its has three purposes:
726*d5c9a868SElliott Hughes
727*d5c9a868SElliott Hughesformatting
728*d5c9a868SElliott Hughes     The geometry information is written into the boot sector of the
729*d5c9a868SElliott Hughes     newly made disk.  However, you may also describe the geometry
730*d5c9a868SElliott Hughes     information on the command line.  *Note mformat::, for details.
731*d5c9a868SElliott Hughesfiltering
732*d5c9a868SElliott Hughes     On some Unixes there are device nodes which only support one
733*d5c9a868SElliott Hughes     physical geometry.  For instance, you might need a different node
734*d5c9a868SElliott Hughes     to access a disk as high density or as low density.  The geometry
735*d5c9a868SElliott Hughes     is compared to the actual geometry stored on the boot sector to
736*d5c9a868SElliott Hughes     make sure that this device node is able to correctly read the disk.
737*d5c9a868SElliott Hughes     If the geometry doesn't match, this drive entry fails, and the next
738*d5c9a868SElliott Hughes     drive entry bearing the same drive letter is tried.  *Note multiple
739*d5c9a868SElliott Hughes     descriptions::, for more details on supplying several descriptions
740*d5c9a868SElliott Hughes     for one drive letter.
741*d5c9a868SElliott Hughes
742*d5c9a868SElliott Hughes     If no geometry information is supplied in the configuration file,
743*d5c9a868SElliott Hughes     all disks are accepted.  On Linux (and on SPARC) there exist device
744*d5c9a868SElliott Hughes     nodes with configurable geometry ('/dev/fd0', '/dev/fd1' etc), and
745*d5c9a868SElliott Hughes     thus filtering is not needed (and ignored) for disk drives.
746*d5c9a868SElliott Hughes     (Mtools still does do filtering on plain files (disk images) in
747*d5c9a868SElliott Hughes     Linux: this is mainly intended for test purposes, as I don't have
748*d5c9a868SElliott Hughes     access to a Unix which would actually need filtering).
749*d5c9a868SElliott Hughes
750*d5c9a868SElliott Hughes     If you do not need filtering, but want still a default geometry for
751*d5c9a868SElliott Hughes     mformatting, you may switch off filtering using the 'mformat_only'
752*d5c9a868SElliott Hughes     flag.
753*d5c9a868SElliott Hughes
754*d5c9a868SElliott Hughes     If you want filtering, you should supply the 'filter' flag.  If you
755*d5c9a868SElliott Hughes     supply a geometry, you must supply one of both flags.
756*d5c9a868SElliott Hughes
757*d5c9a868SElliott Hughesinitial geometry
758*d5c9a868SElliott Hughes     On devices that support it (usually floppy devices), the geometry
759*d5c9a868SElliott Hughes     information is also used to set the initial geometry.  This initial
760*d5c9a868SElliott Hughes     geometry is applied while reading the boot sector, which contains
761*d5c9a868SElliott Hughes     the real geometry.  If no geometry information is supplied in the
762*d5c9a868SElliott Hughes     configuration file, or if the 'mformat_only' flag is supplied, no
763*d5c9a868SElliott Hughes     initial configuration is done.
764*d5c9a868SElliott Hughes
765*d5c9a868SElliott Hughes     On Linux, initial geometry is not really needed, as the
766*d5c9a868SElliott Hughes     configurable devices are able to auto-detect the disk type
767*d5c9a868SElliott Hughes     accurately enough (for most common formats) to read the boot
768*d5c9a868SElliott Hughes     sector.
769*d5c9a868SElliott Hughes
770*d5c9a868SElliott Hughes   Wrong geometry information may lead to very bizarre errors.  That's
771*d5c9a868SElliott Hugheswhy I strongly recommend that you add the 'mformat_only' flag to your
772*d5c9a868SElliott Hughesdrive description, unless you really need filtering or initial geometry.
773*d5c9a868SElliott Hughes
774*d5c9a868SElliott Hughes   The following geometry related variables are available:
775*d5c9a868SElliott Hughes
776*d5c9a868SElliott Hughes'cylinders'
777*d5c9a868SElliott Hughes'tracks'
778*d5c9a868SElliott Hughes     The number of cylinders.  ('cylinders' is the preferred form,
779*d5c9a868SElliott Hughes     'tracks' is considered obsolete)
780*d5c9a868SElliott Hughes'heads'
781*d5c9a868SElliott Hughes     The number of heads (sides).
782*d5c9a868SElliott Hughes'sectors'
783*d5c9a868SElliott Hughes     The number of sectors per track.
784*d5c9a868SElliott Hughes
785*d5c9a868SElliott Hughes   Example: the following drive section describes a 1.44M drive:
786*d5c9a868SElliott Hughes
787*d5c9a868SElliott Hughes       drive a:
788*d5c9a868SElliott Hughes           file="/dev/fd0H1440"
789*d5c9a868SElliott Hughes           fat_bits=12
790*d5c9a868SElliott Hughes           cylinders=80 heads=2 sectors=18
791*d5c9a868SElliott Hughes           mformat_only
792*d5c9a868SElliott Hughes
793*d5c9a868SElliott Hughes   The following shorthand geometry descriptions are available:
794*d5c9a868SElliott Hughes
795*d5c9a868SElliott Hughes'1.44m'
796*d5c9a868SElliott Hughes     high density 3 1/2 disk.  Equivalent to: 'fat_bits=12 cylinders=80
797*d5c9a868SElliott Hughes     heads=2 sectors=18'
798*d5c9a868SElliott Hughes'1.2m'
799*d5c9a868SElliott Hughes     high density 5 1/4 disk.  Equivalent to: 'fat_bits=12 cylinders=80
800*d5c9a868SElliott Hughes     heads=2 sectors=15'
801*d5c9a868SElliott Hughes'720k'
802*d5c9a868SElliott Hughes     double density 3 1/2 disk.  Equivalent to: 'fat_bits=12
803*d5c9a868SElliott Hughes     cylinders=80 heads=2 sectors=9'
804*d5c9a868SElliott Hughes'360k'
805*d5c9a868SElliott Hughes     double density 5 1/4 disk.  Equivalent to: 'fat_bits=12
806*d5c9a868SElliott Hughes     cylinders=40 heads=2 sectors=9'
807*d5c9a868SElliott Hughes
808*d5c9a868SElliott Hughes   The shorthand format descriptions may be amended.  For example, '360k
809*d5c9a868SElliott Hughessectors=8' describes a 320k disk and is equivalent to: 'fat_bits=12
810*d5c9a868SElliott Hughescylinders=40 heads=2 sectors=8'
811*d5c9a868SElliott Hughes
812*d5c9a868SElliott Hughes
813*d5c9a868SElliott HughesFile: mtools.info,  Node: open flags,  Next: miscellaneous variables,  Prev: geometry description,  Up: per drive variables
814*d5c9a868SElliott Hughes
815*d5c9a868SElliott Hughes3.5.4 Open Flags
816*d5c9a868SElliott Hughes----------------
817*d5c9a868SElliott Hughes
818*d5c9a868SElliott HughesMoreover, the following flags are available:
819*d5c9a868SElliott Hughes
820*d5c9a868SElliott Hughes'sync'
821*d5c9a868SElliott Hughes     All i/o operations are done synchronously
822*d5c9a868SElliott Hughes'nodelay'
823*d5c9a868SElliott Hughes     The device or file is opened with the O_NDELAY flag.  This is
824*d5c9a868SElliott Hughes     needed on some non-Linux architectures.
825*d5c9a868SElliott Hughes'exclusive'
826*d5c9a868SElliott Hughes     The device or file is opened with the O_EXCL flag.  On Linux, this
827*d5c9a868SElliott Hughes     ensures exclusive access to the floppy drive.  On most other
828*d5c9a868SElliott Hughes     architectures, and for plain files it has no effect at all.
829*d5c9a868SElliott Hughes
830*d5c9a868SElliott Hughes
831*d5c9a868SElliott HughesFile: mtools.info,  Node: miscellaneous variables,  Next: miscellaneous flags,  Prev: open flags,  Up: per drive variables
832*d5c9a868SElliott Hughes
833*d5c9a868SElliott Hughes3.5.5 General Purpose Drive Variables
834*d5c9a868SElliott Hughes-------------------------------------
835*d5c9a868SElliott Hughes
836*d5c9a868SElliott HughesThe following general purpose drive variables are available.  Depending
837*d5c9a868SElliott Hughesto their type, these variables can be set to a string (precmd) or an
838*d5c9a868SElliott Hughesinteger (all others)
839*d5c9a868SElliott Hughes
840*d5c9a868SElliott Hughes'fat_bits'
841*d5c9a868SElliott Hughes     The number of FAT bits.  This may be 12 or 16.  This is very rarely
842*d5c9a868SElliott Hughes     needed, as it can almost always be deduced from information in the
843*d5c9a868SElliott Hughes     boot sector.  On the contrary, describing the number of fat bits
844*d5c9a868SElliott Hughes     may actually be harmful if you get it wrong.  You should only use
845*d5c9a868SElliott Hughes     it if mtools gets the auto-detected number of fat bits wrong, or if
846*d5c9a868SElliott Hughes     you want to mformat a disk with a weird number of fat bits.
847*d5c9a868SElliott Hughes'codepage'
848*d5c9a868SElliott Hughes     Describes the DOS code page used for short filenames.  This is a
849*d5c9a868SElliott Hughes     number between 1 and 999.  By default, code page 850 is used.  The
850*d5c9a868SElliott Hughes     reason for this is because this code page contains most of the
851*d5c9a868SElliott Hughes     characters that are also available in ISO-Latin-1.  You may also
852*d5c9a868SElliott Hughes     specify a global code page for all drives by using the global
853*d5c9a868SElliott Hughes     'default_codepage' parameter (outside of any drive description).
854*d5c9a868SElliott Hughes     This parameters exists starting at version 4.0.0
855*d5c9a868SElliott Hughes
856*d5c9a868SElliott Hughes'data_map'
857*d5c9a868SElliott Hughes     Remaps data from image file.  This is useful for image files which
858*d5c9a868SElliott Hughes     might need additional zero-filled sectors to be inserted.  Such is
859*d5c9a868SElliott Hughes     the case for instance for IBM 3174 floppy images.  These images
860*d5c9a868SElliott Hughes     represent floppy disks with fewer sectors on their first cylinder.
861*d5c9a868SElliott Hughes     These missing sectors are not stored in the image, but are still
862*d5c9a868SElliott Hughes     counted in the filesystem layout.  The data_map allows to fake
863*d5c9a868SElliott Hughes     these missing sectors for the upper layers of mtools.  A data_map
864*d5c9a868SElliott Hughes     is a comma-separated sequence of source type and size.  Source type
865*d5c9a868SElliott Hughes     may be 'zero' for zero-filled sectors created by map, 'skip' for
866*d5c9a868SElliott Hughes     data in raw image to be ignored (skipped), and nothing for data to
867*d5c9a868SElliott Hughes     be used as is (copied) from the raw image.  Datamap is
868*d5c9a868SElliott Hughes     automatically complemented by an implicit last element of data to
869*d5c9a868SElliott Hughes     be used as is from current offset to end of file.  Each size is a
870*d5c9a868SElliott Hughes     number followed by a unit: 's' for a 512 byte sector, 'K' for
871*d5c9a868SElliott Hughes     Kbytes, 'M' for megabytes, 'G' for gigabytes, and nothing for
872*d5c9a868SElliott Hughes     single bytes.
873*d5c9a868SElliott Hughes
874*d5c9a868SElliott Hughes     Example:
875*d5c9a868SElliott Hughes
876*d5c9a868SElliott Hughes     'data_map=1s,zero31s,28s,skip1s' would be a map for use with IBM
877*d5c9a868SElliott Hughes     3174 floppy images.  First sector ('1s', boot sector) is used as
878*d5c9a868SElliott Hughes     is.  Then follow 31 fake zero-filled sectors ('zero31s'), then the
879*d5c9a868SElliott Hughes     next 28 sectors from image ('28s') are used as is (they contain FAT
880*d5c9a868SElliott Hughes     and root directory), then one sector from image is skipped
881*d5c9a868SElliott Hughes     ('skip1s'), and finally the rest of image is used as is (implicit)
882*d5c9a868SElliott Hughes
883*d5c9a868SElliott Hughes'precmd'
884*d5c9a868SElliott Hughes     On some variants of Solaris, it is necessary to call 'volcheck -v'
885*d5c9a868SElliott Hughes     before opening a floppy device, in order for the system to notice
886*d5c9a868SElliott Hughes     that there is indeed a disk in the drive.  'precmd="volcheck -v"'
887*d5c9a868SElliott Hughes     in the drive clause establishes the desired behavior.
888*d5c9a868SElliott Hughes
889*d5c9a868SElliott Hughes'blocksize'
890*d5c9a868SElliott Hughes     This parameter represents a default block size to be always used on
891*d5c9a868SElliott Hughes     this device.  All I/O is done with multiples of this block size,
892*d5c9a868SElliott Hughes     independently of the sector size registered in the file system's
893*d5c9a868SElliott Hughes     boot sector.  This is useful for character devices whose sector
894*d5c9a868SElliott Hughes     size is not 512, such as for example CD-ROM drives on Solaris.
895*d5c9a868SElliott Hughes
896*d5c9a868SElliott Hughes   Only the 'file' variable is mandatory.  The other parameters may be
897*d5c9a868SElliott Hughesleft out.  In that case a default value or an auto-detected value is
898*d5c9a868SElliott Hughesused.
899*d5c9a868SElliott Hughes
900*d5c9a868SElliott Hughes
901*d5c9a868SElliott HughesFile: mtools.info,  Node: miscellaneous flags,  Next: multiple descriptions,  Prev: miscellaneous variables,  Up: per drive variables
902*d5c9a868SElliott Hughes
903*d5c9a868SElliott Hughes3.5.6 General Purpose Drive Flags
904*d5c9a868SElliott Hughes---------------------------------
905*d5c9a868SElliott Hughes
906*d5c9a868SElliott HughesA flag can either be set to 1 (enabled) or 0 (disabled).  If the value
907*d5c9a868SElliott Hughesis omitted, it is enabled.  For example, 'scsi' is equivalent to
908*d5c9a868SElliott Hughes'scsi=1'
909*d5c9a868SElliott Hughes
910*d5c9a868SElliott Hughes'nolock'
911*d5c9a868SElliott Hughes     Instruct mtools to not use locking on this drive.  This is needed
912*d5c9a868SElliott Hughes     on systems with buggy locking semantics.  However, enabling this
913*d5c9a868SElliott Hughes     makes operation less safe in cases where several users may access
914*d5c9a868SElliott Hughes     the same drive at the same time.
915*d5c9a868SElliott Hughes
916*d5c9a868SElliott Hughes'scsi'
917*d5c9a868SElliott Hughes     When set to 1, this option tells mtools to use raw SCSI I/O instead
918*d5c9a868SElliott Hughes     of the standard read/write calls to access the device.  Currently,
919*d5c9a868SElliott Hughes     this is supported on HP-UX, Solaris and SunOS. This is needed
920*d5c9a868SElliott Hughes     because on some architectures, such as SunOS or Solaris, PC media
921*d5c9a868SElliott Hughes     can't be accessed using the 'read' and 'write' system calls,
922*d5c9a868SElliott Hughes     because the OS expects them to contain a Sun specific "disk label".
923*d5c9a868SElliott Hughes
924*d5c9a868SElliott Hughes     As raw SCSI access always uses the whole device, you need to
925*d5c9a868SElliott Hughes     specify the "partition" flag in addition
926*d5c9a868SElliott Hughes
927*d5c9a868SElliott Hughes     On some architectures, such as Solaris, mtools needs root
928*d5c9a868SElliott Hughes     privileges to be able to use the 'scsi' option.  Thus mtools should
929*d5c9a868SElliott Hughes     be installed setuid root on Solaris if you want to access Zip/Jaz
930*d5c9a868SElliott Hughes     drives.  Thus, if the 'scsi' flag is given, 'privileged' is
931*d5c9a868SElliott Hughes     automatically implied, unless explicitly disabled by 'privileged=0'
932*d5c9a868SElliott Hughes
933*d5c9a868SElliott Hughes     Mtools uses its root privileges to open the device, and to issue
934*d5c9a868SElliott Hughes     the actual SCSI I/O calls.  Moreover, root privileges are only used
935*d5c9a868SElliott Hughes     for drives described in a system-wide configuration file such as
936*d5c9a868SElliott Hughes     '/etc/mtools.conf', and not for those described in '~/.mtoolsrc' or
937*d5c9a868SElliott Hughes     '$MTOOLSRC'.
938*d5c9a868SElliott Hughes
939*d5c9a868SElliott Hughes'privileged'
940*d5c9a868SElliott Hughes     When set to 1, this instructs mtools to use its setuid and setgid
941*d5c9a868SElliott Hughes     privileges for opening the given drive.  This option is only valid
942*d5c9a868SElliott Hughes     for drives described in the system-wide configuration files (such
943*d5c9a868SElliott Hughes     as '/etc/mtools.conf', not '~/.mtoolsrc' or '$MTOOLSRC').
944*d5c9a868SElliott Hughes     Obviously, this option is also a no op if mtools is not installed
945*d5c9a868SElliott Hughes     setuid or setgid.  This option is implied by 'scsi=1', but again
946*d5c9a868SElliott Hughes     only for drives defined in system-wide configuration files.
947*d5c9a868SElliott Hughes     Privileged may also be set explicitly to 0, in order to tell mtools
948*d5c9a868SElliott Hughes     not to use its privileges for a given drive even if 'scsi=1' is
949*d5c9a868SElliott Hughes     set.
950*d5c9a868SElliott Hughes
951*d5c9a868SElliott Hughes     Mtools only needs to be installed setuid if you use the
952*d5c9a868SElliott Hughes     'privileged' or 'scsi' drive variables.  If you do not use these
953*d5c9a868SElliott Hughes     options, mtools works perfectly well even when not installed setuid
954*d5c9a868SElliott Hughes     root.
955*d5c9a868SElliott Hughes
956*d5c9a868SElliott Hughes'vold'
957*d5c9a868SElliott Hughes
958*d5c9a868SElliott Hughes     Instructs mtools to interpret the device name as a vold identifier
959*d5c9a868SElliott Hughes     rather than as a filename.  The vold identifier is translated into
960*d5c9a868SElliott Hughes     a real filename using the 'media_findname()' and
961*d5c9a868SElliott Hughes     'media_oldaliases()' functions of the 'volmgt' library.  This flag
962*d5c9a868SElliott Hughes     is only available if you configured mtools with the
963*d5c9a868SElliott Hughes     '--enable-new-vold' option before compilation.
964*d5c9a868SElliott Hughes
965*d5c9a868SElliott Hughes'swap'
966*d5c9a868SElliott Hughes
967*d5c9a868SElliott Hughes     Consider the media as a word-swapped Atari disk.
968*d5c9a868SElliott Hughes
969*d5c9a868SElliott Hughes'use_xdf'
970*d5c9a868SElliott Hughes     If this is set to a non-zero value, mtools also tries to access
971*d5c9a868SElliott Hughes     this disk as an XDF disk.  XDF is a high capacity format used by
972*d5c9a868SElliott Hughes     OS/2.  This is off by default.  *Note XDF::, for more details.
973*d5c9a868SElliott Hughes'mformat_only'
974*d5c9a868SElliott Hughes     Tells mtools to use the geometry for this drive only for
975*d5c9a868SElliott Hughes     mformatting and not for filtering.
976*d5c9a868SElliott Hughes
977*d5c9a868SElliott Hughes'filter'
978*d5c9a868SElliott Hughes     Tells mtools to use the geometry for this drive both for
979*d5c9a868SElliott Hughes     mformatting and filtering.
980*d5c9a868SElliott Hughes
981*d5c9a868SElliott Hughes'remote'
982*d5c9a868SElliott Hughes     Tells mtools to connect to floppyd (*note floppyd::).
983*d5c9a868SElliott Hughes
984*d5c9a868SElliott Hughes
985*d5c9a868SElliott HughesFile: mtools.info,  Node: multiple descriptions,  Prev: miscellaneous flags,  Up: per drive variables
986*d5c9a868SElliott Hughes
987*d5c9a868SElliott Hughes3.5.7 Supplying multiple descriptions for a drive
988*d5c9a868SElliott Hughes-------------------------------------------------
989*d5c9a868SElliott Hughes
990*d5c9a868SElliott HughesIt is possible to supply multiple descriptions for a drive.  In that
991*d5c9a868SElliott Hughescase, the descriptions are tried in order until one is found that fits.
992*d5c9a868SElliott HughesDescriptions may fail for several reasons:
993*d5c9a868SElliott Hughes
994*d5c9a868SElliott Hughes  1. because the geometry is not appropriate,
995*d5c9a868SElliott Hughes  2. because there is no disk in the drive,
996*d5c9a868SElliott Hughes  3. or because of other problems.
997*d5c9a868SElliott Hughes
998*d5c9a868SElliott Hughes   Multiple definitions are useful when using physical devices which are
999*d5c9a868SElliott Hughesonly able to support one single disk geometry.  Example:
1000*d5c9a868SElliott Hughes       drive a: file="/dev/fd0H1440" 1.44m
1001*d5c9a868SElliott Hughes       drive a: file="/dev/fd0H720" 720k
1002*d5c9a868SElliott Hughes
1003*d5c9a868SElliott Hughes   This instructs mtools to use /dev/fd0H1440 for 1.44m (high density)
1004*d5c9a868SElliott Hughesdisks and /dev/fd0H720 for 720k (double density) disks.  On Linux, this
1005*d5c9a868SElliott Hughesfeature is not really needed, as the /dev/fd0 device is able to handle
1006*d5c9a868SElliott Hughesany geometry.
1007*d5c9a868SElliott Hughes
1008*d5c9a868SElliott Hughes   You may also use multiple drive descriptions to access both of your
1009*d5c9a868SElliott Hughesphysical drives through one drive letter:
1010*d5c9a868SElliott Hughes
1011*d5c9a868SElliott Hughes       drive z: file="/dev/fd0"
1012*d5c9a868SElliott Hughes       drive z: file="/dev/fd1"
1013*d5c9a868SElliott Hughes
1014*d5c9a868SElliott Hughes   With this description, 'mdir z:' accesses your first physical drive
1015*d5c9a868SElliott Hughesif it contains a disk.  If the first drive doesn't contain a disk,
1016*d5c9a868SElliott Hughesmtools checks the second drive.
1017*d5c9a868SElliott Hughes
1018*d5c9a868SElliott Hughes   When using multiple configuration files, drive descriptions in the
1019*d5c9a868SElliott Hughesfiles parsed last override descriptions for the same drive in earlier
1020*d5c9a868SElliott Hughesfiles.  In order to avoid this, use the 'drive+' or '+drive' keywords
1021*d5c9a868SElliott Hughesinstead of 'drive'.  The first adds a description to the end of the list
1022*d5c9a868SElliott Hughes(i.e.  it will be tried last), and the first adds it to the start of the
1023*d5c9a868SElliott Hugheslist.
1024*d5c9a868SElliott Hughes
1025*d5c9a868SElliott Hughes
1026*d5c9a868SElliott HughesFile: mtools.info,  Node: parsing order,  Next: old style configuration,  Prev: per drive variables,  Up: Configuration
1027*d5c9a868SElliott Hughes
1028*d5c9a868SElliott Hughes3.6 Location of configuration files and parsing order
1029*d5c9a868SElliott Hughes=====================================================
1030*d5c9a868SElliott Hughes
1031*d5c9a868SElliott HughesThe configuration files are parsed in the following order:
1032*d5c9a868SElliott Hughes  1. compiled-in defaults
1033*d5c9a868SElliott Hughes  2. '/etc/mtools.conf'
1034*d5c9a868SElliott Hughes  3. '~/.mtoolsrc'.
1035*d5c9a868SElliott Hughes  4. '$MTOOLSRC' (file pointed by the 'MTOOLSRC' environmental variable)
1036*d5c9a868SElliott Hughes
1037*d5c9a868SElliott Hughes   Options described in the later files override those described in the
1038*d5c9a868SElliott Hughesearlier files.  Drives defined in earlier files persist if they are not
1039*d5c9a868SElliott Hughesoverridden in the later files.  For instance, drives A and B may be
1040*d5c9a868SElliott Hughesdefined in '/etc/mtools.conf' and drives C and D may be defined in
1041*d5c9a868SElliott Hughes'~/.mtoolsrc' However, if '~/.mtoolsrc' also defines drive A, this new
1042*d5c9a868SElliott Hughesdescription would override the description of drive A in
1043*d5c9a868SElliott Hughes'/etc/mtools.conf' instead of adding to it.  If you want to add a new
1044*d5c9a868SElliott Hughesdescription to a drive already described in an earlier file, you need to
1045*d5c9a868SElliott Hughesuse either the '+drive' or 'drive+' keyword.
1046*d5c9a868SElliott Hughes
1047*d5c9a868SElliott Hughes
1048*d5c9a868SElliott HughesFile: mtools.info,  Node: old style configuration,  Prev: parsing order,  Up: Configuration
1049*d5c9a868SElliott Hughes
1050*d5c9a868SElliott Hughes3.7 Backwards compatibility with old configuration file syntax
1051*d5c9a868SElliott Hughes==============================================================
1052*d5c9a868SElliott Hughes
1053*d5c9a868SElliott HughesThe syntax described herein is new for version 'mtools-3.0'.  The old
1054*d5c9a868SElliott Hughesline-oriented syntax is still supported.  Each line beginning with a
1055*d5c9a868SElliott Hughessingle letter is considered to be a drive description using the old
1056*d5c9a868SElliott Hughessyntax.  Old style and new style drive sections may be mixed within the
1057*d5c9a868SElliott Hughessame configuration file, in order to make upgrading easier.  Support for
1058*d5c9a868SElliott Hughesthe old syntax will be phased out eventually, and in order to discourage
1059*d5c9a868SElliott Hughesits use, I purposefully omit its description here.
1060*d5c9a868SElliott Hughes
1061*d5c9a868SElliott Hughes
1062*d5c9a868SElliott HughesFile: mtools.info,  Node: Commands,  Next: Compiling mtools,  Prev: Configuration,  Up: Top
1063*d5c9a868SElliott Hughes
1064*d5c9a868SElliott Hughes4 Command list
1065*d5c9a868SElliott Hughes**************
1066*d5c9a868SElliott Hughes
1067*d5c9a868SElliott HughesThis section describes the available mtools commands, and the command
1068*d5c9a868SElliott Hughesline parameters that each of them accepts.  Options which are common to
1069*d5c9a868SElliott Hughesall mtools commands are not described here, *note arguments:: for a
1070*d5c9a868SElliott Hughesdescription of those.
1071*d5c9a868SElliott Hughes
1072*d5c9a868SElliott Hughes* Menu:
1073*d5c9a868SElliott Hughes
1074*d5c9a868SElliott Hughes* floppyd::           floppy daemon to run on your X server box
1075*d5c9a868SElliott Hughes* floppyd_installtest:: small utility to check for the presence of floppyd
1076*d5c9a868SElliott Hughes* mattrib::           change MS-DOS file attribute flags
1077*d5c9a868SElliott Hughes* mbadblocks::        tests a floppy disk, and marks the bad blocks in the FAT
1078*d5c9a868SElliott Hughes* mcat::              same as cat. Only useful with floppyd.
1079*d5c9a868SElliott Hughes* mcd::               change MS-DOS directory
1080*d5c9a868SElliott Hughes* mcopy::             copy MS-DOS files to/from Unix
1081*d5c9a868SElliott Hughes* mdel::              delete an MS-DOS file
1082*d5c9a868SElliott Hughes* mdeltree::          recursively delete an MS-DOS directory
1083*d5c9a868SElliott Hughes* mdir::              display an MS-DOS directory
1084*d5c9a868SElliott Hughes* mdu::               list space occupied by directory and its contents
1085*d5c9a868SElliott Hughes* mformat::           add an MS-DOS file system to a low-level formatted floppy disk
1086*d5c9a868SElliott Hughes* minfo::             get information about an MS-DOS file system.
1087*d5c9a868SElliott Hughes* mlabel::            make an MS-DOS volume label
1088*d5c9a868SElliott Hughes* mkmanifest::        makes a list of short name equivalents
1089*d5c9a868SElliott Hughes* mmd::               make an MS-DOS subdirectory
1090*d5c9a868SElliott Hughes* mmount::            mount an MS-DOS disk
1091*d5c9a868SElliott Hughes* mpartition::        create an MS-DOS as a partition
1092*d5c9a868SElliott Hughes* mrd::               remove an MS-DOS subdirectory
1093*d5c9a868SElliott Hughes* mmove::             move or rename an MS-DOS file or subdirectory
1094*d5c9a868SElliott Hughes* mren::              rename an existing MS-DOS file
1095*d5c9a868SElliott Hughes* mshortname::        shows the short name of a file
1096*d5c9a868SElliott Hughes* mshowfat::          shows the FAT map of a file
1097*d5c9a868SElliott Hughes* mtoolstest::        tests and displays the configuration
1098*d5c9a868SElliott Hughes* mtype::             display contents of an MS-DOS file
1099*d5c9a868SElliott Hughes* mzip::              zip disk specific commands
1100*d5c9a868SElliott Hughes
1101*d5c9a868SElliott Hughes
1102*d5c9a868SElliott HughesFile: mtools.info,  Node: floppyd,  Next: floppyd_installtest,  Prev: Commands,  Up: Commands
1103*d5c9a868SElliott Hughes
1104*d5c9a868SElliott Hughes4.1 Floppyd
1105*d5c9a868SElliott Hughes===========
1106*d5c9a868SElliott Hughes
1107*d5c9a868SElliott Hughes'Floppyd' is used as a server to grant access to the floppy drive to
1108*d5c9a868SElliott Hughesclients running on a remote machine, just as an X server grants access
1109*d5c9a868SElliott Hughesto the display to remote clients.  It has the following syntax:
1110*d5c9a868SElliott Hughes
1111*d5c9a868SElliott Hughes   'floppyd' ['-d'] ['-l'] ['-s' PORT] ['-r' USER] ['-b' IPADDR] ['-x'
1112*d5c9a868SElliott HughesDISPLAY] DEVICENAMES
1113*d5c9a868SElliott Hughes
1114*d5c9a868SElliott Hughes   'floppyd' is always associated with an X server.  It runs on the same
1115*d5c9a868SElliott Hughesmachine as its X server, and listens on port 5703 and above.
1116*d5c9a868SElliott Hughes
1117*d5c9a868SElliott Hughes4.1.1 Authentication
1118*d5c9a868SElliott Hughes--------------------
1119*d5c9a868SElliott Hughes
1120*d5c9a868SElliott Hughes'floppyd' authenticates remote clients using the 'Xauthority' protocol.
1121*d5c9a868SElliott HughesXhost authentication is not supported.  Each floppyd is associated with
1122*d5c9a868SElliott Hughesan X server.  When a remote client attempts to connect to floppyd, it
1123*d5c9a868SElliott Hughessends floppyd the X authority record corresponding to floppyd's X
1124*d5c9a868SElliott Hughesserver.  Floppyd in turn then tries to open up a connection to the X
1125*d5c9a868SElliott Hughesserver in order to verify the authenticity of the xauth record.  If the
1126*d5c9a868SElliott Hughesconnection to the X server succeeds, the client is granted access.
1127*d5c9a868SElliott Hughes'DISPLAY'.
1128*d5c9a868SElliott Hughes
1129*d5c9a868SElliott Hughes   *Caution*: In order to make authentication work correctly, the local
1130*d5c9a868SElliott Hugheshost should *not* be listed in the 'xhost' list of allowed hosts.
1131*d5c9a868SElliott HughesIndeed, hosts listed in 'xhost' do not need a correct 'Xauthority'
1132*d5c9a868SElliott Hughescookie to connect to the X server.  As 'floppyd' runs on the same host
1133*d5c9a868SElliott Hughesas the X server, all its probe connection would succeed even for clients
1134*d5c9a868SElliott Hugheswho supplied a bad cookie.  This means that your floppy drive would be
1135*d5c9a868SElliott Hughesopen to the world, i.e.  a huge security hole.  If your X server does
1136*d5c9a868SElliott Hughesnot allow you to remove 'localhost:0' and ':0' from the 'xhost' list,
1137*d5c9a868SElliott Hughesyou can prevent floppyd from probing those display names with the '-l'
1138*d5c9a868SElliott Hughesoption.
1139*d5c9a868SElliott Hughes
1140*d5c9a868SElliott Hughes4.1.2 Command line options
1141*d5c9a868SElliott Hughes--------------------------
1142*d5c9a868SElliott Hughes
1143*d5c9a868SElliott Hughes'd'
1144*d5c9a868SElliott Hughes     Daemon mode.  Floppyd runs its own server loop.  Do not supply this
1145*d5c9a868SElliott Hughes     if you start floppyd from 'inetd.conf'
1146*d5c9a868SElliott Hughes's PORT'
1147*d5c9a868SElliott Hughes     Port number for daemon mode.  Default is 5703 + DISPLAYNUMBER.
1148*d5c9a868SElliott Hughes     This flag implies daemon mode.  For example, for display
1149*d5c9a868SElliott Hughes     'hitchhiker:5', the port would be 5708.
1150*d5c9a868SElliott Hughes'b IPADDR'
1151*d5c9a868SElliott Hughes     Bind address (for multi homed hosts).  This flag implies daemon
1152*d5c9a868SElliott Hughes     mode
1153*d5c9a868SElliott Hughes'r USER'
1154*d5c9a868SElliott Hughes     Run the server under as the given user
1155*d5c9a868SElliott Hughes'x DISPLAY'
1156*d5c9a868SElliott Hughes     X display to use for authentication.  By default, this is taken
1157*d5c9a868SElliott Hughes     from the 'DISPLAY' variable.  If neither the 'x' attribute is
1158*d5c9a868SElliott Hughes     present nor 'DISPLAY' is set, floppyd uses ':0.0'.
1159*d5c9a868SElliott Hughes
1160*d5c9a868SElliott Hughes   DEVICENAMES is a list of device nodes to be opened.  Default is
1161*d5c9a868SElliott Hughes'/dev/fd0'.  Multiple devices are only supported on mtools versions
1162*d5c9a868SElliott Hughesnewer than 3.9.11.
1163*d5c9a868SElliott Hughes
1164*d5c9a868SElliott Hughes4.1.3 Connecting to floppyd
1165*d5c9a868SElliott Hughes---------------------------
1166*d5c9a868SElliott Hughes
1167*d5c9a868SElliott HughesIn order to use floppyd, add the flag 'remote' to the device description
1168*d5c9a868SElliott Hughesin your '~/.mtoolsrc' file.  If the flag 'remote' is given, the 'file'
1169*d5c9a868SElliott Hughesparameter of the device description is taken to be a remote address.
1170*d5c9a868SElliott HughesIt's format is the following:
1171*d5c9a868SElliott HughesHOSTNAME':'DISPLAYNUMBER['/'[BASEPORT]['/'DRIVE]].  When using this
1172*d5c9a868SElliott Hughesentry, mtools connects to port BASEPORT+DISPLAYNUMBER at HOSTNAME.  By
1173*d5c9a868SElliott Hughesdefault BASEPORT is 5703.  The drive parameter is to distinguish among
1174*d5c9a868SElliott Hughesmultiple drives associated with a single display (only mtools versions
1175*d5c9a868SElliott Hughesmore recent than 3.9.11)
1176*d5c9a868SElliott Hughes
1177*d5c9a868SElliott Hughes4.1.4 Examples:
1178*d5c9a868SElliott Hughes---------------
1179*d5c9a868SElliott Hughes
1180*d5c9a868SElliott HughesThe following starts a floppy daemon giving access to '/dev/fd0',
1181*d5c9a868SElliott Hugheslistening on the default port 5703, tied to the default X servers:
1182*d5c9a868SElliott Hughes
1183*d5c9a868SElliott Hughes     floppyd -d /dev/fd0
1184*d5c9a868SElliott Hughes
1185*d5c9a868SElliott Hughes   Each of the following starts a floppy daemon giving access to
1186*d5c9a868SElliott Hughes'/dev/fd1', tied to the :1 local X servers, and listening on port 5704.
1187*d5c9a868SElliott HughesWe assume that the local host is named 'hitchhiker'.
1188*d5c9a868SElliott Hughes
1189*d5c9a868SElliott Hughes     floppyd -d /dev/fd0
1190*d5c9a868SElliott Hughes     floppyd -d -x :1 -p 5704 /dev/fd0
1191*d5c9a868SElliott Hughes
1192*d5c9a868SElliott Hughes   If you want to start floppyd by 'inetd' instead of running it as a
1193*d5c9a868SElliott Hughesdaemon, insert the following lines into '/etc/services':
1194*d5c9a868SElliott Hughes     # floppy daemon
1195*d5c9a868SElliott Hughes     floppyd-0    5703/tcp    # floppy daemon for X server :0
1196*d5c9a868SElliott Hughes     floppyd-1    5704/tcp    # floppy daemon for X server :1
1197*d5c9a868SElliott Hughes
1198*d5c9a868SElliott Hughes   And insert the following into '/etc/inetd.conf' (assuming that you
1199*d5c9a868SElliott Hugheshave defined a user named floppy in your '/etc/passwd'):
1200*d5c9a868SElliott Hughes
1201*d5c9a868SElliott Hughes     # floppy daemon
1202*d5c9a868SElliott Hughes     floppyd-0 stream  tcp  wait  floppy  /usr/sbin/floppyd floppyd /dev/fd0
1203*d5c9a868SElliott Hughes     floppyd-1 stream  tcp  wait  floppy  /usr/sbin/floppyd floppyd -x :1 /dev/fd0
1204*d5c9a868SElliott Hughes
1205*d5c9a868SElliott Hughes   Note that you need to supply the X display names for the second
1206*d5c9a868SElliott Hughesfloppyd.  This is because the port is opened by inetd.conf, and hence
1207*d5c9a868SElliott Hughesfloppyd cannot know its number to interfere the display number.
1208*d5c9a868SElliott Hughes
1209*d5c9a868SElliott Hughes   On the client side, insert the following into your '~/.mtoolsrc' to
1210*d5c9a868SElliott Hughesdefine a drive letter accessing floppy drive in your X terminal:
1211*d5c9a868SElliott Hughes     drive x: file="$DISPLAY" remote
1212*d5c9a868SElliott Hughes
1213*d5c9a868SElliott Hughes   If your X terminal has more than one drive, you may access the
1214*d5c9a868SElliott Hughesadditional drives as follows:
1215*d5c9a868SElliott Hughes     drive y: file="$DISPLAY//1" remote
1216*d5c9a868SElliott Hughes     drive z: file="$DISPLAY//2" remote
1217*d5c9a868SElliott Hughes
1218*d5c9a868SElliott Hughes
1219*d5c9a868SElliott HughesFile: mtools.info,  Node: floppyd_installtest,  Next: mattrib,  Prev: floppyd,  Up: Commands
1220*d5c9a868SElliott Hughes
1221*d5c9a868SElliott Hughes4.2 Floppyd_installtest
1222*d5c9a868SElliott Hughes=======================
1223*d5c9a868SElliott Hughes
1224*d5c9a868SElliott Hughes'Floppyd_installtest' is used to check for the presence of a running
1225*d5c9a868SElliott Hughesfloppyd daemon.  This is useful, if you have a small front-end script to
1226*d5c9a868SElliott Hughesmtools, which decides whether to use floppyd or not.
1227*d5c9a868SElliott Hughes
1228*d5c9a868SElliott Hughes   'floppyd_installtest' ['-f'] Connect-String
1229*d5c9a868SElliott Hughes
1230*d5c9a868SElliott Hughes   If the '-f' option is specified, 'floppyd_installtest' does a full
1231*d5c9a868SElliott HughesX-Cookie authentication and complains if this does not work.
1232*d5c9a868SElliott Hughes
1233*d5c9a868SElliott Hughes   The connect-String has the format described in the floppyd-section:
1234*d5c9a868SElliott HughesHOSTNAME':'DISPLAYNUMBER['/'BASEPORT]
1235*d5c9a868SElliott Hughes
1236*d5c9a868SElliott Hughes
1237*d5c9a868SElliott HughesFile: mtools.info,  Node: mattrib,  Next: mbadblocks,  Prev: floppyd_installtest,  Up: Commands
1238*d5c9a868SElliott Hughes
1239*d5c9a868SElliott Hughes4.3 Mattrib
1240*d5c9a868SElliott Hughes===========
1241*d5c9a868SElliott Hughes
1242*d5c9a868SElliott Hughes'Mattrib' is used to change MS-DOS file attribute flags.  It has the
1243*d5c9a868SElliott Hughesfollowing syntax:
1244*d5c9a868SElliott Hughes
1245*d5c9a868SElliott Hughes   'mattrib' ['-a|+a'] ['-h|+h'] ['-r|+r'] ['-s|+s'] ['-/'] ['-p']
1246*d5c9a868SElliott Hughes['-X'] MSDOSFILE [ MSDOSFILES ... ]
1247*d5c9a868SElliott Hughes
1248*d5c9a868SElliott Hughes   'Mattrib' adds attribute flags to an MS-DOS file (with the ''+''
1249*d5c9a868SElliott Hughesoperator) or remove attribute flags (with the ''-'' operator).
1250*d5c9a868SElliott Hughes
1251*d5c9a868SElliott Hughes   'Mattrib' supports the following attribute bits:
1252*d5c9a868SElliott Hughes
1253*d5c9a868SElliott Hughes'a'
1254*d5c9a868SElliott Hughes     Archive bit.  Used by some backup programs to indicate a new file.
1255*d5c9a868SElliott Hughes'r'
1256*d5c9a868SElliott Hughes     Read-only bit.  Used to indicate a read-only file.  Files with this
1257*d5c9a868SElliott Hughes     bit set cannot be erased by 'DEL' nor modified.
1258*d5c9a868SElliott Hughes's'
1259*d5c9a868SElliott Hughes     System bit.  Used by MS-DOS to indicate a operating system file.
1260*d5c9a868SElliott Hughes'h'
1261*d5c9a868SElliott Hughes     Hidden bit.  Used to make files hidden from 'DIR'.
1262*d5c9a868SElliott Hughes
1263*d5c9a868SElliott Hughes   'Mattrib' supports the following command line flags:
1264*d5c9a868SElliott Hughes'/'
1265*d5c9a868SElliott Hughes     Recursive.  Recursively list the attributes of the files in the
1266*d5c9a868SElliott Hughes     subdirectories.
1267*d5c9a868SElliott Hughes'X'
1268*d5c9a868SElliott Hughes     Concise.  Prints the attributes without any whitespace padding.  If
1269*d5c9a868SElliott Hughes     neither the "/" option is given, nor the MSDOSFILE contains a
1270*d5c9a868SElliott Hughes     wildcard, and there is only one MS-DOS file parameter on the
1271*d5c9a868SElliott Hughes     command line, only the attribute is printed, and not the filename.
1272*d5c9a868SElliott Hughes     This option is convenient for scripts
1273*d5c9a868SElliott Hughes'p'
1274*d5c9a868SElliott Hughes     Replay mode.  Outputs a series of 'mformat' commands that will
1275*d5c9a868SElliott Hughes     reproduce the current situation, starting from a situation as left
1276*d5c9a868SElliott Hughes     by untarring the MS-DOS file system.  Commands are only output for
1277*d5c9a868SElliott Hughes     attribute settings that differ from the default (archive bit set
1278*d5c9a868SElliott Hughes     for files, unset for directories).  This option is intended to be
1279*d5c9a868SElliott Hughes     used in addition to tar.  The 'readonly' attribute is not taken
1280*d5c9a868SElliott Hughes     into account, as tar can set that one itself.
1281*d5c9a868SElliott Hughes
1282*d5c9a868SElliott Hughes
1283*d5c9a868SElliott HughesFile: mtools.info,  Node: mbadblocks,  Next: mcat,  Prev: mattrib,  Up: Commands
1284*d5c9a868SElliott Hughes
1285*d5c9a868SElliott Hughes4.4 Mbadblocks
1286*d5c9a868SElliott Hughes==============
1287*d5c9a868SElliott Hughes
1288*d5c9a868SElliott HughesThe 'mbadblocks' command is used to mark some clusters on an MS-DOS
1289*d5c9a868SElliott Hughesfilesystem bad.  It has the following syntax:
1290*d5c9a868SElliott Hughes
1291*d5c9a868SElliott Hughes   'mbadblocks' ['-s' SECTORLIST|'-c' CLUSTERLIST|-w] DRIVE':'
1292*d5c9a868SElliott Hughes
1293*d5c9a868SElliott Hughes   If no command line flags are supplied, 'Mbadblocks' scans an MS-DOS
1294*d5c9a868SElliott Hughesfilesystem for bad blocks by simply trying to read them and flag them if
1295*d5c9a868SElliott Hughesread fails.  All blocks that are unused are scanned, and if detected bad
1296*d5c9a868SElliott Hughesare marked as such in the FAT.
1297*d5c9a868SElliott Hughes
1298*d5c9a868SElliott Hughes   This command is intended to be used right after 'mformat'.  It is not
1299*d5c9a868SElliott Hughesintended to salvage data from bad disks.
1300*d5c9a868SElliott Hughes
1301*d5c9a868SElliott Hughes4.4.1 Command line options
1302*d5c9a868SElliott Hughes--------------------------
1303*d5c9a868SElliott Hughes
1304*d5c9a868SElliott Hughes'c FILE'
1305*d5c9a868SElliott Hughes     Use a list of bad clusters, rather than scanning for bad clusters
1306*d5c9a868SElliott Hughes     itself.
1307*d5c9a868SElliott Hughes's FILE'
1308*d5c9a868SElliott Hughes     Use a list of bad sectors (counted from beginning of filesystem),
1309*d5c9a868SElliott Hughes     rather than trying for bad clusters itself.
1310*d5c9a868SElliott Hughes'w'
1311*d5c9a868SElliott Hughes     Write a random pattern to each cluster, then read it back and flag
1312*d5c9a868SElliott Hughes     cluster as bad if mismatch.  Only free clusters are tested in such
1313*d5c9a868SElliott Hughes     a way, so any file data is preserved.
1314*d5c9a868SElliott Hughes
1315*d5c9a868SElliott Hughes4.4.2 Bugs
1316*d5c9a868SElliott Hughes----------
1317*d5c9a868SElliott Hughes
1318*d5c9a868SElliott Hughes'Mbadblocks' should (but doesn't yet :-( ) also try to salvage bad
1319*d5c9a868SElliott Hughesblocks which are in use by reading them repeatedly, and then mark them
1320*d5c9a868SElliott Hughesbad.
1321*d5c9a868SElliott Hughes
1322*d5c9a868SElliott Hughes
1323*d5c9a868SElliott HughesFile: mtools.info,  Node: mcat,  Next: mcd,  Prev: mbadblocks,  Up: Commands
1324*d5c9a868SElliott Hughes
1325*d5c9a868SElliott Hughes4.5 Mcat
1326*d5c9a868SElliott Hughes========
1327*d5c9a868SElliott Hughes
1328*d5c9a868SElliott HughesThe 'mcat' command is used to copy an entire disk image from or to the
1329*d5c9a868SElliott Hughesfloppy device.  It uses the following syntax:
1330*d5c9a868SElliott Hughes
1331*d5c9a868SElliott Hughes   'mcat' ['-w'] DRIVE':'
1332*d5c9a868SElliott Hughes
1333*d5c9a868SElliott Hughes   'Mcat' performs the same task as the Unix 'cat' command.  It is
1334*d5c9a868SElliott Hughesincluded into the mtools package, since 'cat' cannot access remote
1335*d5c9a868SElliott Hughesfloppy devices offered by the mtools floppy daemon.  Now it is possible
1336*d5c9a868SElliott Hughesto create boot floppies remotely.
1337*d5c9a868SElliott Hughes
1338*d5c9a868SElliott Hughes   The default operation is reading.  The output is written to stdout.
1339*d5c9a868SElliott Hughes
1340*d5c9a868SElliott Hughes   If the '-w' option is specified, mcat reads a disk-image from stdin
1341*d5c9a868SElliott Hughesand writes it to the given device.  *Use this carefully!*  Because of
1342*d5c9a868SElliott Hughesthe low-level nature of this command, it will happily destroy any data
1343*d5c9a868SElliott Hugheswritten before on the disk without warning!
1344*d5c9a868SElliott Hughes
1345*d5c9a868SElliott Hughes
1346*d5c9a868SElliott HughesFile: mtools.info,  Node: mcd,  Next: mcopy,  Prev: mcat,  Up: Commands
1347*d5c9a868SElliott Hughes
1348*d5c9a868SElliott Hughes4.6 Mcd
1349*d5c9a868SElliott Hughes=======
1350*d5c9a868SElliott Hughes
1351*d5c9a868SElliott HughesThe 'mcd' command is used to change the mtools working directory on the
1352*d5c9a868SElliott HughesMS-DOS disk.  It uses the following syntax:
1353*d5c9a868SElliott Hughes
1354*d5c9a868SElliott Hughes     mcd [MSDOSDIRECTORY]
1355*d5c9a868SElliott Hughes
1356*d5c9a868SElliott Hughes   Without arguments, 'mcd' reports the current device and working
1357*d5c9a868SElliott Hughesdirectory.  Otherwise, 'mcd' changes the current device and current
1358*d5c9a868SElliott Hughesworking directory relative to an MS-DOS file system.
1359*d5c9a868SElliott Hughes
1360*d5c9a868SElliott Hughes   The environmental variable 'MCWD' may be used to locate the file
1361*d5c9a868SElliott Hugheswhere the device and current working directory information is stored.
1362*d5c9a868SElliott HughesThe default is '$HOME/.mcwd'.  Information in this file is ignored if
1363*d5c9a868SElliott Hughesthe file is more than 6 hours old.
1364*d5c9a868SElliott Hughes
1365*d5c9a868SElliott Hughes   'Mcd' returns 0 on success or 1 on failure.
1366*d5c9a868SElliott Hughes
1367*d5c9a868SElliott Hughes   Unlike MS-DOS versions of 'CD', 'mcd' can be used to change to
1368*d5c9a868SElliott Hughesanother device.  It may be wise to remove old '.mcwd' files at logout.
1369*d5c9a868SElliott Hughes
1370*d5c9a868SElliott Hughes
1371*d5c9a868SElliott HughesFile: mtools.info,  Node: mcopy,  Next: mdel,  Prev: mcd,  Up: Commands
1372*d5c9a868SElliott Hughes
1373*d5c9a868SElliott Hughes4.7 Mcopy
1374*d5c9a868SElliott Hughes=========
1375*d5c9a868SElliott Hughes
1376*d5c9a868SElliott HughesThe 'mcopy' command is used to copy MS-DOS files to and from Unix.  It
1377*d5c9a868SElliott Hughesuses the following syntax:
1378*d5c9a868SElliott Hughes
1379*d5c9a868SElliott Hughes     mcopy [-bspanvmQT] [-D CLASH_OPTION] SOURCEFILE TARGETFILE
1380*d5c9a868SElliott Hughes     mcopy [-bspanvmQT] [-D CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY
1381*d5c9a868SElliott Hughes     mcopy [-tnvm] MSDOSSOURCEFILE
1382*d5c9a868SElliott Hughes
1383*d5c9a868SElliott Hughes   'Mcopy' copies the specified file to the named file, or copies
1384*d5c9a868SElliott Hughesmultiple files to the named directory.  The source and target can be
1385*d5c9a868SElliott Hugheseither MS-DOS or Unix files.
1386*d5c9a868SElliott Hughes
1387*d5c9a868SElliott Hughes   The use of a drive letter designation on the MS-DOS files, 'a:' for
1388*d5c9a868SElliott Hughesexample, determines the direction of the transfer.  A missing drive
1389*d5c9a868SElliott Hughesdesignation implies a Unix file whose path starts in the current
1390*d5c9a868SElliott Hughesdirectory.  If a source drive letter is specified with no attached file
1391*d5c9a868SElliott Hughesname (e.g.  'mcopy a: .'), all files are copied from that drive.
1392*d5c9a868SElliott Hughes
1393*d5c9a868SElliott Hughes   If only a single, MS-DOS source parameter is provided (e.g.  "mcopy
1394*d5c9a868SElliott Hughesa:foo.exe"), an implied destination of the current directory (''.'') is
1395*d5c9a868SElliott Hughesassumed.
1396*d5c9a868SElliott Hughes
1397*d5c9a868SElliott Hughes   A filename of ''-'' means standard input or standard output,
1398*d5c9a868SElliott Hughesdepending on its position on the command line.
1399*d5c9a868SElliott Hughes
1400*d5c9a868SElliott Hughes   'Mcopy' accepts the following command line options:
1401*d5c9a868SElliott Hughes
1402*d5c9a868SElliott Hughes't'
1403*d5c9a868SElliott Hughes     Text file transfer.  Mcopy translates incoming carriage return/line
1404*d5c9a868SElliott Hughes     feeds to line feeds when copying from MS-DOS to Unix, and
1405*d5c9a868SElliott Hughes     vice-versa when copying from Unix to MS-DOS.
1406*d5c9a868SElliott Hughes'b'
1407*d5c9a868SElliott Hughes     Batch mode.  Optimized for huge recursive copies, but less secure
1408*d5c9a868SElliott Hughes     if a crash happens during the copy.
1409*d5c9a868SElliott Hughes's'
1410*d5c9a868SElliott Hughes     Recursive copy.  Also copies directories and their contents
1411*d5c9a868SElliott Hughes'p'
1412*d5c9a868SElliott Hughes     Preserves the attributes of the copied files
1413*d5c9a868SElliott Hughes'Q'
1414*d5c9a868SElliott Hughes     When mcopying multiple files, quits as soon as one copy fails (for
1415*d5c9a868SElliott Hughes     example due to lacking storage space on the target disk)
1416*d5c9a868SElliott Hughes'a'
1417*d5c9a868SElliott Hughes     Text (ASCII) file transfer.  'ASCII' translates incoming carriage
1418*d5c9a868SElliott Hughes     return/line feeds to line feeds.
1419*d5c9a868SElliott Hughes'T'
1420*d5c9a868SElliott Hughes     Text (ASCII) file transfer with character set conversion.  Differs
1421*d5c9a868SElliott Hughes     from '-a' in the 'ASCII' also translates incoming PC-8 characters
1422*d5c9a868SElliott Hughes     to ISO-8859-1 equivalents as far as possible.  When reading DOS
1423*d5c9a868SElliott Hughes     files, untranslatable characters are replaced by ''#''; when
1424*d5c9a868SElliott Hughes     writing DOS files, untranslatable characters are replaced by ''.''.
1425*d5c9a868SElliott Hughes'n'
1426*d5c9a868SElliott Hughes     No confirmation when overwriting Unix files.  'ASCII' doesn't warn
1427*d5c9a868SElliott Hughes     the user when overwriting an existing Unix file.  If the target
1428*d5c9a868SElliott Hughes     file already exists, and the '-n' option is not in effect, 'mcopy'
1429*d5c9a868SElliott Hughes     asks whether to overwrite the file or to rename the new file (see
1430*d5c9a868SElliott Hughes     *note name clashes::) for details).  In order to switch off
1431*d5c9a868SElliott Hughes     confirmation for DOS files, use '-o'.
1432*d5c9a868SElliott Hughes'm'
1433*d5c9a868SElliott Hughes     Preserve the file modification time.
1434*d5c9a868SElliott Hughes'v'
1435*d5c9a868SElliott Hughes     Verbose.  Displays the name of each file as it is copied.
1436*d5c9a868SElliott Hughes
1437*d5c9a868SElliott Hughes4.7.1 Bugs
1438*d5c9a868SElliott Hughes----------
1439*d5c9a868SElliott Hughes
1440*d5c9a868SElliott HughesUnlike MS-DOS, the '+' operator (append) from MS-DOS is not supported.
1441*d5c9a868SElliott HughesHowever, you may use 'mtype' to produce the same effect:
1442*d5c9a868SElliott Hughes     mtype a:file1 a:file2 a:file3 >unixfile
1443*d5c9a868SElliott Hughes     mtype a:file1 a:file2 a:file3 | mcopy - a:msdosfile
1444*d5c9a868SElliott Hughes
1445*d5c9a868SElliott Hughes
1446*d5c9a868SElliott HughesFile: mtools.info,  Node: mdel,  Next: mdeltree,  Prev: mcopy,  Up: Commands
1447*d5c9a868SElliott Hughes
1448*d5c9a868SElliott Hughes4.8 Mdel
1449*d5c9a868SElliott Hughes========
1450*d5c9a868SElliott Hughes
1451*d5c9a868SElliott HughesThe 'mdel' command is used to delete an MS-DOS file.  Its syntax is:
1452*d5c9a868SElliott Hughes
1453*d5c9a868SElliott Hughes     'mdel' ['-v'] MSDOSFILE [ MSDOSFILES ...  ]
1454*d5c9a868SElliott Hughes
1455*d5c9a868SElliott Hughes   'Mdel' deletes files on an MS-DOS file system.
1456*d5c9a868SElliott Hughes
1457*d5c9a868SElliott Hughes   'Mdel' asks for verification prior to removing a read-only file.
1458*d5c9a868SElliott Hughes
1459*d5c9a868SElliott Hughes
1460*d5c9a868SElliott HughesFile: mtools.info,  Node: mdeltree,  Next: mdir,  Prev: mdel,  Up: Commands
1461*d5c9a868SElliott Hughes
1462*d5c9a868SElliott Hughes4.9 Mdeltree
1463*d5c9a868SElliott Hughes============
1464*d5c9a868SElliott Hughes
1465*d5c9a868SElliott HughesThe 'mdeltree' command is used to delete an MS-DOS file.  Its syntax is:
1466*d5c9a868SElliott Hughes
1467*d5c9a868SElliott Hughes     'mdeltree' ['-v'] MSDOSDIRECTORY [MSDOSDIRECTORIES...]
1468*d5c9a868SElliott Hughes
1469*d5c9a868SElliott Hughes   'Mdeltree' removes a directory and all the files and subdirectories
1470*d5c9a868SElliott Hughesit contains from an MS-DOS file system.  An error occurs if the
1471*d5c9a868SElliott Hughesdirectory to be removed does not exist.
1472*d5c9a868SElliott Hughes
1473*d5c9a868SElliott Hughes
1474*d5c9a868SElliott HughesFile: mtools.info,  Node: mdir,  Next: mdu,  Prev: mdeltree,  Up: Commands
1475*d5c9a868SElliott Hughes
1476*d5c9a868SElliott Hughes4.10 Mdir
1477*d5c9a868SElliott Hughes=========
1478*d5c9a868SElliott Hughes
1479*d5c9a868SElliott HughesThe 'mdir' command is used to display an MS-DOS directory.  Its syntax
1480*d5c9a868SElliott Hughesis:
1481*d5c9a868SElliott Hughes
1482*d5c9a868SElliott Hughes   'mdir' ['-/'] ['-f'] ['-w'] ['-a'] ['-b'] MSDOSFILE [ MSDOSFILES...]
1483*d5c9a868SElliott Hughes
1484*d5c9a868SElliott Hughes   'Mdir' displays the contents of MS-DOS directories, or the entries
1485*d5c9a868SElliott Hughesfor some MS-DOS files.
1486*d5c9a868SElliott Hughes
1487*d5c9a868SElliott Hughes   'Mdir' supports the following command line options:
1488*d5c9a868SElliott Hughes
1489*d5c9a868SElliott Hughes'/'
1490*d5c9a868SElliott Hughes     Recursive output, just like MS-DOS' '-s' option
1491*d5c9a868SElliott Hughes'w'
1492*d5c9a868SElliott Hughes     Wide output.  With this option, 'mdir' prints the filenames across
1493*d5c9a868SElliott Hughes     the page without displaying the file size or creation date.
1494*d5c9a868SElliott Hughes'a'
1495*d5c9a868SElliott Hughes     Also list hidden files.
1496*d5c9a868SElliott Hughes'f'
1497*d5c9a868SElliott Hughes     Fast.  Do not try to find out free space.  On larger disks, finding
1498*d5c9a868SElliott Hughes     out the amount of free space takes up some non trivial amount of
1499*d5c9a868SElliott Hughes     time, as the whole FAT must be read in and scanned.  The '-f' flag
1500*d5c9a868SElliott Hughes     bypasses this step.  This flag is not needed on FAT32 file systems,
1501*d5c9a868SElliott Hughes     which store the size explicitly.
1502*d5c9a868SElliott Hughes'b'
1503*d5c9a868SElliott Hughes     Concise listing.  Lists each directory name or filename, one per
1504*d5c9a868SElliott Hughes     line (including the filename extension).  This switch displays no
1505*d5c9a868SElliott Hughes     heading information and no summary.  Only a newline separated list
1506*d5c9a868SElliott Hughes     of pathnames is displayed.
1507*d5c9a868SElliott Hughes
1508*d5c9a868SElliott Hughes   An error occurs if a component of the path is not a directory.
1509*d5c9a868SElliott Hughes
1510*d5c9a868SElliott Hughes
1511*d5c9a868SElliott HughesFile: mtools.info,  Node: mdu,  Next: mformat,  Prev: mdir,  Up: Commands
1512*d5c9a868SElliott Hughes
1513*d5c9a868SElliott Hughes4.11 Mdu
1514*d5c9a868SElliott Hughes========
1515*d5c9a868SElliott Hughes
1516*d5c9a868SElliott Hughes'Mdu' is used to list the space occupied by a directory, its
1517*d5c9a868SElliott Hughessubdirectories and its files.  It is similar to the 'du' command on
1518*d5c9a868SElliott HughesUnix.  The unit used are clusters.  Use the minfo command to find out
1519*d5c9a868SElliott Hughesthe cluster size.
1520*d5c9a868SElliott Hughes
1521*d5c9a868SElliott Hughes   'mdu' ['-a'] [ MSDOSFILES ... ]
1522*d5c9a868SElliott Hughes
1523*d5c9a868SElliott Hughes'a'
1524*d5c9a868SElliott Hughes     All files.  List also the space occupied for individual files.
1525*d5c9a868SElliott Hughes's'
1526*d5c9a868SElliott Hughes     Only list the total space, don't give details for each
1527*d5c9a868SElliott Hughes     subdirectory.
1528*d5c9a868SElliott Hughes
1529*d5c9a868SElliott Hughes
1530*d5c9a868SElliott HughesFile: mtools.info,  Node: mformat,  Next: mkmanifest,  Prev: mdu,  Up: Commands
1531*d5c9a868SElliott Hughes
1532*d5c9a868SElliott Hughes4.12 Mformat
1533*d5c9a868SElliott Hughes============
1534*d5c9a868SElliott Hughes
1535*d5c9a868SElliott HughesThe 'mformat' command is used to add an MS-DOS file system to a
1536*d5c9a868SElliott Hugheslow-level formatted diskette.  Its syntax is:
1537*d5c9a868SElliott Hughes
1538*d5c9a868SElliott Hughes     'mformat' ['-t' CYLINDERS|'-T' TOT_SECTORS] ['-h' HEADS] ['-s' SECTORS]
1539*d5c9a868SElliott Hughes       ['-f' SIZE] ['-1'] ['-4'] ['-8']
1540*d5c9a868SElliott Hughes       ['-v' VOLUME_LABEL]
1541*d5c9a868SElliott Hughes       ['-F'] ['-S' SIZECODE]
1542*d5c9a868SElliott Hughes       ['-M' SOFTWARE_SECTOR_SIZE]
1543*d5c9a868SElliott Hughes       ['-N' SERIAL_NUMBER] ['-a']
1544*d5c9a868SElliott Hughes       ['-C'] ['-H' HIDDEN_SECTORS] ['-I' FSVERSION]
1545*d5c9a868SElliott Hughes       ['-r' ROOT_SECTORS] ['-L' FAT_LEN]
1546*d5c9a868SElliott Hughes       ['-B' BOOT_SECTOR] ['-k']
1547*d5c9a868SElliott Hughes       ['-m' MEDIA_DESCRIPTOR]
1548*d5c9a868SElliott Hughes       ['-K' BACKUP_BOOT]
1549*d5c9a868SElliott Hughes       ['-R' NB_RESERVED_SECTORS]
1550*d5c9a868SElliott Hughes       ['-c' CLUSTERS_PER_SECTOR]
1551*d5c9a868SElliott Hughes       ['-d' FAT_COPIES]
1552*d5c9a868SElliott Hughes       ['-X'] ['-2' SECTORS_ON_TRACK_0] ['-3']
1553*d5c9a868SElliott Hughes       ['-0' RATE_ON_TRACK_0] ['-A' RATE_ON_OTHER_TRACKS]
1554*d5c9a868SElliott Hughes       DRIVE:
1555*d5c9a868SElliott Hughes
1556*d5c9a868SElliott Hughes   'Mformat' adds a minimal MS-DOS file system (boot sector, FAT, and
1557*d5c9a868SElliott Hughesroot directory) to a diskette that has already been formatted by a Unix
1558*d5c9a868SElliott Hugheslow-level format.
1559*d5c9a868SElliott Hughes
1560*d5c9a868SElliott Hughes   The following options are supported: (The S, 2, 1 and M options may
1561*d5c9a868SElliott Hughesnot exist if this copy of mtools has been compiled without the USE_2M
1562*d5c9a868SElliott Hughesoption)
1563*d5c9a868SElliott Hughes
1564*d5c9a868SElliott Hughes   The following options are the same as for MS-DOS's format command:
1565*d5c9a868SElliott Hughes
1566*d5c9a868SElliott Hughes'v'
1567*d5c9a868SElliott Hughes     Specifies the volume label.  A volume label identifies the disk and
1568*d5c9a868SElliott Hughes     can be a maximum of 11 characters.  If you omit the -v switch,
1569*d5c9a868SElliott Hughes     mformat will assign no label to the disk.
1570*d5c9a868SElliott Hughes'f'
1571*d5c9a868SElliott Hughes     Specifies the size of the DOS file system to format.  Only a
1572*d5c9a868SElliott Hughes     certain number of predefined sizes are supported by this flag; for
1573*d5c9a868SElliott Hughes     others use the -h/-t/-s flags.  The following sizes are supported:
1574*d5c9a868SElliott Hughes     160
1575*d5c9a868SElliott Hughes          160K, single-sided, 8 sectors per track, 40 cylinders (for 5
1576*d5c9a868SElliott Hughes          1/4 DD)
1577*d5c9a868SElliott Hughes     180
1578*d5c9a868SElliott Hughes          160K, single-sided, 9 sectors per track, 40 cylinders (for 5
1579*d5c9a868SElliott Hughes          1/4 DD)
1580*d5c9a868SElliott Hughes     320
1581*d5c9a868SElliott Hughes          320K, double-sided, 8 sectors per track, 40 cylinders (for 5
1582*d5c9a868SElliott Hughes          1/4 DD)
1583*d5c9a868SElliott Hughes     360
1584*d5c9a868SElliott Hughes          360K, double-sided, 9 sectors per track, 40 cylinders (for 5
1585*d5c9a868SElliott Hughes          1/4 DD)
1586*d5c9a868SElliott Hughes     720
1587*d5c9a868SElliott Hughes          720K, double-sided, 9 sectors per track, 80 cylinders (for 3
1588*d5c9a868SElliott Hughes          1/2 DD)
1589*d5c9a868SElliott Hughes     1200
1590*d5c9a868SElliott Hughes          1200K, double-sided, 15 sectors per track, 80 cylinders (for 5
1591*d5c9a868SElliott Hughes          1/4 HD)
1592*d5c9a868SElliott Hughes     1440
1593*d5c9a868SElliott Hughes          1440K, double-sided, 18 sectors per track, 80 cylinders (for 3
1594*d5c9a868SElliott Hughes          1/2 HD)
1595*d5c9a868SElliott Hughes     2880
1596*d5c9a868SElliott Hughes          2880K, double-sided, 36 sectors per track, 80 cylinders (for 3
1597*d5c9a868SElliott Hughes          1/2 ED)
1598*d5c9a868SElliott Hughes
1599*d5c9a868SElliott Hughes't'
1600*d5c9a868SElliott Hughes     Specifies the number of tracks on the disk.
1601*d5c9a868SElliott Hughes'T'
1602*d5c9a868SElliott Hughes     Specifies the number of total sectors on the disk.  Only one of
1603*d5c9a868SElliott Hughes     these 2 options may be specified (tracks or total sectors)
1604*d5c9a868SElliott Hughes'h'
1605*d5c9a868SElliott Hughes     The number of heads (sides).
1606*d5c9a868SElliott Hughes's'
1607*d5c9a868SElliott Hughes     Specifies the number of sectors per track.  If the 2m option is
1608*d5c9a868SElliott Hughes     given, number of 512-byte sector equivalents on generic tracks
1609*d5c9a868SElliott Hughes     (i.e.  not head 0 track 0).  If the 2m option is not given, number
1610*d5c9a868SElliott Hughes     of physical sectors per track (which may be bigger than 512 bytes).
1611*d5c9a868SElliott Hughes
1612*d5c9a868SElliott Hughes'1'
1613*d5c9a868SElliott Hughes     Formats a single side (equivalent to -h 1)
1614*d5c9a868SElliott Hughes
1615*d5c9a868SElliott Hughes'4'
1616*d5c9a868SElliott Hughes     Formats a 360K double-sided disk (equivalent to -f 360).  When used
1617*d5c9a868SElliott Hughes     together with -the 1 switch, this switch formats a 180K disk
1618*d5c9a868SElliott Hughes
1619*d5c9a868SElliott Hughes'8'
1620*d5c9a868SElliott Hughes     Formats a disk with 8 sectors per track.
1621*d5c9a868SElliott Hughes
1622*d5c9a868SElliott Hughes   MS-DOS format's 'q', 'u' and 'b' options are not supported, and 's'
1623*d5c9a868SElliott Hugheshas a different meaning.
1624*d5c9a868SElliott Hughes
1625*d5c9a868SElliott Hughes   The following options are specific to mtools:
1626*d5c9a868SElliott Hughes
1627*d5c9a868SElliott Hughes'F'
1628*d5c9a868SElliott Hughes     Format the partition as FAT32.
1629*d5c9a868SElliott Hughes
1630*d5c9a868SElliott Hughes'S'
1631*d5c9a868SElliott Hughes     The size code.  The size of the sector is 2 ^ (sizecode + 7).
1632*d5c9a868SElliott Hughes'X'
1633*d5c9a868SElliott Hughes     formats the disk as an XDF disk.  *Note XDF::, for more details.
1634*d5c9a868SElliott Hughes     The disk has first to be low-level formatted using the xdfcopy
1635*d5c9a868SElliott Hughes     utility included in the fdutils package.  XDF disks are used for
1636*d5c9a868SElliott Hughes     instance for OS/2 install disks.
1637*d5c9a868SElliott Hughes'2'
1638*d5c9a868SElliott Hughes     2m format.  The parameter to this option describes the number of
1639*d5c9a868SElliott Hughes     sectors on track 0, head 0.  This option is recommended for sectors
1640*d5c9a868SElliott Hughes     bigger than normal.
1641*d5c9a868SElliott Hughes'3'
1642*d5c9a868SElliott Hughes     don't use a 2m format, even if the current geometry of the disk is
1643*d5c9a868SElliott Hughes     a 2m geometry.
1644*d5c9a868SElliott Hughes'0'
1645*d5c9a868SElliott Hughes     Data transfer rate on track 0
1646*d5c9a868SElliott Hughes'A'
1647*d5c9a868SElliott Hughes     Data transfer rate on tracks other than 0
1648*d5c9a868SElliott Hughes'M'
1649*d5c9a868SElliott Hughes     software sector size.  This parameter describes the sector size in
1650*d5c9a868SElliott Hughes     bytes used by the MS-DOS file system.  By default it is the
1651*d5c9a868SElliott Hughes     physical sector size.
1652*d5c9a868SElliott Hughes'N'
1653*d5c9a868SElliott Hughes     Uses the requested serial number, instead of generating one
1654*d5c9a868SElliott Hughes     automatically
1655*d5c9a868SElliott Hughes'a'
1656*d5c9a868SElliott Hughes     If this option is given, an Atari style serial number is generated.
1657*d5c9a868SElliott Hughes     Ataris store their serial number in the OEM label.
1658*d5c9a868SElliott Hughes'C'
1659*d5c9a868SElliott Hughes     creates the disk image file to install the MS-DOS file system on
1660*d5c9a868SElliott Hughes     it.  Obviously, this is useless on physical devices such as
1661*d5c9a868SElliott Hughes     floppies and hard disk partitions, but is interesting for image
1662*d5c9a868SElliott Hughes     files.
1663*d5c9a868SElliott Hughes'H'
1664*d5c9a868SElliott Hughes     number of hidden sectors.  This parameter is useful for formatting
1665*d5c9a868SElliott Hughes     hard disk partition, which are not aligned on track boundaries
1666*d5c9a868SElliott Hughes     (i.e.  first head of first track doesn't belong to the partition,
1667*d5c9a868SElliott Hughes     but contains a partition table).  In that case the number of hidden
1668*d5c9a868SElliott Hughes     sectors is in general the number of sectors per cylinder.  This is
1669*d5c9a868SElliott Hughes     untested.
1670*d5c9a868SElliott Hughes'I'
1671*d5c9a868SElliott Hughes     Sets the fsVersion id when formatting a FAT32 drive.  In order to
1672*d5c9a868SElliott Hughes     find this out, run minfo on an existing FAT32 drive, and mail me
1673*d5c9a868SElliott Hughes     about it, so I can include the correct value in future versions of
1674*d5c9a868SElliott Hughes     mtools.
1675*d5c9a868SElliott Hughes'c'
1676*d5c9a868SElliott Hughes     Sets the size of a cluster (in sectors).  If this cluster size
1677*d5c9a868SElliott Hughes     would generate a FAT that too big for its number of bits, mtools
1678*d5c9a868SElliott Hughes     automatically increases the cluster size, until the FAT is small
1679*d5c9a868SElliott Hughes     enough.  If no cluster size is specified explicitly, mtools uses a
1680*d5c9a868SElliott Hughes     default value as described in section "Number of sectors per
1681*d5c9a868SElliott Hughes     cluster" below.
1682*d5c9a868SElliott Hughes'd'
1683*d5c9a868SElliott Hughes     Sets the number of FAT copies.  Default is 2.  This setting can
1684*d5c9a868SElliott Hughes     also be specified using the 'MTOOLS_NFATS' environment variable.
1685*d5c9a868SElliott Hughes'r'
1686*d5c9a868SElliott Hughes     Sets the size of the root directory (in sectors).  Only applicable
1687*d5c9a868SElliott Hughes     to 12 and 16 bit FATs.  This setting can also be specified using
1688*d5c9a868SElliott Hughes     the 'MTOOLS_DIR_LEN' environment variable.
1689*d5c9a868SElliott Hughes'L'
1690*d5c9a868SElliott Hughes     Sets the length of the FAT.
1691*d5c9a868SElliott Hughes'B'
1692*d5c9a868SElliott Hughes     Use the boot sector stored in the given file or device, instead of
1693*d5c9a868SElliott Hughes     using its own.  Only the geometry fields are updated to match the
1694*d5c9a868SElliott Hughes     target disks parameters.
1695*d5c9a868SElliott Hughes'k'
1696*d5c9a868SElliott Hughes     Keep the existing boot sector as much as possible.  Only the
1697*d5c9a868SElliott Hughes     geometry fields and other similar file system data are updated to
1698*d5c9a868SElliott Hughes     match the target disks parameters.
1699*d5c9a868SElliott Hughes'K'
1700*d5c9a868SElliott Hughes     Sets the sector number where the backup of the boot sector should
1701*d5c9a868SElliott Hughes     be stored (only relevant on FAT32).
1702*d5c9a868SElliott Hughes'R'
1703*d5c9a868SElliott Hughes     Sets the number of reserved sectors for this filesystem.  This must
1704*d5c9a868SElliott Hughes     be at least 1 for non-FAT32 disks, and at least 3 for FAT disks (in
1705*d5c9a868SElliott Hughes     order to accommodate the boot sector, the info sector and the
1706*d5c9a868SElliott Hughes     backup boot sector).
1707*d5c9a868SElliott Hughes
1708*d5c9a868SElliott Hughes'm'
1709*d5c9a868SElliott Hughes     Use a non-standard media descriptor byte for this disk.  The media
1710*d5c9a868SElliott Hughes     descriptor is stored at position 21 of the boot sector, and as
1711*d5c9a868SElliott Hughes     first byte in each FAT copy.  Using this option may confuse DOS or
1712*d5c9a868SElliott Hughes     older mtools version, and may make the disk unreadable.  Only use
1713*d5c9a868SElliott Hughes     if you know what you are doing.
1714*d5c9a868SElliott Hughes
1715*d5c9a868SElliott Hughes   To format a diskette at a density other than the default, you must
1716*d5c9a868SElliott Hughessupply (at least) those command line parameters that are different from
1717*d5c9a868SElliott Hughesthe default.
1718*d5c9a868SElliott Hughes
1719*d5c9a868SElliott Hughes   'Mformat' returns 0 on success or 1 on failure.
1720*d5c9a868SElliott Hughes
1721*d5c9a868SElliott Hughes   It doesn't record bad block information to the Fat, use 'mbadblocks'
1722*d5c9a868SElliott Hughesfor that.
1723*d5c9a868SElliott Hughes
1724*d5c9a868SElliott Hughes4.12.1 Number of sectors per cluster
1725*d5c9a868SElliott Hughes------------------------------------
1726*d5c9a868SElliott Hughes
1727*d5c9a868SElliott HughesIf the user indicates no cluster size, mformat figures out a default
1728*d5c9a868SElliott Hughesvalue for it.
1729*d5c9a868SElliott Hughes
1730*d5c9a868SElliott Hughes   For FAT32 it uses the following table to determine the number of
1731*d5c9a868SElliott Hughessectors per cluster, depending on the total number of sectors on the
1732*d5c9a868SElliott Hughesfilesystem.
1733*d5c9a868SElliott Hughes
1734*d5c9a868SElliott Hughes   more than 32*1024*1024*2: 64 sectors
1735*d5c9a868SElliott Hughesbetween 16*1024*1024*2 and 32*1024*1024*2: 32 sectors
1736*d5c9a868SElliott Hughesbetween 8*1024*1024*2 and 16*1024*1024*2: 16 sectors
1737*d5c9a868SElliott Hughesbetween 260*1024*2 and 81024*1024*2: 1 sectors
1738*d5c9a868SElliott Hughes
1739*d5c9a868SElliott Hughes   This is derived from information on page 20 of Microsoft's
1740*d5c9a868SElliott Hughes'fatgen103' document, which currently can be found at the following
1741*d5c9a868SElliott Hughesaddress:
1742*d5c9a868SElliott Hughes
1743*d5c9a868SElliott Hughes   'https://staff.washington.edu/dittrich/misc/fatgen103.pdf'
1744*d5c9a868SElliott Hughes
1745*d5c9a868SElliott Hughes   For FAT12 and FAT16, mformat uses an iterative approach, where it
1746*d5c9a868SElliott Hughesstarts with a set value, which it doubles until it is able to fill up
1747*d5c9a868SElliott Hughesthe disk using that cluster size and a number of cluster less than the
1748*d5c9a868SElliott Hughesmaximum allowed.
1749*d5c9a868SElliott Hughes
1750*d5c9a868SElliott Hughes   The starting value is 1 for disks with one head or less than 2000
1751*d5c9a868SElliott Hughessectors, and 2 for disks with more than one head, and more than 2000
1752*d5c9a868SElliott Hughessectors.
1753*d5c9a868SElliott Hughes
1754*d5c9a868SElliott Hughes   The number of sectors per cluster cannot go beyond 128.
1755*d5c9a868SElliott Hughes
1756*d5c9a868SElliott Hughes
1757*d5c9a868SElliott HughesFile: mtools.info,  Node: mkmanifest,  Next: minfo,  Prev: mformat,  Up: Commands
1758*d5c9a868SElliott Hughes
1759*d5c9a868SElliott Hughes4.13 Mkmanifest
1760*d5c9a868SElliott Hughes===============
1761*d5c9a868SElliott Hughes
1762*d5c9a868SElliott HughesThe 'mkmanifest' command is used to create a shell script (packing list)
1763*d5c9a868SElliott Hughesto restore Unix filenames.  Its syntax is:
1764*d5c9a868SElliott Hughes
1765*d5c9a868SElliott Hughes   'mkmanifest' [ FILES ]
1766*d5c9a868SElliott Hughes
1767*d5c9a868SElliott Hughes   'Mkmanifest' creates a shell script that aids in the restoration of
1768*d5c9a868SElliott HughesUnix filenames that got clobbered by the MS-DOS filename restrictions.
1769*d5c9a868SElliott HughesMS-DOS filenames are restricted to 8 character names, 3 character
1770*d5c9a868SElliott Hughesextensions, upper case only, no device names, and no illegal characters.
1771*d5c9a868SElliott Hughes
1772*d5c9a868SElliott Hughes   The mkmanifest program is compatible with the methods used in 'pcomm,
1773*d5c9a868SElliott Hughesarc,' and 'mtools' to change perfectly good Unix filenames to fit the
1774*d5c9a868SElliott HughesMS-DOS restrictions.  This command is only useful if the target system
1775*d5c9a868SElliott Hugheswhich will read the diskette cannot handle VFAT long names.
1776*d5c9a868SElliott Hughes
1777*d5c9a868SElliott Hughes4.13.1 Example
1778*d5c9a868SElliott Hughes--------------
1779*d5c9a868SElliott Hughes
1780*d5c9a868SElliott HughesYou want to copy the following Unix files to a MS-DOS diskette (using
1781*d5c9a868SElliott Hughesthe 'mcopy' command).
1782*d5c9a868SElliott Hughes
1783*d5c9a868SElliott Hughes       very_long_name
1784*d5c9a868SElliott Hughes       2.many.dots
1785*d5c9a868SElliott Hughes       illegal:
1786*d5c9a868SElliott Hughes       good.c
1787*d5c9a868SElliott Hughes       prn.dev
1788*d5c9a868SElliott Hughes       Capital
1789*d5c9a868SElliott Hughes
1790*d5c9a868SElliott Hughes   'ASCII' converts the names to:
1791*d5c9a868SElliott Hughes
1792*d5c9a868SElliott Hughes       very_lon
1793*d5c9a868SElliott Hughes       2xmany.dot
1794*d5c9a868SElliott Hughes       illegalx
1795*d5c9a868SElliott Hughes       good.c
1796*d5c9a868SElliott Hughes       xprn.dev
1797*d5c9a868SElliott Hughes       capital
1798*d5c9a868SElliott Hughes
1799*d5c9a868SElliott Hughes   The command:
1800*d5c9a868SElliott Hughes     mkmanifest very_long_name 2.many.dots illegal: good.c prn.dev Capital >manifest
1801*d5c9a868SElliott Hughes   would produce the following:
1802*d5c9a868SElliott Hughes       mv very_lon very_long_name
1803*d5c9a868SElliott Hughes       mv 2xmany.dot 2.many.dots
1804*d5c9a868SElliott Hughes       mv illegalx illegal:
1805*d5c9a868SElliott Hughes       mv xprn.dev prn.dev
1806*d5c9a868SElliott Hughes       mv capital Capital
1807*d5c9a868SElliott Hughes
1808*d5c9a868SElliott Hughes   Notice that "good.c" did not require any conversion, so it did not
1809*d5c9a868SElliott Hughesappear in the output.
1810*d5c9a868SElliott Hughes
1811*d5c9a868SElliott Hughes   Suppose I've copied these files from the diskette to another Unix
1812*d5c9a868SElliott Hughessystem, and I now want the files back to their original names.  If the
1813*d5c9a868SElliott Hughesfile "manifest" (the output captured above) was sent along with those
1814*d5c9a868SElliott Hughesfiles, it could be used to convert the filenames.
1815*d5c9a868SElliott Hughes
1816*d5c9a868SElliott Hughes4.13.2 Bugs
1817*d5c9a868SElliott Hughes-----------
1818*d5c9a868SElliott Hughes
1819*d5c9a868SElliott HughesThe short names generated by 'mkmanifest' follow the old convention
1820*d5c9a868SElliott Hughes(from mtools-2.0.7) and not the one from Windows 95 and mtools-3.0.
1821*d5c9a868SElliott Hughes
1822*d5c9a868SElliott Hughes
1823*d5c9a868SElliott HughesFile: mtools.info,  Node: minfo,  Next: mlabel,  Prev: mkmanifest,  Up: Commands
1824*d5c9a868SElliott Hughes
1825*d5c9a868SElliott Hughes4.14 Minfo
1826*d5c9a868SElliott Hughes==========
1827*d5c9a868SElliott Hughes
1828*d5c9a868SElliott HughesThe 'minfo' command prints the parameters of a MS-DOS file system, such
1829*d5c9a868SElliott Hughesas number of sectors, heads and cylinders.  It also prints an mformat
1830*d5c9a868SElliott Hughescommand line which can be used to create a similar MS-DOS file system on
1831*d5c9a868SElliott Hughesanother media.  However, this doesn't work with 2m or XDF media, and
1832*d5c9a868SElliott Hugheswith MS-DOS 1.0 file systems
1833*d5c9a868SElliott Hughes     'minfo' DRIVE:
1834*d5c9a868SElliott Hughes
1835*d5c9a868SElliott Hughes   Minfo supports the following option:
1836*d5c9a868SElliott Hughes'v'
1837*d5c9a868SElliott Hughes     Prints a hexdump of the boot sector, in addition to the other
1838*d5c9a868SElliott Hughes     information
1839*d5c9a868SElliott Hughes
1840*d5c9a868SElliott Hughes
1841*d5c9a868SElliott HughesFile: mtools.info,  Node: mlabel,  Next: mmd,  Prev: minfo,  Up: Commands
1842*d5c9a868SElliott Hughes
1843*d5c9a868SElliott Hughes4.15 Mlabel
1844*d5c9a868SElliott Hughes===========
1845*d5c9a868SElliott Hughes
1846*d5c9a868SElliott HughesThe 'mlabel' command adds a volume label to a disk.  Its syntax is:
1847*d5c9a868SElliott Hughes     'mlabel' ['-vcsn'] ['-N' SERIAL] DRIVE:[NEW_LABEL]
1848*d5c9a868SElliott Hughes
1849*d5c9a868SElliott Hughes   'Mlabel' displays the current volume label, if present.  If NEW_LABEL
1850*d5c9a868SElliott Hughesis not given, and if neither the 'c' nor the 's' options are set, it
1851*d5c9a868SElliott Hughesprompts the user for a new volume label.  To delete an existing volume
1852*d5c9a868SElliott Hugheslabel, press return at the prompt.
1853*d5c9a868SElliott Hughes
1854*d5c9a868SElliott Hughes   The label is limited to 11 single-byte characters, e.g.
1855*d5c9a868SElliott Hughes'Name1234567'.
1856*d5c9a868SElliott Hughes
1857*d5c9a868SElliott Hughes   Reasonable care is taken to create a valid MS-DOS volume label.  If
1858*d5c9a868SElliott Hughesan invalid label is specified, 'mlabel' changes the label (and displays
1859*d5c9a868SElliott Hughesthe new label if the verbose mode is set).  'Mlabel' returns 0 on
1860*d5c9a868SElliott Hughessuccess or 1 on failure.
1861*d5c9a868SElliott Hughes
1862*d5c9a868SElliott Hughes   Mlabel supports the following options:
1863*d5c9a868SElliott Hughes'c'
1864*d5c9a868SElliott Hughes     Clears an existing label, without prompting the user
1865*d5c9a868SElliott Hughes's'
1866*d5c9a868SElliott Hughes     Shows the existing label, without prompting the user.
1867*d5c9a868SElliott Hughes'n'
1868*d5c9a868SElliott Hughes     Assigns a new (random) serial number to the disk
1869*d5c9a868SElliott Hughes'N SERIAL'
1870*d5c9a868SElliott Hughes     Sets the supplied serial number.  The serial number should be
1871*d5c9a868SElliott Hughes     supplied as an 8 digit hexadecimal number, without spaces
1872*d5c9a868SElliott Hughes
1873*d5c9a868SElliott Hughes
1874*d5c9a868SElliott HughesFile: mtools.info,  Node: mmd,  Next: mmount,  Prev: mlabel,  Up: Commands
1875*d5c9a868SElliott Hughes
1876*d5c9a868SElliott Hughes4.16 Mmd
1877*d5c9a868SElliott Hughes========
1878*d5c9a868SElliott Hughes
1879*d5c9a868SElliott HughesThe 'mmd' command is used to make an MS-DOS subdirectory.  Its syntax
1880*d5c9a868SElliott Hughesis:
1881*d5c9a868SElliott Hughes
1882*d5c9a868SElliott Hughes   'mmd' ['-D' CLASH_OPTION] MSDOSDIRECTORY [ MSDOSDIRECTORIES... ]
1883*d5c9a868SElliott Hughes
1884*d5c9a868SElliott Hughes   'Mmd' makes a new directory on an MS-DOS file system.  An error
1885*d5c9a868SElliott Hughesoccurs if the directory already exists.
1886*d5c9a868SElliott Hughes
1887*d5c9a868SElliott Hughes
1888*d5c9a868SElliott HughesFile: mtools.info,  Node: mmount,  Next: mmove,  Prev: mmd,  Up: Commands
1889*d5c9a868SElliott Hughes
1890*d5c9a868SElliott Hughes4.17 Mmount
1891*d5c9a868SElliott Hughes===========
1892*d5c9a868SElliott Hughes
1893*d5c9a868SElliott HughesThe 'mmount' command is used to mount an MS-DOS disk.  It is only
1894*d5c9a868SElliott Hughesavailable on Linux, as it is only useful if the OS kernel allows
1895*d5c9a868SElliott Hughesconfiguration of the disk geometry.  Its syntax is:
1896*d5c9a868SElliott Hughes
1897*d5c9a868SElliott Hughes   'mmount' MSDOSDRIVE [MOUNTARGS]
1898*d5c9a868SElliott Hughes
1899*d5c9a868SElliott Hughes   'Mmount' reads the boot sector of an MS-DOS disk, configures the
1900*d5c9a868SElliott Hughesdrive geometry, and finally mounts it passing 'mountargs' to 'mount. '
1901*d5c9a868SElliott HughesIf no mount arguments are specified, the name of the device is used.  If
1902*d5c9a868SElliott Hughesthe disk is write protected, it is automatically mounted read only.
1903*d5c9a868SElliott Hughes
1904*d5c9a868SElliott Hughes
1905*d5c9a868SElliott HughesFile: mtools.info,  Node: mmove,  Next: mpartition,  Prev: mmount,  Up: Commands
1906*d5c9a868SElliott Hughes
1907*d5c9a868SElliott Hughes4.18 Mmove
1908*d5c9a868SElliott Hughes==========
1909*d5c9a868SElliott Hughes
1910*d5c9a868SElliott HughesThe 'mmove' command is used to move or rename an existing MS-DOS file or
1911*d5c9a868SElliott Hughessubdirectory.
1912*d5c9a868SElliott Hughes     'mmove' ['-v'] ['-D' CLASH_OPTION] SOURCEFILE TARGETFILE
1913*d5c9a868SElliott Hughes     'mmove' ['-v']  ['-D' CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY
1914*d5c9a868SElliott Hughes   'Mmove' moves or renames an existing MS-DOS file or subdirectory.
1915*d5c9a868SElliott HughesUnlike the MS-DOS version of 'MOVE', 'mmove' is able to move
1916*d5c9a868SElliott Hughessubdirectories.  Files or directories can only be moved within one file
1917*d5c9a868SElliott Hughessystem.  Data cannot be moved from MS-DOS to Unix or vice-versa.  If you
1918*d5c9a868SElliott Hughesomit the drive letter from the target file or directory, the same letter
1919*d5c9a868SElliott Hughesas for the source is assumed.  If you omit the drive letter from all
1920*d5c9a868SElliott Hughesparameters, drive a: is assumed by default.
1921*d5c9a868SElliott Hughes
1922*d5c9a868SElliott Hughes
1923*d5c9a868SElliott HughesFile: mtools.info,  Node: mpartition,  Next: mrd,  Prev: mmove,  Up: Commands
1924*d5c9a868SElliott Hughes
1925*d5c9a868SElliott Hughes4.19 Mpartition
1926*d5c9a868SElliott Hughes===============
1927*d5c9a868SElliott Hughes
1928*d5c9a868SElliott HughesThe 'mpartition' command is used to create MS-DOS file systems as
1929*d5c9a868SElliott Hughespartitions.  This is intended to be used on non-Linux systems, i.e.
1930*d5c9a868SElliott Hughessystems where fdisk and easy access to SCSI devices are not available.
1931*d5c9a868SElliott HughesThis command only works on drives whose partition variable is set.
1932*d5c9a868SElliott Hughes
1933*d5c9a868SElliott Hughes     'mpartition' '-p' DRIVE
1934*d5c9a868SElliott Hughes     'mpartition' '-r' DRIVE
1935*d5c9a868SElliott Hughes     'mpartition' '-I' ['-B' BOOTSECTOR] DRIVE
1936*d5c9a868SElliott Hughes     'mpartition' '-a' DRIVE
1937*d5c9a868SElliott Hughes     'mpartition' '-d' DRIVE
1938*d5c9a868SElliott Hughes     'mpartition' '-c' ['-s' SECTORS] ['-h' HEADS]
1939*d5c9a868SElliott Hughes     ['-t' CYLINDERS] ['-v' ['-T' TYPE] ['-b'
1940*d5c9a868SElliott Hughes     BEGIN] ['-l' length] ['-f']
1941*d5c9a868SElliott Hughes
1942*d5c9a868SElliott Hughes
1943*d5c9a868SElliott Hughes   Mpartition supports the following operations:
1944*d5c9a868SElliott Hughes
1945*d5c9a868SElliott Hughes'p'
1946*d5c9a868SElliott Hughes     Prints a command line to recreate the partition for the drive.
1947*d5c9a868SElliott Hughes     Nothing is printed if the partition for the drive is not defined,
1948*d5c9a868SElliott Hughes     or an inconsistency has been detected.  If verbose ('-v') is also
1949*d5c9a868SElliott Hughes     set, prints the current partition table.
1950*d5c9a868SElliott Hughes'r'
1951*d5c9a868SElliott Hughes     Removes the partition described by DRIVE.
1952*d5c9a868SElliott Hughes'I'
1953*d5c9a868SElliott Hughes     Initializes the partition table, and removes all partitions.
1954*d5c9a868SElliott Hughes'c'
1955*d5c9a868SElliott Hughes     Creates the partition described by DRIVE.
1956*d5c9a868SElliott Hughes'a'
1957*d5c9a868SElliott Hughes     "Activates" the partition, i.e.  makes it bootable.  Only one
1958*d5c9a868SElliott Hughes     partition can be bootable at a time.
1959*d5c9a868SElliott Hughes'd'
1960*d5c9a868SElliott Hughes     "Deactivates" the partition, i.e.  makes it unbootable.
1961*d5c9a868SElliott Hughes
1962*d5c9a868SElliott Hughes   If no operation is given, the current settings are printed.
1963*d5c9a868SElliott Hughes
1964*d5c9a868SElliott Hughes   For partition creations, the following options are available:
1965*d5c9a868SElliott Hughes's SECTORS'
1966*d5c9a868SElliott Hughes     The number of sectors per track of the partition (which is also the
1967*d5c9a868SElliott Hughes     number of sectors per track for the whole drive).
1968*d5c9a868SElliott Hughes'h HEADS'
1969*d5c9a868SElliott Hughes     The number of heads of the partition (which is also the number of
1970*d5c9a868SElliott Hughes     heads for the whole drive).  By default, the geometry information
1971*d5c9a868SElliott Hughes     (number of sectors and heads) is figured out from neighboring
1972*d5c9a868SElliott Hughes     partition table entries, or guessed from the size.
1973*d5c9a868SElliott Hughes't CYLINDERS'
1974*d5c9a868SElliott Hughes     The number of cylinders of the partition (not the number of
1975*d5c9a868SElliott Hughes     cylinders of the whole drive.
1976*d5c9a868SElliott Hughes'b BEGIN'
1977*d5c9a868SElliott Hughes     The starting offset of the partition, expressed in sectors.  If
1978*d5c9a868SElliott Hughes     begin is not given, 'mpartition' lets the partition begin at the
1979*d5c9a868SElliott Hughes     start of the disk (partition number 1), or immediately after the
1980*d5c9a868SElliott Hughes     end of the previous partition.
1981*d5c9a868SElliott Hughes'l LENGTH'
1982*d5c9a868SElliott Hughes     The size (length) of the partition, expressed in sectors.  If end
1983*d5c9a868SElliott Hughes     is not given, 'mpartition' figures out the size from the number of
1984*d5c9a868SElliott Hughes     sectors, heads and cylinders.  If these are not given either, it
1985*d5c9a868SElliott Hughes     gives the partition the biggest possible size, considering disk
1986*d5c9a868SElliott Hughes     size and start of the next partition.
1987*d5c9a868SElliott Hughes
1988*d5c9a868SElliott Hughes   The following option is available for all operation which modify the
1989*d5c9a868SElliott Hughespartition table:
1990*d5c9a868SElliott Hughes'f'
1991*d5c9a868SElliott Hughes     Usually, before writing back any changes to the partition,
1992*d5c9a868SElliott Hughes     mpartition performs certain consistency checks, such as checking
1993*d5c9a868SElliott Hughes     for overlaps and proper alignment of the partitions.  If any of
1994*d5c9a868SElliott Hughes     these checks fails, the partition table is not changed.  The '-f'
1995*d5c9a868SElliott Hughes     allows you to override these safeguards.
1996*d5c9a868SElliott Hughes
1997*d5c9a868SElliott Hughes   The following options are available for all operations:
1998*d5c9a868SElliott Hughes'v'
1999*d5c9a868SElliott Hughes     Together with '-p' prints the partition table as it is now (no
2000*d5c9a868SElliott Hughes     change operation), or as it is after it is modified.
2001*d5c9a868SElliott Hughes'vv'
2002*d5c9a868SElliott Hughes     If the verbosity flag is given twice, 'mpartition' will print out a
2003*d5c9a868SElliott Hughes     hexdump of the partition table when reading it from and writing it
2004*d5c9a868SElliott Hughes     to the device.
2005*d5c9a868SElliott Hughes
2006*d5c9a868SElliott Hughes   The following option is available for partition table initialization:
2007*d5c9a868SElliott Hughes'B BOOTSECTOR'
2008*d5c9a868SElliott Hughes     Reads the template master boot record from file BOOTSECTOR.
2009*d5c9a868SElliott Hughes
2010*d5c9a868SElliott Hughes4.19.1 Choice of partition type
2011*d5c9a868SElliott Hughes-------------------------------
2012*d5c9a868SElliott Hughes
2013*d5c9a868SElliott HughesMpartition proceeds as follows to pick a type for the partition:
2014*d5c9a868SElliott Hughes
2015*d5c9a868SElliott Hughes   - FAT32 partitions are assigned type 0x0C ("'Win95 FAT32, LBA'")
2016*d5c9a868SElliott Hughes
2017*d5c9a868SElliott Hughes   - For all others, if the partition fits entirely within the first
2018*d5c9a868SElliott Hughes     65536 sectors of the disk, assign 0x01 ("'DOS FAT12, CHS'") for
2019*d5c9a868SElliott Hughes     FAT12 partition and 0x04 ("'DOS FAT16, CHS'") for FAT16 partitions
2020*d5c9a868SElliott Hughes
2021*d5c9a868SElliott Hughes   - If not covered by the above, assign 0x06 ("'DOS BIG FAT16 CHS'") if
2022*d5c9a868SElliott Hughes     partition fits entirely within the first 1024 cylinders (CHS mode)
2023*d5c9a868SElliott Hughes
2024*d5c9a868SElliott Hughes   - All remaining cases get 0x0E ("'Win95 BIG FAT16, LBA'")
2025*d5c9a868SElliott Hughes
2026*d5c9a868SElliott Hughes   If number of fat bits is not known (not specified in drive's
2027*d5c9a868SElliott Hughesdefinition), then FAT12 is assumed for all drives with less than 4096
2028*d5c9a868SElliott Hughessectors, and FAT16 for those with more than 4096 sectors.
2029*d5c9a868SElliott Hughes
2030*d5c9a868SElliott Hughes   This corresponds more or less to the definitions outlined at
2031*d5c9a868SElliott Hughes'https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs' and
2032*d5c9a868SElliott Hughes'https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc977219(v=technet.10)',
2033*d5c9a868SElliott Hugheswith two notable differences:
2034*d5c9a868SElliott Hughes
2035*d5c9a868SElliott Hughes   - If fat bits are unknown, the reference documents consider drives
2036*d5c9a868SElliott Hughes     with less than 32680 sectors to be FAT12.  Mtools uses 4096 sectors
2037*d5c9a868SElliott Hughes     as the cutoff point, as older versions of DOS only support FAT12 on
2038*d5c9a868SElliott Hughes     disks with less than 4096 sectors (and these older versions are the
2039*d5c9a868SElliott Hughes     ones which would be most likely to use FAT12 in the first place).
2040*d5c9a868SElliott Hughes
2041*d5c9a868SElliott Hughes   - The reference documents use a 8GB (wikipedia) or a 4GB (Microsoft)
2042*d5c9a868SElliott Hughes     cutoff between 0x06 ('DOS BIG FAT16 CHS') and 0x0E. Mtools uses
2043*d5c9a868SElliott Hughes     1024 cylinders.  This is because any partition beyond 1024
2044*d5c9a868SElliott Hughes     cylinders must be LBA and cannot be CHS. 8GB works out to be the
2045*d5c9a868SElliott Hughes     biggest capacity which can be represented as CHS (63 sectors, 255
2046*d5c9a868SElliott Hughes     heads and 1024 cylinders).  4GB is the capacity limit for windows
2047*d5c9a868SElliott Hughes     2000, so it makes sense that a documentation for windows 2000 would
2048*d5c9a868SElliott Hughes     specify this as the upper limit for any partition type.
2049*d5c9a868SElliott Hughes
2050*d5c9a868SElliott Hughes
2051*d5c9a868SElliott HughesFile: mtools.info,  Node: mrd,  Next: mren,  Prev: mpartition,  Up: Commands
2052*d5c9a868SElliott Hughes
2053*d5c9a868SElliott Hughes4.20 Mrd
2054*d5c9a868SElliott Hughes========
2055*d5c9a868SElliott Hughes
2056*d5c9a868SElliott HughesThe 'mrd' command is used to remove an MS-DOS subdirectory.  Its syntax
2057*d5c9a868SElliott Hughesis:
2058*d5c9a868SElliott Hughes
2059*d5c9a868SElliott Hughes     'mrd' ['-v'] MSDOSDIRECTORY [ MSDOSDIRECTORIES... ]
2060*d5c9a868SElliott Hughes
2061*d5c9a868SElliott Hughes   'Mrd' removes a directory from an MS-DOS file system.  An error
2062*d5c9a868SElliott Hughesoccurs if the directory does not exist or is not empty.
2063*d5c9a868SElliott Hughes
2064*d5c9a868SElliott Hughes
2065*d5c9a868SElliott HughesFile: mtools.info,  Node: mren,  Next: mshortname,  Prev: mrd,  Up: Commands
2066*d5c9a868SElliott Hughes
2067*d5c9a868SElliott Hughes4.21 Mren
2068*d5c9a868SElliott Hughes=========
2069*d5c9a868SElliott Hughes
2070*d5c9a868SElliott HughesThe 'mren' command is used to rename or move an existing MS-DOS file or
2071*d5c9a868SElliott Hughessubdirectory.  Its syntax is:
2072*d5c9a868SElliott Hughes
2073*d5c9a868SElliott Hughes     'mren' ['-voOsSrRA'] SOURCEFILE TARGETFILE
2074*d5c9a868SElliott Hughes
2075*d5c9a868SElliott Hughes   'Mren' renames an existing file on an MS-DOS file system.
2076*d5c9a868SElliott Hughes
2077*d5c9a868SElliott Hughes   In verbose mode, 'Mren' displays the new filename if the name
2078*d5c9a868SElliott Hughessupplied is invalid.
2079*d5c9a868SElliott Hughes
2080*d5c9a868SElliott Hughes   If the first syntax is used (only one source file), and if the target
2081*d5c9a868SElliott Hughesname doesn't contain any slashes or colons, the file (or subdirectory)
2082*d5c9a868SElliott Hughesis renamed in the same directory, instead of being moved to the current
2083*d5c9a868SElliott Hughes'mcd' directory as would be the case with 'mmove'.  Unlike the MS-DOS
2084*d5c9a868SElliott Hughesversion of 'REN', 'mren' can be used to rename directories.
2085*d5c9a868SElliott Hughes
2086*d5c9a868SElliott Hughes
2087*d5c9a868SElliott HughesFile: mtools.info,  Node: mshortname,  Next: mshowfat,  Prev: mren,  Up: Commands
2088*d5c9a868SElliott Hughes
2089*d5c9a868SElliott Hughes4.22 Mshortname
2090*d5c9a868SElliott Hughes===============
2091*d5c9a868SElliott Hughes
2092*d5c9a868SElliott HughesThe 'mshortname' command is used to display the short name of a file.
2093*d5c9a868SElliott HughesSyntax:
2094*d5c9a868SElliott Hughes
2095*d5c9a868SElliott Hughes     'mshortname' FILES
2096*d5c9a868SElliott Hughes
2097*d5c9a868SElliott Hughes   The shortname is displayed as it is stored in raw format on disk,
2098*d5c9a868SElliott Hugheswithout any character set conversion.
2099*d5c9a868SElliott Hughes
2100*d5c9a868SElliott Hughes
2101*d5c9a868SElliott HughesFile: mtools.info,  Node: mshowfat,  Next: mtoolstest,  Prev: mshortname,  Up: Commands
2102*d5c9a868SElliott Hughes
2103*d5c9a868SElliott Hughes4.23 Mshowfat
2104*d5c9a868SElliott Hughes=============
2105*d5c9a868SElliott Hughes
2106*d5c9a868SElliott HughesThe 'mshowfat' command is used to display the FAT entries for a file.
2107*d5c9a868SElliott HughesSyntax:
2108*d5c9a868SElliott Hughes
2109*d5c9a868SElliott Hughes     'mshowfat' ['-o' OFFSET] FILES
2110*d5c9a868SElliott Hughes
2111*d5c9a868SElliott Hughes   If no offset is given, a list of all clusters occupied by the file is
2112*d5c9a868SElliott Hughesprinted.  If an offset is given, only the number of the cluster
2113*d5c9a868SElliott Hughescontaining that offset is printed.
2114*d5c9a868SElliott Hughes
2115*d5c9a868SElliott Hughes
2116*d5c9a868SElliott HughesFile: mtools.info,  Node: mtoolstest,  Next: mtype,  Prev: mshowfat,  Up: Commands
2117*d5c9a868SElliott Hughes
2118*d5c9a868SElliott Hughes4.24 Mtoolstest
2119*d5c9a868SElliott Hughes===============
2120*d5c9a868SElliott Hughes
2121*d5c9a868SElliott HughesThe 'mtoolstest' command is used to tests the mtools configuration
2122*d5c9a868SElliott Hughesfiles.  To invoke it, just type 'mtoolstest' without any arguments.
2123*d5c9a868SElliott Hughes'Mtoolstest' reads the mtools configuration files, and prints the
2124*d5c9a868SElliott Hughescumulative configuration to 'stdout'.  The output can be used as a
2125*d5c9a868SElliott Hughesconfiguration file itself (although you might want to remove redundant
2126*d5c9a868SElliott Hughesclauses).  You may use this program to convert old-style configuration
2127*d5c9a868SElliott Hughesfiles into new style configuration files.
2128*d5c9a868SElliott Hughes
2129*d5c9a868SElliott Hughes
2130*d5c9a868SElliott HughesFile: mtools.info,  Node: mtype,  Next: mzip,  Prev: mtoolstest,  Up: Commands
2131*d5c9a868SElliott Hughes
2132*d5c9a868SElliott Hughes4.25 Mtype
2133*d5c9a868SElliott Hughes==========
2134*d5c9a868SElliott Hughes
2135*d5c9a868SElliott HughesThe 'mtype' command is used to display contents of an MS-DOS file.  Its
2136*d5c9a868SElliott Hughessyntax is:
2137*d5c9a868SElliott Hughes
2138*d5c9a868SElliott Hughes     'mtype' ['-ts'] MSDOSFILE [ MSDOSFILES... ]
2139*d5c9a868SElliott Hughes
2140*d5c9a868SElliott Hughes   'Mtype' displays the specified MS-DOS file on the screen.
2141*d5c9a868SElliott Hughes
2142*d5c9a868SElliott Hughes   In addition to the standard options, 'Mtype' allows the following
2143*d5c9a868SElliott Hughescommand line options:
2144*d5c9a868SElliott Hughes
2145*d5c9a868SElliott Hughes't'
2146*d5c9a868SElliott Hughes     Text file viewing.  'Mtype' translates incoming carriage
2147*d5c9a868SElliott Hughes     return/line feeds to line feeds.
2148*d5c9a868SElliott Hughes's'
2149*d5c9a868SElliott Hughes     'Mtype' strips the high bit from the data.
2150*d5c9a868SElliott Hughes
2151*d5c9a868SElliott Hughes   The 'mcd' command may be used to establish the device and the current
2152*d5c9a868SElliott Hughesworking directory (relative to MS-DOS), otherwise the default is 'A:/'.
2153*d5c9a868SElliott Hughes
2154*d5c9a868SElliott Hughes   'Mtype' returns 0 on success, 1 on utter failure, or 2 on partial
2155*d5c9a868SElliott Hughesfailure.
2156*d5c9a868SElliott Hughes
2157*d5c9a868SElliott Hughes   Unlike the MS-DOS version of 'TYPE', 'mtype' allows multiple
2158*d5c9a868SElliott Hughesarguments.
2159*d5c9a868SElliott Hughes
2160*d5c9a868SElliott Hughes
2161*d5c9a868SElliott HughesFile: mtools.info,  Node: mzip,  Prev: mtype,  Up: Commands
2162*d5c9a868SElliott Hughes
2163*d5c9a868SElliott Hughes4.26 Mzip
2164*d5c9a868SElliott Hughes=========
2165*d5c9a868SElliott Hughes
2166*d5c9a868SElliott HughesThe 'mzip' command is used to issue ZIP disk specific commands on Linux,
2167*d5c9a868SElliott HughesSolaris or HP-UX. Its syntax is:
2168*d5c9a868SElliott Hughes
2169*d5c9a868SElliott Hughes     'mzip' ['-epqrwx']
2170*d5c9a868SElliott Hughes
2171*d5c9a868SElliott Hughes   'Mzip' allows the following command line options:
2172*d5c9a868SElliott Hughes
2173*d5c9a868SElliott Hughes'e'
2174*d5c9a868SElliott Hughes     Ejects the disk.
2175*d5c9a868SElliott Hughes'f'
2176*d5c9a868SElliott Hughes     Force eject even if the disk is mounted (must be given in addition
2177*d5c9a868SElliott Hughes     to '-e').
2178*d5c9a868SElliott Hughes'r'
2179*d5c9a868SElliott Hughes     Write protect the disk.
2180*d5c9a868SElliott Hughes'w'
2181*d5c9a868SElliott Hughes     Remove write protection.
2182*d5c9a868SElliott Hughes'p'
2183*d5c9a868SElliott Hughes     Password write protect.
2184*d5c9a868SElliott Hughes'x'
2185*d5c9a868SElliott Hughes     Password protect
2186*d5c9a868SElliott Hughes'u'
2187*d5c9a868SElliott Hughes     Temporarily unprotect the disk until it is ejected.  The disk
2188*d5c9a868SElliott Hughes     becomes writable, and reverts back to its old state when ejected.
2189*d5c9a868SElliott Hughes'q'
2190*d5c9a868SElliott Hughes     Queries the status
2191*d5c9a868SElliott Hughes
2192*d5c9a868SElliott Hughes   To remove the password, set it to one of the password-less modes '-r'
2193*d5c9a868SElliott Hughesor '-w': mzip will then ask you for the password, and unlock the disk.
2194*d5c9a868SElliott HughesIf you have forgotten the password, you can get rid of it by low-level
2195*d5c9a868SElliott Hughesformatting the disk (using your SCSI adapter's BIOS setup).
2196*d5c9a868SElliott Hughes
2197*d5c9a868SElliott Hughes   The ZipTools disk shipped with the drive is also password protected.
2198*d5c9a868SElliott HughesOn MS-DOS or on a Mac, this password is automatically removed once the
2199*d5c9a868SElliott HughesZipTools have been installed.  From various articles posted to Usenet, I
2200*d5c9a868SElliott Hugheslearned that the password for the tools disk is 'APlaceForYourStuff'(1).
2201*d5c9a868SElliott HughesMzip knows about this password, and tries it first, before prompting you
2202*d5c9a868SElliott Hughesfor a password.  Thus 'mzip -w z:' unlocks the tools disk(2).  The tools
2203*d5c9a868SElliott Hughesdisk is formatted in a special way so as to be usable both in a PC and
2204*d5c9a868SElliott Hughesin a Mac.  On a PC, the Mac file system appears as a hidden file named
2205*d5c9a868SElliott Hughes'partishn.mac'.  You may erase it to reclaim the 50 Megs of space taken
2206*d5c9a868SElliott Hughesup by the Mac file system.
2207*d5c9a868SElliott Hughes
2208*d5c9a868SElliott Hughes4.26.1 Bugs
2209*d5c9a868SElliott Hughes-----------
2210*d5c9a868SElliott Hughes
2211*d5c9a868SElliott HughesThis command is a big kludge.  A proper implementation would take a
2212*d5c9a868SElliott Hughesrework of significant parts of mtools, but unfortunately I don't have
2213*d5c9a868SElliott Hughesthe time for this right now.  The main downside of this implementation
2214*d5c9a868SElliott Hughesis that it is inefficient on some architectures (several successive
2215*d5c9a868SElliott Hughescalls to mtools, which defeats mtools' caching).
2216*d5c9a868SElliott Hughes
2217*d5c9a868SElliott Hughes   ---------- Footnotes ----------
2218*d5c9a868SElliott Hughes
2219*d5c9a868SElliott Hughes   (1) To see the articles, search for 'APlaceForYourStuff' using Google
2220*d5c9a868SElliott HughesGroups
2221*d5c9a868SElliott Hughes
2222*d5c9a868SElliott Hughes   (2) I didn't know about this yet when I bought my own Zip drive.
2223*d5c9a868SElliott HughesThus I ended up reformatting my tools disk, and hence I haven't had the
2224*d5c9a868SElliott Hughesopportunity to test the password yet.  If anybody still has their tools
2225*d5c9a868SElliott Hughesdisk with the original password, could you try it out?  Thanks in
2226*d5c9a868SElliott Hughesadvance
2227*d5c9a868SElliott Hughes
2228*d5c9a868SElliott Hughes
2229*d5c9a868SElliott HughesFile: mtools.info,  Node: Compiling mtools,  Next: Porting mtools,  Prev: Commands,  Up: Top
2230*d5c9a868SElliott Hughes
2231*d5c9a868SElliott Hughes5 Architecture specific compilation flags
2232*d5c9a868SElliott Hughes*****************************************
2233*d5c9a868SElliott Hughes
2234*d5c9a868SElliott HughesTo compile mtools, first invoke './configure' before 'make'.  In
2235*d5c9a868SElliott Hughesaddition to the standard 'autoconfigure' flags, there are two
2236*d5c9a868SElliott Hughesarchitecture specific flags available.
2237*d5c9a868SElliott Hughes
2238*d5c9a868SElliott Hughes'./configure --enable-xdf'
2239*d5c9a868SElliott Hughes'./configure --disable-xdf'
2240*d5c9a868SElliott Hughes     Enables support for XDF disks.  This is on by default.  *Note
2241*d5c9a868SElliott Hughes     XDF::, for details.
2242*d5c9a868SElliott Hughes'./configure --enable-vold'
2243*d5c9a868SElliott Hughes'./configure --disable-vold'
2244*d5c9a868SElliott Hughes     Enables support for vold on Solaris.  When used in conjunction with
2245*d5c9a868SElliott Hughes     vold, mtools should use different device nodes than for direct
2246*d5c9a868SElliott Hughes     access.
2247*d5c9a868SElliott Hughes
2248*d5c9a868SElliott Hughes'./configure --enable-new-vold'
2249*d5c9a868SElliott Hughes'./configure --disable-new-vold'
2250*d5c9a868SElliott Hughes     Enables new support for vold on Solaris.  This is supposed to work
2251*d5c9a868SElliott Hughes     more smoothly than the old support.
2252*d5c9a868SElliott Hughes
2253*d5c9a868SElliott Hughes'./configure --enable-floppyd'
2254*d5c9a868SElliott Hughes'./configure --disable-floppyd'
2255*d5c9a868SElliott Hughes     Enables support for floppyd.  By default, floppyd support is
2256*d5c9a868SElliott Hughes     enabled as long as the necessary X includes and libraries are
2257*d5c9a868SElliott Hughes     available.
2258*d5c9a868SElliott Hughes
2259*d5c9a868SElliott Hughes
2260*d5c9a868SElliott HughesFile: mtools.info,  Node: Porting mtools,  Next: Command Index,  Prev: Compiling mtools,  Up: Top
2261*d5c9a868SElliott Hughes
2262*d5c9a868SElliott Hughes6 Porting mtools to architectures which are not supported yet
2263*d5c9a868SElliott Hughes*************************************************************
2264*d5c9a868SElliott Hughes
2265*d5c9a868SElliott HughesThis chapter is only interesting for those who want to port mtools to an
2266*d5c9a868SElliott Hughesarchitecture which is not yet supported.  For most common systems,
2267*d5c9a868SElliott Hughesdefault drives are already defined.  If you want to add default drives
2268*d5c9a868SElliott Hughesfor a still unsupported system, run configuration.guess, to see which
2269*d5c9a868SElliott Hughesidentification autoconf uses for that system.  This identification is of
2270*d5c9a868SElliott Hughesthe form cpu-vendor-os (for example sparc-sun-sunos).  The cpu and the
2271*d5c9a868SElliott HughesOS parts are passed to the compiler as preprocessor flags.  The OS part
2272*d5c9a868SElliott Hughesis passed to the compiler in three forms.
2273*d5c9a868SElliott Hughes  1. The complete OS name, with dots replaced by underscores.  SCO3.2v2
2274*d5c9a868SElliott Hughes     would yield sco3_2v2
2275*d5c9a868SElliott Hughes  2. The base OS name.  SCO3.2v2 would yield Sco
2276*d5c9a868SElliott Hughes  3. The base OS name plus its major version.  SCO3.2v2 would yield Sco3
2277*d5c9a868SElliott Hughes
2278*d5c9a868SElliott Hughes   All three versions are passed, if they are different.
2279*d5c9a868SElliott Hughes
2280*d5c9a868SElliott Hughes   To define the devices, use the entries for the systems that are
2281*d5c9a868SElliott Hughesalready present as templates.  In general, they have the following form:
2282*d5c9a868SElliott Hughes
2283*d5c9a868SElliott Hughes     #if (defined (my_cpu) && defined(my_os))
2284*d5c9a868SElliott Hughes     #define predefined_devices
2285*d5c9a868SElliott Hughes     struct device devices[] = {
2286*d5c9a868SElliott Hughes             { "/dev/first_drive", 'drive_letter', drive_description},
2287*d5c9a868SElliott Hughes             ...
2288*d5c9a868SElliott Hughes             { "/dev/last_drive", 'drive_letter', drive_description}
2289*d5c9a868SElliott Hughes     }
2290*d5c9a868SElliott Hughes     #define INIT_NOOP
2291*d5c9a868SElliott Hughes     #endif
2292*d5c9a868SElliott Hughes
2293*d5c9a868SElliott Hughes   "/dev/first_drive" is the name of the device or image file
2294*d5c9a868SElliott Hughesrepresenting the drive.  Drive_letter is a letter ranging from a to z
2295*d5c9a868SElliott Hughesgiving access to the drive.  Drive_description describes the type of the
2296*d5c9a868SElliott Hughesdrive:
2297*d5c9a868SElliott Hughes'ED312'
2298*d5c9a868SElliott Hughes     extra density (2.88M) 3 1/2 disk
2299*d5c9a868SElliott Hughes'HD312'
2300*d5c9a868SElliott Hughes     high density 3 1/2 disk
2301*d5c9a868SElliott Hughes'DD312'
2302*d5c9a868SElliott Hughes     double density 3 1/2 disk
2303*d5c9a868SElliott Hughes'HD514'
2304*d5c9a868SElliott Hughes     high density 5 1/4 disk
2305*d5c9a868SElliott Hughes'DD514'
2306*d5c9a868SElliott Hughes     double density 5 1/4 disk
2307*d5c9a868SElliott Hughes'DDsmall'
2308*d5c9a868SElliott Hughes     8 sector double density 5 1/4 disk
2309*d5c9a868SElliott Hughes'SS514'
2310*d5c9a868SElliott Hughes     single sided double density 5 1/4 disk
2311*d5c9a868SElliott Hughes'SSsmall'
2312*d5c9a868SElliott Hughes     single sided 8 sector double density 5 1/4 disk
2313*d5c9a868SElliott Hughes'GENFD'
2314*d5c9a868SElliott Hughes     generic floppy drive (12 bit FAT)
2315*d5c9a868SElliott Hughes'GENHD'
2316*d5c9a868SElliott Hughes     generic hard disk (16 bit FAT)
2317*d5c9a868SElliott Hughes'GEN'
2318*d5c9a868SElliott Hughes     generic device (all parameters match)
2319*d5c9a868SElliott Hughes'ZIPJAZ(flags)'
2320*d5c9a868SElliott Hughes     generic ZIP drive using normal access.  This uses partition 4.
2321*d5c9a868SElliott Hughes     'Flags' are any special flags to be passed to open.
2322*d5c9a868SElliott Hughes'RZIPJAZ(flags)'
2323*d5c9a868SElliott Hughes     generic ZIP drive using raw SCSI access.  This uses partition 4.
2324*d5c9a868SElliott Hughes     'Flags' are any special flags to be passed to open.
2325*d5c9a868SElliott Hughes'REMOTE'
2326*d5c9a868SElliott Hughes     the remote drive used for floppyd.  Unlike the other items, this
2327*d5c9a868SElliott Hughes     macro also includes the file name ($DISPLAY) and the drive letter
2328*d5c9a868SElliott Hughes     (X)
2329*d5c9a868SElliott Hughes
2330*d5c9a868SElliott Hughes   Entries may be described in more detail:
2331*d5c9a868SElliott Hughes      fat_bits,open_flags,cylinders,heads,sectors,DEF_ARG
2332*d5c9a868SElliott Hughes   or, if you need to describe an offset (file system doesn't start at
2333*d5c9a868SElliott Hughesbeginning of file system)
2334*d5c9a868SElliott Hughes      fat_bits, open_flags, cylinders, heads, sectors, offset, DEF_ARG0
2335*d5c9a868SElliott Hughes
2336*d5c9a868SElliott Hughes'fat_bits'
2337*d5c9a868SElliott Hughes     is either 12, 16 or 0.  0 means that the device accepts both types
2338*d5c9a868SElliott Hughes     of FAT.
2339*d5c9a868SElliott Hughes'open_flags'
2340*d5c9a868SElliott Hughes     may include flags such as O_NDELAY, or O_RDONLY, which might be
2341*d5c9a868SElliott Hughes     necessary to open the device.  0 means no special flags are needed.
2342*d5c9a868SElliott Hughes'cylinders,heads,sectors'
2343*d5c9a868SElliott Hughes     describe the geometry of the disk.  If cylinders is 0, the heads
2344*d5c9a868SElliott Hughes     and sectors parameters are ignored, and the drive accepts any
2345*d5c9a868SElliott Hughes     geometry.
2346*d5c9a868SElliott Hughes'offset'
2347*d5c9a868SElliott Hughes     is used if the DOS file system doesn't begin at the start of the
2348*d5c9a868SElliott Hughes     device or image file.  This is mostly useful for Atari Ram disks
2349*d5c9a868SElliott Hughes     (which contain their device driver at the beginning of the file) or
2350*d5c9a868SElliott Hughes     for DOS emulator images (which may represent a partitioned device.
2351*d5c9a868SElliott Hughes
2352*d5c9a868SElliott Hughes   Definition of defaults in the devices file should only be done if
2353*d5c9a868SElliott Hughesthese same devices are found on a large number of hosts of this type.
2354*d5c9a868SElliott HughesIn that case, could you also let me know about your new definitions, so
2355*d5c9a868SElliott Hughesthat I can include them into the next release.  For purely local file, I
2356*d5c9a868SElliott Hughesrecommend that you use the '/etc/mtools.conf' and '~/.mtoolsrc'
2357*d5c9a868SElliott Hughesconfiguration files.
2358*d5c9a868SElliott Hughes
2359*d5c9a868SElliott Hughes   However, the devices files also allows you to supply geometry setting
2360*d5c9a868SElliott Hughesroutines.  These are necessary if you want to access high capacity
2361*d5c9a868SElliott Hughesdisks.
2362*d5c9a868SElliott Hughes
2363*d5c9a868SElliott Hughes   Two routines should be supplied:
2364*d5c9a868SElliott Hughes
2365*d5c9a868SElliott Hughes  1. Reading the current parameters
2366*d5c9a868SElliott Hughes          static inline int get_parameters(int fd, struct generic_floppy_struct *floppy)
2367*d5c9a868SElliott Hughes
2368*d5c9a868SElliott Hughes     This probes the current configured geometry, and return it in the
2369*d5c9a868SElliott Hughes     structure generic_floppy_struct (which must also be declared).  Fd
2370*d5c9a868SElliott Hughes     is an open file descriptor for the device, and buf is an already
2371*d5c9a868SElliott Hughes     filled in stat structure, which may be useful.  This routine should
2372*d5c9a868SElliott Hughes     return 1 if the probing fails, and 0 otherwise.
2373*d5c9a868SElliott Hughes
2374*d5c9a868SElliott Hughes  2. Setting new parameters
2375*d5c9a868SElliott Hughes          static inline int set_parameters(int fd, struct generic_floppy_struct *floppy)
2376*d5c9a868SElliott Hughes                                           struct stat *buf)
2377*d5c9a868SElliott Hughes     This configures the geometry contained in floppy on the file
2378*d5c9a868SElliott Hughes     descriptor fd.  Buf is the result of a stat call (already filled
2379*d5c9a868SElliott Hughes     in).  This should return 1 if the new geometry cannot be
2380*d5c9a868SElliott Hughes     configured, and 0 otherwise.
2381*d5c9a868SElliott Hughes
2382*d5c9a868SElliott Hughes   A certain number of preprocessor macros should also be supplied:
2383*d5c9a868SElliott Hughes
2384*d5c9a868SElliott Hughes'TRACKS(floppy)'
2385*d5c9a868SElliott Hughes     refers to the track field in the floppy structure
2386*d5c9a868SElliott Hughes'HEADS(floppy)'
2387*d5c9a868SElliott Hughes     refers to the heads field in the floppy structure
2388*d5c9a868SElliott Hughes'SECTORS(floppy)'
2389*d5c9a868SElliott Hughes     refers to the sectors per track field in the floppy structure
2390*d5c9a868SElliott Hughes'SECTORS_PER_DISK(floppy)'
2391*d5c9a868SElliott Hughes     refers to the sectors per disk field in the floppy structure (if
2392*d5c9a868SElliott Hughes     applicable, otherwise leave undefined)
2393*d5c9a868SElliott Hughes
2394*d5c9a868SElliott Hughes'BLOCK_MAJOR'
2395*d5c9a868SElliott Hughes     major number of the floppy device, when viewed as a block device
2396*d5c9a868SElliott Hughes
2397*d5c9a868SElliott Hughes'CHAR_MAJOR'
2398*d5c9a868SElliott Hughes     major number of the floppy device, when viewed as a character
2399*d5c9a868SElliott Hughes     device (a.k.a.  "raw" device, used for fsck) (leave this undefined,
2400*d5c9a868SElliott Hughes     if your OS doesn't have raw devices)
2401*d5c9a868SElliott Hughes
2402*d5c9a868SElliott Hughes   For the truly high capacity formats (XDF, 2m, etc), there is no clean
2403*d5c9a868SElliott Hughesand documented interface yet.
2404*d5c9a868SElliott Hughes
2405*d5c9a868SElliott Hughes
2406*d5c9a868SElliott HughesFile: mtools.info,  Node: Command Index,  Next: Variable Index,  Prev: Porting mtools,  Up: Top
2407*d5c9a868SElliott Hughes
2408*d5c9a868SElliott HughesCommand Index
2409*d5c9a868SElliott Hughes*************
2410*d5c9a868SElliott Hughes
2411*d5c9a868SElliott Hughes
2412*d5c9a868SElliott HughesFile: mtools.info,  Node: Variable Index,  Next: Concept Index,  Prev: Command Index,  Up: Top
2413*d5c9a868SElliott Hughes
2414*d5c9a868SElliott HughesVariable index
2415*d5c9a868SElliott Hughes**************
2416*d5c9a868SElliott Hughes
2417*d5c9a868SElliott Hughes�[index�]
2418*d5c9a868SElliott Hughes* Menu:
2419*d5c9a868SElliott Hughes
2420*d5c9a868SElliott Hughes* cylinders:                             geometry description. (line 60)
2421*d5c9a868SElliott Hughes* drive:                                 general information.  (line  6)
2422*d5c9a868SElliott Hughes* exclusive:                             open flags.           (line  6)
2423*d5c9a868SElliott Hughes* fat_bits:                              miscellaneous variables.
2424*d5c9a868SElliott Hughes                                                               (line 11)
2425*d5c9a868SElliott Hughes* file:                                  location information. (line 10)
2426*d5c9a868SElliott Hughes* filter:                                miscellaneous flags.  (line 78)
2427*d5c9a868SElliott Hughes* heads:                                 geometry description. (line 63)
2428*d5c9a868SElliott Hughes* mformat_only:                          miscellaneous flags.  (line 74)
2429*d5c9a868SElliott Hughes* MTOOLSRC:                              Configuration.        (line 18)
2430*d5c9a868SElliott Hughes* MTOOLS_DOTTED_DIR:                     global variables.     (line  6)
2431*d5c9a868SElliott Hughes* MTOOLS_FAT_COMPATIBILITY:              global variables.     (line  6)
2432*d5c9a868SElliott Hughes* MTOOLS_LOCK_TIMEOUT:                   global variables.     (line  6)
2433*d5c9a868SElliott Hughes* MTOOLS_LOWER_CASE:                     global variables.     (line  6)
2434*d5c9a868SElliott Hughes* MTOOLS_NAME_NUMERIC_TAIL:              global variables.     (line  6)
2435*d5c9a868SElliott Hughes* MTOOLS_NO_VFAT:                        global variables.     (line  6)
2436*d5c9a868SElliott Hughes* MTOOLS_SKIP_CHECK:                     global variables.     (line  6)
2437*d5c9a868SElliott Hughes* MTOOLS_TWENTY_FOUR_HOUR_CLOCK:         global variables.     (line  6)
2438*d5c9a868SElliott Hughes* nodelay:                               open flags.           (line  6)
2439*d5c9a868SElliott Hughes* sectors:                               geometry description. (line 65)
2440*d5c9a868SElliott Hughes* sync:                                  open flags.           (line  6)
2441*d5c9a868SElliott Hughes* tracks:                                geometry description. (line 60)
2442*d5c9a868SElliott Hughes* use_xdf:                               miscellaneous flags.  (line 70)
2443*d5c9a868SElliott Hughes
2444*d5c9a868SElliott Hughes
2445*d5c9a868SElliott HughesFile: mtools.info,  Node: Concept Index,  Prev: Variable Index,  Up: Top
2446*d5c9a868SElliott Hughes
2447*d5c9a868SElliott HughesConcept index
2448*d5c9a868SElliott Hughes*************
2449*d5c9a868SElliott Hughes
2450*d5c9a868SElliott Hughes�[index�]
2451*d5c9a868SElliott Hughes* Menu:
2452*d5c9a868SElliott Hughes
2453*d5c9a868SElliott Hughes* 2m:                                    2m.                   (line  6)
2454*d5c9a868SElliott Hughes* ALPHA patches:                         Location.             (line  6)
2455*d5c9a868SElliott Hughes* APlaceForYourStuff:                    mzip.                 (line  6)
2456*d5c9a868SElliott Hughes* Archive bit:                           mattrib.              (line  6)
2457*d5c9a868SElliott Hughes* Atari:                                 miscellaneous flags.  (line 66)
2458*d5c9a868SElliott Hughes* Atari Ram disk:                        location information. (line 28)
2459*d5c9a868SElliott Hughes* Backwards compatibility:               old style configuration.
2460*d5c9a868SElliott Hughes                                                               (line  6)
2461*d5c9a868SElliott Hughes* Bad blocks:                            mbadblocks.           (line  6)
2462*d5c9a868SElliott Hughes* bigger sectors:                        bigger sectors.       (line  6)
2463*d5c9a868SElliott Hughes* blocksize:                             miscellaneous variables.
2464*d5c9a868SElliott Hughes                                                               (line 60)
2465*d5c9a868SElliott Hughes* bugs:                                  Location.             (line  6)
2466*d5c9a868SElliott Hughes* Case sensitivity:                      case sensitivity.     (line  6)
2467*d5c9a868SElliott Hughes* Changing file attributes:              mattrib.              (line  6)
2468*d5c9a868SElliott Hughes* character devices:                     miscellaneous variables.
2469*d5c9a868SElliott Hughes                                                               (line 60)
2470*d5c9a868SElliott Hughes* Checking configuration file:           mtoolstest.           (line  6)
2471*d5c9a868SElliott Hughes* Clusters of a file:                    mshowfat.             (line  6)
2472*d5c9a868SElliott Hughes* Command list:                          Commands.             (line  6)
2473*d5c9a868SElliott Hughes* Compile time configuration:            Compiling mtools.     (line  6)
2474*d5c9a868SElliott Hughes* Compiled-in defaults:                  Porting mtools.       (line  6)
2475*d5c9a868SElliott Hughes* Concatenating MS-DOS files:            mcopy.                (line  6)
2476*d5c9a868SElliott Hughes* Configuration file:                    default values.       (line  6)
2477*d5c9a868SElliott Hughes* Configuration file name:               configuration file location.
2478*d5c9a868SElliott Hughes                                                               (line  6)
2479*d5c9a868SElliott Hughes* Configuration file name (parsing order): parsing order.      (line  6)
2480*d5c9a868SElliott Hughes* Configuration file parsing order:      parsing order.        (line  6)
2481*d5c9a868SElliott Hughes* Configuration file syntax:             general syntax.       (line  6)
2482*d5c9a868SElliott Hughes* Configuration file, old syntax:        old style configuration.
2483*d5c9a868SElliott Hughes                                                               (line  6)
2484*d5c9a868SElliott Hughes* Configuration files:                   Configuration.        (line 18)
2485*d5c9a868SElliott Hughes* Configuration of disk geometry:        geometry description. (line  6)
2486*d5c9a868SElliott Hughes* Copying an entire disk image:          mcat.                 (line  9)
2487*d5c9a868SElliott Hughes* Copying MS-DOS files:                  mcopy.                (line  6)
2488*d5c9a868SElliott Hughes* CR/LF conversions:                     mcopy.                (line  6)
2489*d5c9a868SElliott Hughes* Creating a directory:                  mmd.                  (line  6)
2490*d5c9a868SElliott Hughes* Current working directory:             directory.            (line  6)
2491*d5c9a868SElliott Hughes* Current working directory (changing the): mcd.               (line  6)
2492*d5c9a868SElliott Hughes* Default configuration:                 default values.       (line  6)
2493*d5c9a868SElliott Hughes* Default directory:                     directory.            (line  6)
2494*d5c9a868SElliott Hughes* Default directory (changing the):      mcd.                  (line  6)
2495*d5c9a868SElliott Hughes* Default values:                        default values.       (line  6)
2496*d5c9a868SElliott Hughes* Deleting a directory:                  mrd.                  (line  6)
2497*d5c9a868SElliott Hughes* deleting an MS-DOS directory recursively: mdeltree.          (line  6)
2498*d5c9a868SElliott Hughes* deleting MS-DOS files:                 mdel.                 (line  6)
2499*d5c9a868SElliott Hughes* Description of disk geometry:          geometry description. (line  6)
2500*d5c9a868SElliott Hughes* diffs:                                 Location.             (line  6)
2501*d5c9a868SElliott Hughes* Directory:                             directory.            (line  6)
2502*d5c9a868SElliott Hughes* Directory (changing):                  mcd.                  (line  6)
2503*d5c9a868SElliott Hughes* Directory creation:                    mmd.                  (line  6)
2504*d5c9a868SElliott Hughes* Directory listing:                     mdir.                 (line  6)
2505*d5c9a868SElliott Hughes* Directory removing:                    mrd.                  (line  6)
2506*d5c9a868SElliott Hughes* disable locking:                       miscellaneous flags.  (line 11)
2507*d5c9a868SElliott Hughes* Disk Geometry:                         geometry description. (line  6)
2508*d5c9a868SElliott Hughes* Disk image:                            mcat.                 (line  9)
2509*d5c9a868SElliott Hughes* Disk label:                            mlabel.               (line  6)
2510*d5c9a868SElliott Hughes* DMF disks:                             more sectors.         (line  6)
2511*d5c9a868SElliott Hughes* DOSEMU hard disk image:                location information. (line 14)
2512*d5c9a868SElliott Hughes* Drive configuration:                   per drive variables.  (line  6)
2513*d5c9a868SElliott Hughes* Drive configuration, example:          general information.  (line  6)
2514*d5c9a868SElliott Hughes* Drive description:                     per drive variables.  (line  6)
2515*d5c9a868SElliott Hughes* Drive description, example:            general information.  (line  6)
2516*d5c9a868SElliott Hughes* Drive independent configuration variables: global variables. (line  6)
2517*d5c9a868SElliott Hughes* du:                                    mdu.                  (line  6)
2518*d5c9a868SElliott Hughes* Duplicate file names:                  name clashes.         (line  6)
2519*d5c9a868SElliott Hughes* Ejecting a Zip/Jaz disk:               mzip.                 (line  6)
2520*d5c9a868SElliott Hughes* Environmental variables:               global variables.     (line  6)
2521*d5c9a868SElliott Hughes* Erasing a directory:                   mrd.                  (line  6)
2522*d5c9a868SElliott Hughes* erasing an MS-DOS directory recursively: mdeltree.           (line  6)
2523*d5c9a868SElliott Hughes* erasing MS-DOS files:                  mdel.                 (line  6)
2524*d5c9a868SElliott Hughes* exclusive access to a drive:           open flags.           (line  6)
2525*d5c9a868SElliott Hughes* Executing commands before opening the device: miscellaneous variables.
2526*d5c9a868SElliott Hughes                                                               (line 54)
2527*d5c9a868SElliott Hughes* Fat:                                   mshowfat.             (line  6)
2528*d5c9a868SElliott Hughes* fdformat:                              more sectors.         (line  6)
2529*d5c9a868SElliott Hughes* File name of device node:              location information. (line 10)
2530*d5c9a868SElliott Hughes* File system creation:                  mformat.              (line  6)
2531*d5c9a868SElliott Hughes* Filenames:                             arguments.            (line  6)
2532*d5c9a868SElliott Hughes* floppyd:                               floppyd.              (line  6)
2533*d5c9a868SElliott Hughes* Floppyd cat:                           mcat.                 (line  9)
2534*d5c9a868SElliott Hughes* floppyd_installtest:                   floppyd_installtest.  (line  6)
2535*d5c9a868SElliott Hughes* Format of disk:                        geometry description. (line  6)
2536*d5c9a868SElliott Hughes* Formats, high capacity:                high capacity formats.
2537*d5c9a868SElliott Hughes                                                               (line  6)
2538*d5c9a868SElliott Hughes* Formatting disks:                      mformat.              (line  6)
2539*d5c9a868SElliott Hughes* FreeDOS:                               global variables.     (line  6)
2540*d5c9a868SElliott Hughes* getting parameters of a MS-DOS file system: minfo.           (line  6)
2541*d5c9a868SElliott Hughes* Global configuration variables:        global variables.     (line  6)
2542*d5c9a868SElliott Hughes* Hdimage:                               location information. (line  6)
2543*d5c9a868SElliott Hughes* Hidden files:                          mattrib.              (line  6)
2544*d5c9a868SElliott Hughes* High capacity formats:                 high capacity formats.
2545*d5c9a868SElliott Hughes                                                               (line  6)
2546*d5c9a868SElliott Hughes* High capacity formats, mounting:       mmount.               (line  6)
2547*d5c9a868SElliott Hughes* High density disk:                     geometry description. (line  6)
2548*d5c9a868SElliott Hughes* Image file:                            location information. (line 10)
2549*d5c9a868SElliott Hughes* Initializing disks:                    mformat.              (line  6)
2550*d5c9a868SElliott Hughes* Jaz disk (utilities):                  mzip.                 (line  6)
2551*d5c9a868SElliott Hughes* Jaz disks (partitioning them):         mpartition.           (line  6)
2552*d5c9a868SElliott Hughes* Jaz disks (partitions):                location information. (line 14)
2553*d5c9a868SElliott Hughes* Jaz disks (raw SCSI access):           miscellaneous flags.  (line 17)
2554*d5c9a868SElliott Hughes* Labeling a disk:                       mlabel.               (line  6)
2555*d5c9a868SElliott Hughes* Linux enhancements (High Capacity Formats): high capacity formats.
2556*d5c9a868SElliott Hughes                                                               (line  6)
2557*d5c9a868SElliott Hughes* Linux enhancements (mmount):           mmount.               (line  6)
2558*d5c9a868SElliott Hughes* List of available commands:            Commands.             (line  6)
2559*d5c9a868SElliott Hughes* Listing a directory:                   mdir.                 (line  6)
2560*d5c9a868SElliott Hughes* Listing space occupied by directories and files: mdu.        (line  6)
2561*d5c9a868SElliott Hughes* Location of configuration files:       configuration file location.
2562*d5c9a868SElliott Hughes                                                               (line  6)
2563*d5c9a868SElliott Hughes* Location of configuration files (parsing order): parsing order.
2564*d5c9a868SElliott Hughes                                                               (line  6)
2565*d5c9a868SElliott Hughes* locking (disabling it):                miscellaneous flags.  (line 11)
2566*d5c9a868SElliott Hughes* Long file name:                        long names.           (line  6)
2567*d5c9a868SElliott Hughes* Low density disk:                      geometry description. (line  6)
2568*d5c9a868SElliott Hughes* Magneto-optical disks:                 location information. (line 14)
2569*d5c9a868SElliott Hughes* mailing list:                          Location.             (line  6)
2570*d5c9a868SElliott Hughes* Making a directory:                    mmd.                  (line  6)
2571*d5c9a868SElliott Hughes* Marking blocks as bad:                 mbadblocks.           (line  6)
2572*d5c9a868SElliott Hughes* mattrib:                               mattrib.              (line  6)
2573*d5c9a868SElliott Hughes* mbadblocks:                            mbadblocks.           (line  6)
2574*d5c9a868SElliott Hughes* mcat:                                  mcat.                 (line  9)
2575*d5c9a868SElliott Hughes* mcd:                                   mcd.                  (line  6)
2576*d5c9a868SElliott Hughes* mcd (introduction):                    directory.            (line  6)
2577*d5c9a868SElliott Hughes* mcopy:                                 mcopy.                (line  6)
2578*d5c9a868SElliott Hughes* Mcwd file:                             mcd.                  (line  6)
2579*d5c9a868SElliott Hughes* mdel:                                  mdel.                 (line  6)
2580*d5c9a868SElliott Hughes* mdeltree:                              mdeltree.             (line  6)
2581*d5c9a868SElliott Hughes* mdir:                                  mdir.                 (line  6)
2582*d5c9a868SElliott Hughes* mdu:                                   mdu.                  (line  6)
2583*d5c9a868SElliott Hughes* mformat:                               mformat.              (line  6)
2584*d5c9a868SElliott Hughes* mformat (geometry used for):           geometry description. (line  6)
2585*d5c9a868SElliott Hughes* mformat parameters:                    minfo.                (line  6)
2586*d5c9a868SElliott Hughes* minfo:                                 minfo.                (line  6)
2587*d5c9a868SElliott Hughes* mkmanifest:                            mkmanifest.           (line  6)
2588*d5c9a868SElliott Hughes* mlabel:                                mlabel.               (line  6)
2589*d5c9a868SElliott Hughes* mmd:                                   mmd.                  (line  6)
2590*d5c9a868SElliott Hughes* mmount:                                mmount.               (line  6)
2591*d5c9a868SElliott Hughes* mmove:                                 mmove.                (line  6)
2592*d5c9a868SElliott Hughes* Mounting a disk:                       mmount.               (line  6)
2593*d5c9a868SElliott Hughes* Moving files (mmove):                  mmove.                (line  6)
2594*d5c9a868SElliott Hughes* Moving files (mren):                   mren.                 (line  6)
2595*d5c9a868SElliott Hughes* mpartition:                            mpartition.           (line  6)
2596*d5c9a868SElliott Hughes* mrd:                                   mrd.                  (line  6)
2597*d5c9a868SElliott Hughes* mren:                                  mren.                 (line  6)
2598*d5c9a868SElliott Hughes* mshortname:                            mshortname.           (line  6)
2599*d5c9a868SElliott Hughes* mshowfat:                              mshowfat.             (line  6)
2600*d5c9a868SElliott Hughes* mtoolstest:                            mtoolstest.           (line  6)
2601*d5c9a868SElliott Hughes* mzip:                                  mzip.                 (line  6)
2602*d5c9a868SElliott Hughes* Name clashes:                          name clashes.         (line  6)
2603*d5c9a868SElliott Hughes* Name of configuration files:           configuration file location.
2604*d5c9a868SElliott Hughes                                                               (line  6)
2605*d5c9a868SElliott Hughes* Name of configuration files (parsing order): parsing order.  (line  6)
2606*d5c9a868SElliott Hughes* Name of device node:                   location information. (line 10)
2607*d5c9a868SElliott Hughes* Occupation of space by directories and files: mdu.           (line  6)
2608*d5c9a868SElliott Hughes* Odd formats:                           high capacity formats.
2609*d5c9a868SElliott Hughes                                                               (line  6)
2610*d5c9a868SElliott Hughes* Old configuration file syntax:         old style configuration.
2611*d5c9a868SElliott Hughes                                                               (line  6)
2612*d5c9a868SElliott Hughes* open flags:                            open flags.           (line  6)
2613*d5c9a868SElliott Hughes* Options:                               arguments.            (line  6)
2614*d5c9a868SElliott Hughes* OS/2 (layout of removable media):      location information. (line 14)
2615*d5c9a868SElliott Hughes* OS/2 (XDF disks):                      XDF.                  (line  6)
2616*d5c9a868SElliott Hughes* Overwriting files:                     name clashes.         (line  6)
2617*d5c9a868SElliott Hughes* packing list:                          mkmanifest.           (line  6)
2618*d5c9a868SElliott Hughes* Parsing order:                         parsing order.        (line  6)
2619*d5c9a868SElliott Hughes* Partitioned image file:                location information. (line 14)
2620*d5c9a868SElliott Hughes* partitions (creating):                 mpartition.           (line  6)
2621*d5c9a868SElliott Hughes* password protected Zip disks:          mzip.                 (line  6)
2622*d5c9a868SElliott Hughes* patches:                               Location.             (line  6)
2623*d5c9a868SElliott Hughes* plain floppy: device xxx busy:         miscellaneous flags.  (line 11)
2624*d5c9a868SElliott Hughes* Porting:                               Porting mtools.       (line  6)
2625*d5c9a868SElliott Hughes* Primary file name (long names):        long names.           (line  6)
2626*d5c9a868SElliott Hughes* Primary file name (name clashes):      name clashes.         (line  6)
2627*d5c9a868SElliott Hughes* Ram disk:                              location information. (line 28)
2628*d5c9a868SElliott Hughes* raw device:                            miscellaneous variables.
2629*d5c9a868SElliott Hughes                                                               (line 60)
2630*d5c9a868SElliott Hughes* Read errors:                           mbadblocks.           (line  6)
2631*d5c9a868SElliott Hughes* Read-only files (changing the attribute): mattrib.           (line  6)
2632*d5c9a868SElliott Hughes* Read-only files (listing them):        mdir.                 (line  6)
2633*d5c9a868SElliott Hughes* Reading MS-DOS files:                  mcopy.                (line  6)
2634*d5c9a868SElliott Hughes* recursively removing an MS-DOS directory: mdeltree.          (line  6)
2635*d5c9a868SElliott Hughes* remote floppy access:                  floppyd.              (line  6)
2636*d5c9a868SElliott Hughes* remote floppy access <1>:              floppyd_installtest.  (line  6)
2637*d5c9a868SElliott Hughes* Removable media:                       location information. (line 14)
2638*d5c9a868SElliott Hughes* Removing a directory:                  mrd.                  (line  6)
2639*d5c9a868SElliott Hughes* removing an MS-DOS directory recursively: mdeltree.          (line  6)
2640*d5c9a868SElliott Hughes* removing MS-DOS files:                 mdel.                 (line  6)
2641*d5c9a868SElliott Hughes* Renaming files (mmove):                mmove.                (line  6)
2642*d5c9a868SElliott Hughes* Renaming files (mren):                 mren.                 (line  6)
2643*d5c9a868SElliott Hughes* SCSI devices:                          miscellaneous flags.  (line 17)
2644*d5c9a868SElliott Hughes* Secondary file name (long names):      long names.           (line  6)
2645*d5c9a868SElliott Hughes* Secondary file name (name clashes):    name clashes.         (line  6)
2646*d5c9a868SElliott Hughes* setgid installation:                   miscellaneous flags.  (line 40)
2647*d5c9a868SElliott Hughes* setuid installation:                   miscellaneous flags.  (line 40)
2648*d5c9a868SElliott Hughes* setuid installation (needed for raw SCSI I/O): miscellaneous flags.
2649*d5c9a868SElliott Hughes                                                               (line 17)
2650*d5c9a868SElliott Hughes* Solaris (compile time configuration of vold): Compiling mtools.
2651*d5c9a868SElliott Hughes                                                               (line  6)
2652*d5c9a868SElliott Hughes* Solaris (Raw access to SCSI devices such as Zip & Jaz): miscellaneous flags.
2653*d5c9a868SElliott Hughes                                                               (line 17)
2654*d5c9a868SElliott Hughes* Solaris (volcheck):                    miscellaneous variables.
2655*d5c9a868SElliott Hughes                                                               (line 54)
2656*d5c9a868SElliott Hughes* Solaris (vold):                        miscellaneous flags.  (line 57)
2657*d5c9a868SElliott Hughes* Space occupied by directories and files: mdu.                (line  6)
2658*d5c9a868SElliott Hughes* Special formats:                       high capacity formats.
2659*d5c9a868SElliott Hughes                                                               (line  6)
2660*d5c9a868SElliott Hughes* Subdirectory creation:                 mmd.                  (line  6)
2661*d5c9a868SElliott Hughes* Subdirectory removing:                 mrd.                  (line  6)
2662*d5c9a868SElliott Hughes* SunOS (Raw access to SCSI devices such as Zip & Jaz): miscellaneous flags.
2663*d5c9a868SElliott Hughes                                                               (line 17)
2664*d5c9a868SElliott Hughes* synchronous writing:                   open flags.           (line  6)
2665*d5c9a868SElliott Hughes* Syntax of the configuration file:      general syntax.       (line  6)
2666*d5c9a868SElliott Hughes* Syquest disks:                         location information. (line 14)
2667*d5c9a868SElliott Hughes* Syquest disks (raw SCSI access):       miscellaneous flags.  (line 17)
2668*d5c9a868SElliott Hughes* System files:                          mattrib.              (line  6)
2669*d5c9a868SElliott Hughes* Testing configuration file for correctness: mtoolstest.      (line  6)
2670*d5c9a868SElliott Hughes* Text files:                            mcopy.                (line  6)
2671*d5c9a868SElliott Hughes* Tools disk (Zip and Jaz drives):       mzip.                 (line  6)
2672*d5c9a868SElliott Hughes* Verifying configuration file:          mtoolstest.           (line  6)
2673*d5c9a868SElliott Hughes* VFAT-style file names:                 long names.           (line  6)
2674*d5c9a868SElliott Hughes* vgacopy:                               more sectors.         (line  6)
2675*d5c9a868SElliott Hughes* Vold (compile time configuration):     Compiling mtools.     (line  6)
2676*d5c9a868SElliott Hughes* Vold (mediamgr):                       miscellaneous flags.  (line 57)
2677*d5c9a868SElliott Hughes* Weird formats:                         high capacity formats.
2678*d5c9a868SElliott Hughes                                                               (line  6)
2679*d5c9a868SElliott Hughes* Windows 95 (DMF disks):                more sectors.         (line  6)
2680*d5c9a868SElliott Hughes* Windows 95-style file names:           long names.           (line  6)
2681*d5c9a868SElliott Hughes* Windows NT (layout of removable media): location information.
2682*d5c9a868SElliott Hughes                                                               (line 14)
2683*d5c9a868SElliott Hughes* Wordswapped:                           miscellaneous flags.  (line 66)
2684*d5c9a868SElliott Hughes* Working directory:                     directory.            (line  6)
2685*d5c9a868SElliott Hughes* Working directory <1>:                 mcd.                  (line  6)
2686*d5c9a868SElliott Hughes* Write protecting a Zip/Jaz disk:       mzip.                 (line  6)
2687*d5c9a868SElliott Hughes* Writing MS-DOS files:                  mcopy.                (line  6)
2688*d5c9a868SElliott Hughes* X terminal:                            floppyd.              (line  6)
2689*d5c9a868SElliott Hughes* X terminal <1>:                        floppyd_installtest.  (line  6)
2690*d5c9a868SElliott Hughes* XDF disks:                             XDF.                  (line  6)
2691*d5c9a868SElliott Hughes* XDF disks (compile time configuration): Compiling mtools.    (line  6)
2692*d5c9a868SElliott Hughes* XDF disks (how to configure):          miscellaneous flags.  (line 70)
2693*d5c9a868SElliott Hughes* Zip disk (utilities):                  mzip.                 (line  6)
2694*d5c9a868SElliott Hughes* Zip disks (partitioning them):         mpartition.           (line  6)
2695*d5c9a868SElliott Hughes* Zip disks (partitions):                location information. (line 14)
2696*d5c9a868SElliott Hughes* Zip disks (raw SCSI access):           miscellaneous flags.  (line 17)
2697*d5c9a868SElliott Hughes* ZipTools disk:                         mzip.                 (line  6)
2698*d5c9a868SElliott Hughes
2699*d5c9a868SElliott Hughes
2700*d5c9a868SElliott Hughes
2701*d5c9a868SElliott HughesTag Table:
2702*d5c9a868SElliott HughesNode: Top871
2703*d5c9a868SElliott HughesNode: Location3127
2704*d5c9a868SElliott HughesNode: Common features4065
2705*d5c9a868SElliott HughesNode: arguments4829
2706*d5c9a868SElliott HughesNode: drive letters6594
2707*d5c9a868SElliott HughesNode: directory7948
2708*d5c9a868SElliott HughesNode: long names8394
2709*d5c9a868SElliott HughesNode: name clashes10940
2710*d5c9a868SElliott HughesNode: case sensitivity13224
2711*d5c9a868SElliott HughesNode: high capacity formats14461
2712*d5c9a868SElliott HughesNode: more sectors15506
2713*d5c9a868SElliott HughesNode: bigger sectors16561
2714*d5c9a868SElliott HughesNode: 2m17290
2715*d5c9a868SElliott HughesNode: XDF18476
2716*d5c9a868SElliott HughesNode: exit codes19819
2717*d5c9a868SElliott HughesNode: bugs20457
2718*d5c9a868SElliott HughesNode: Configuration20990
2719*d5c9a868SElliott HughesNode: configuration file location22279
2720*d5c9a868SElliott HughesNode: general syntax22732
2721*d5c9a868SElliott HughesNode: default values23563
2722*d5c9a868SElliott HughesNode: global variables24091
2723*d5c9a868SElliott HughesNode: per drive variables26284
2724*d5c9a868SElliott HughesNode: general information27119
2725*d5c9a868SElliott HughesNode: location information27561
2726*d5c9a868SElliott HughesNode: geometry description29090
2727*d5c9a868SElliott HughesNode: open flags32951
2728*d5c9a868SElliott HughesNode: miscellaneous variables33551
2729*d5c9a868SElliott HughesNode: miscellaneous flags37141
2730*d5c9a868SElliott HughesNode: multiple descriptions40771
2731*d5c9a868SElliott HughesNode: parsing order42445
2732*d5c9a868SElliott HughesNode: old style configuration43476
2733*d5c9a868SElliott HughesNode: Commands44175
2734*d5c9a868SElliott HughesNode: floppyd46057
2735*d5c9a868SElliott HughesNode: floppyd_installtest50850
2736*d5c9a868SElliott HughesNode: mattrib51481
2737*d5c9a868SElliott HughesNode: mbadblocks53276
2738*d5c9a868SElliott HughesNode: mcat54570
2739*d5c9a868SElliott HughesNode: mcd55384
2740*d5c9a868SElliott HughesNode: mcopy56239
2741*d5c9a868SElliott HughesNode: mdel59249
2742*d5c9a868SElliott HughesNode: mdeltree59588
2743*d5c9a868SElliott HughesNode: mdir60005
2744*d5c9a868SElliott HughesNode: mdu61281
2745*d5c9a868SElliott HughesNode: mformat61787
2746*d5c9a868SElliott HughesNode: mkmanifest70298
2747*d5c9a868SElliott HughesNode: minfo72272
2748*d5c9a868SElliott HughesNode: mlabel72842
2749*d5c9a868SElliott HughesNode: mmd73995
2750*d5c9a868SElliott HughesNode: mmount74344
2751*d5c9a868SElliott HughesNode: mmove74947
2752*d5c9a868SElliott HughesNode: mpartition75752
2753*d5c9a868SElliott HughesNode: mrd81278
2754*d5c9a868SElliott HughesNode: mren81636
2755*d5c9a868SElliott HughesNode: mshortname82385
2756*d5c9a868SElliott HughesNode: mshowfat82715
2757*d5c9a868SElliott HughesNode: mtoolstest83124
2758*d5c9a868SElliott HughesNode: mtype83696
2759*d5c9a868SElliott HughesNode: mzip84547
2760*d5c9a868SElliott HughesRef: mzip-Footnote-186572
2761*d5c9a868SElliott HughesRef: mzip-Footnote-286653
2762*d5c9a868SElliott HughesNode: Compiling mtools86940
2763*d5c9a868SElliott HughesNode: Porting mtools88039
2764*d5c9a868SElliott HughesNode: Command Index93947
2765*d5c9a868SElliott HughesNode: Variable Index94075
2766*d5c9a868SElliott HughesNode: Concept Index95898
2767*d5c9a868SElliott Hughes
2768*d5c9a868SElliott HughesEnd Tag Table
2769*d5c9a868SElliott Hughes
2770*d5c9a868SElliott Hughes
2771*d5c9a868SElliott HughesLocal Variables:
2772*d5c9a868SElliott Hughescoding: utf-8
2773*d5c9a868SElliott HughesEnd:
2774