version 2 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
mtools.1 |
|
|
2 |
!!!mtools.1 |
|
|
3 |
Name |
|
|
4 |
Description |
|
|
5 |
See also |
|
|
6 |
---- |
|
|
7 |
!!Name |
|
|
8 |
|
|
|
9 |
|
|
|
10 |
mtools.conf - mtools configuration files |
|
|
11 |
!!Description |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
This manpage describes the configuration files for mtools. |
|
|
15 |
They are called `/usr/local/etc/mtools.conf' and |
|
|
16 |
`~/.mtoolsrc'. If the environmental variable |
|
|
17 |
MTOOLSRC is set, its contents is used as the |
|
|
18 |
filename for a third configuration file. These configuration |
|
|
19 |
files describe the following items: |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
* Global configuration flags and variables |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
* Per drive flags and variables |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
* Character translation tables |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
__Location of the configuration files__ |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
`/usr/local/etc/mtools.conf' is the system-wide |
|
|
35 |
configuration file, and `~/.mtoolsrc' is the user's |
|
|
36 |
private configuration file. |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
On some systems, the system-wide configuration file is |
|
|
40 |
called `/etc/defaults/mtools.conf' |
|
|
41 |
instead. |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
__General configuration file syntax__ |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
The configuration files is made up of sections. Each section |
|
|
48 |
starts with a keyword identifying the section followed by a |
|
|
49 |
colon. Then follow variable assignments and flags. Variable |
|
|
50 |
assignments take the following form: name=value |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
Flags are lone keywords without an equal sign and value |
|
|
54 |
following them. A section either ends at the end of the file |
|
|
55 |
or where the next section begins. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
Lines starting with a hash (#) are comments. |
|
|
59 |
Newline characters are equivalent to whitespace (except |
|
|
60 |
where ending a comment). The configuration file is case |
|
|
61 |
insensitive, except for item enclosed in quotes (such as |
|
|
62 |
filenames). |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
__Default values__ |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
For most platforms, mtools contains reasonable compiled-in |
|
|
69 |
defaults for physical floppy drives. Thus, you usually don't |
|
|
70 |
need to bother with the configuration file, if all you want |
|
|
71 |
to do with mtools is to access your floppy drives. On the |
|
|
72 |
other hand, the configuration file is needed if you also |
|
|
73 |
want to use mtools to access your hard disk partitions and |
|
|
74 |
dosemu image files. |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
__Global variables__ |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
Global flags may be set to 1 or to 0. |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
The following global flags are recognized: |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
MTOOLS_SKIP_CHECK |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
If this is set to 1, mtools skips most of its sanity checks. |
|
|
90 |
This is needed to read some Atari disks which have been made |
|
|
91 |
with the earlier ROMs, and which would not be recognized |
|
|
92 |
otherwise. |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
MTOOLS_FAT_COMPATIBILITY |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
If this is set to 1, mtools skips the fat size checks. Some |
|
|
99 |
disks have a bigger FAT than they really need to. These are |
|
|
100 |
rejected if this option is not set. |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
MTOOLS_LOWER_CASE |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
If this is set to 1, mtools displays all-upper-case short |
|
|
107 |
filenames as lowercase. This has been done to allow a |
|
|
108 |
behavior which is consistent with older versions of mtools |
|
|
109 |
which didn't know about the case bits. |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
MTOOLS_NO_VFAT |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
If this is set to 1, mtools won't generate VFAT entries for |
|
|
116 |
filenames which are mixed-case, but otherwise legal dos |
|
|
117 |
filenames. This is useful when working with DOS versions |
|
|
118 |
which can't grok VFAT longnames, such as |
|
|
119 |
!FreeDos. |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
MTOOLS_DOTTED_DIR |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
In a wide directory, prints the short name with a dot |
|
|
126 |
instead of spaces separating the basename and the |
|
|
127 |
extension. |
|
|
128 |
|
|
|
129 |
|
|
|
130 |
MTOOLS_NAME_NUMERIC_TAIL |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
If this is set to one (default), generate numeric tails for |
|
|
134 |
all long names (~1). If set to zero, only generate numeric |
|
|
135 |
tails if otherwise a clash would have happened. |
|
|
136 |
|
|
|
137 |
|
|
|
138 |
MTOOLS_TWENTY_FOUR_HOUR_CLOCK |
|
|
139 |
|
|
|
140 |
|
|
|
141 |
If 1, uses the European notation for times (twenty four hour |
|
|
142 |
clock), else uses the UK/US notation (am/pm) |
|
|
143 |
|
|
|
144 |
|
|
|
145 |
Example: Inserting the following line into your |
|
|
146 |
configuration file instructs mtools to skip the sanity |
|
|
147 |
checks: |
|
|
148 |
|
|
|
149 |
|
|
|
150 |
__ MTOOLS_SKIP_CHECK=1 |
|
|
151 |
__ |
|
|
152 |
|
|
|
153 |
|
|
|
154 |
Global variables may also be set via the |
|
|
155 |
environment: |
|
|
156 |
|
|
|
157 |
|
|
|
158 |
__ export MTOOLS_SKIP_CHECK=1 |
|
|
159 |
__ |
|
|
160 |
|
|
|
161 |
|
|
|
162 |
Global string variables may be set to any |
|
|
163 |
value: |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
MTOOLS_DATE_STRING |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
The format used for printing dates of files. By default, is |
|
|
170 |
dd-mm-yyyy. |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
__Per drive flags and variables__ |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
__General information__ |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
Per drive flags and values may be described in a drive |
|
|
180 |
section. A drive section starts with drive |
|
|
181 |
driveletter'''' |
|
|
182 |
|
|
|
183 |
|
|
|
184 |
Then follow variable-value pairs and flags. |
|
|
185 |
|
|
|
186 |
|
|
|
187 |
This is a sample drive description: |
|
|
188 |
|
|
|
189 |
|
|
|
190 |
__ drive a: |
|
|
191 |
file= |
|
|
192 |
__ |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
__Disk Geometry Configuration__ |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
Geometry information describes the physical characteristics |
|
|
199 |
about the disk. Its has three purposes: |
|
|
200 |
|
|
|
201 |
|
|
|
202 |
formatting |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
The geometry information is written into the boot sector of |
|
|
206 |
the newly made disk. However, you may also describe the |
|
|
207 |
geometry information on the command line. See section |
|
|
208 |
mformat, for details. |
|
|
209 |
|
|
|
210 |
|
|
|
211 |
filtering |
|
|
212 |
|
|
|
213 |
|
|
|
214 |
On some Unices there are device nodes which only support one |
|
|
215 |
physical geometry. For instance, you might need a different |
|
|
216 |
node to access a disk as high density or as low density. The |
|
|
217 |
geometry is compared to the actual geometry stored on the |
|
|
218 |
boot sector to make sure that this device node is able to |
|
|
219 |
correctly read the disk. If the geometry doesn't match, this |
|
|
220 |
drive entry fails, and the next drive entry bearing the same |
|
|
221 |
drive letter is tried. See section multiple descriptions, |
|
|
222 |
for more details on supplying several descriptions for one |
|
|
223 |
drive letter. |
|
|
224 |
|
|
|
225 |
|
|
|
226 |
If no geometry information is supplied in the configuration |
|
|
227 |
file, all disks are accepted. On Linux (and on Sparc) there |
|
|
228 |
exist device nodes with configurable geometry |
|
|
229 |
(`/dev/fd0', `/dev/fd1' etc), and thus |
|
|
230 |
filtering is not needed (and ignored) for disk drives. |
|
|
231 |
(Mtools still does do filtering on plain files (disk images) |
|
|
232 |
in Linux: this is mainly intended for test purposes, as I |
|
|
233 |
don't have access to a Unix which would actually need |
|
|
234 |
filtering). |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
If you do not need filtering, but want still a default |
|
|
238 |
geometry for mformatting, you may switch off filtering using |
|
|
239 |
the mformat_only flag. |
|
|
240 |
|
|
|
241 |
|
|
|
242 |
If you want filtering, you should supply the filter |
|
|
243 |
flag. If you supply a geometry, you must supply one of both |
|
|
244 |
flags. |
|
|
245 |
|
|
|
246 |
|
|
|
247 |
initial geometry |
|
|
248 |
|
|
|
249 |
|
|
|
250 |
On devices that support it (usually floppy devices), the |
|
|
251 |
geometry information is also used to set the initial |
|
|
252 |
geometry. This initial geometry is applied while reading the |
|
|
253 |
boot sector, which contains the real geometry. If no |
|
|
254 |
geometry information is supplied in the configuration file, |
|
|
255 |
or if the mformat_only flag is supplied, no initial |
|
|
256 |
configuration is done. |
|
|
257 |
|
|
|
258 |
|
|
|
259 |
On Linux, initial geometry is not really needed, as the |
|
|
260 |
configurable devices are able to auto-detect the disk type |
|
|
261 |
accurately enough (for most common formats) to read the boot |
|
|
262 |
sector. |
|
|
263 |
|
|
|
264 |
|
|
|
265 |
Wrong geometry information may lead to very bizarre errors. |
|
|
266 |
That's why I strongly recommend that you add the |
|
|
267 |
mformat_only flag to your drive description, unless |
|
|
268 |
you really need filtering or initial geometry. |
|
|
269 |
|
|
|
270 |
|
|
|
271 |
The following geometry related variables are |
|
|
272 |
available: |
|
|
273 |
|
|
|
274 |
|
|
|
275 |
cylinders |
|
|
276 |
|
|
|
277 |
|
|
|
278 |
tracks |
|
|
279 |
|
|
|
280 |
|
|
|
281 |
The number of cylinders. (cylinders is the |
|
|
282 |
preferred form, tracks is considered |
|
|
283 |
obsolete) |
|
|
284 |
|
|
|
285 |
|
|
|
286 |
heads |
|
|
287 |
|
|
|
288 |
|
|
|
289 |
The number of heads (sides). |
|
|
290 |
|
|
|
291 |
|
|
|
292 |
sectors |
|
|
293 |
|
|
|
294 |
|
|
|
295 |
The number of sectors per track. |
|
|
296 |
|
|
|
297 |
|
|
|
298 |
Example: the following drive section describes a 1.44M |
|
|
299 |
drive: |
|
|
300 |
|
|
|
301 |
|
|
|
302 |
__ drive a: |
|
|
303 |
file= |
|
|
304 |
__ |
|
|
305 |
|
|
|
306 |
|
|
|
307 |
The following shorthand geometry descriptions are |
|
|
308 |
available: |
|
|
309 |
|
|
|
310 |
|
|
|
311 |
1.44m |
|
|
312 |
|
|
|
313 |
|
|
|
314 |
high density 3 1/2 disk. Equivalent to: fat_bits=12 |
|
|
315 |
cylinders=80 heads=2 sectors=18 |
|
|
316 |
|
|
|
317 |
|
|
|
318 |
1.2m |
|
|
319 |
|
|
|
320 |
|
|
|
321 |
high density 5 1/4 disk. Equivalent to: fat_bits=12 |
|
|
322 |
cylinders=80 heads=2 sectors=15 |
|
|
323 |
|
|
|
324 |
|
|
|
325 |
720k |
|
|
326 |
|
|
|
327 |
|
|
|
328 |
double density 3 1/2 disk. Equivalent to: fat_bits=12 |
|
|
329 |
cylinders=80 heads=2 sectors=9 |
|
|
330 |
|
|
|
331 |
|
|
|
332 |
360k |
|
|
333 |
|
|
|
334 |
|
|
|
335 |
double density 5 1/4 disk. Equivalent to: fat_bits=12 |
|
|
336 |
cylinders=40 heads=2 sectors=9 |
|
|
337 |
|
|
|
338 |
|
|
|
339 |
The shorthand format descriptions may be amended. For |
|
|
340 |
example, 360k sectors=8 describes a 320k disk and |
|
|
341 |
is equivalent to: fat_bits=12 cylinders=40 heads=2 |
|
|
342 |
sectors=8 |
|
|
343 |
|
|
|
344 |
|
|
|
345 |
__Open Flags__ |
|
|
346 |
|
|
|
347 |
|
|
|
348 |
Moreover, the following flags are available: |
|
|
349 |
|
|
|
350 |
|
|
|
351 |
sync |
|
|
352 |
|
|
|
353 |
|
|
|
354 |
All i/o operations are done synchronously |
|
|
355 |
|
|
|
356 |
|
|
|
357 |
nodelay |
|
|
358 |
|
|
|
359 |
|
|
|
360 |
The device or file is opened with the O_NDELAY flag. This is |
|
|
361 |
needed on some non-Linux architectures. |
|
|
362 |
|
|
|
363 |
|
|
|
364 |
exclusive |
|
|
365 |
|
|
|
366 |
|
|
|
367 |
The device or file is opened with the O_EXCL flag. On Linux, |
|
|
368 |
this ensures exclusive access to the floppy drive. On most |
|
|
369 |
other architectures, and for plain files it has no effect at |
|
|
370 |
all. |
|
|
371 |
|
|
|
372 |
|
|
|
373 |
__General Purpose Drive Variables__ |
|
|
374 |
|
|
|
375 |
|
|
|
376 |
The following general purpose drive variables are available. |
|
|
377 |
Depending to their type, these variables can be set to a |
|
|
378 |
string (file, precmd) or an integer (all |
|
|
379 |
others) |
|
|
380 |
|
|
|
381 |
|
|
|
382 |
file |
|
|
383 |
|
|
|
384 |
|
|
|
385 |
The name of the file or device holding the disk image. This |
|
|
386 |
is mandatory. The file name should be enclosed in |
|
|
387 |
quotes. |
|
|
388 |
|
|
|
389 |
|
|
|
390 |
partition |
|
|
391 |
|
|
|
392 |
|
|
|
393 |
Tells mtools to treat the drive as a partitioned device, and |
|
|
394 |
to use the given partition. Only primary partitions are |
|
|
395 |
accessible using this method, and they are numbered from 1 |
|
|
396 |
to 4. For logical partitions, use the more general |
|
|
397 |
offset variable. The partition variable is |
|
|
398 |
intended for removable media such as Syquests, ZIP drives, |
|
|
399 |
and magneto-optical disks. Although traditional DOS sees |
|
|
400 |
Syquests and magneto-optical disks as `giant floppy |
|
|
401 |
disks' which are unpartitioned, OS/2 and Windows NT |
|
|
402 |
treat them like hard disks, i.e. partioned devices. The |
|
|
403 |
partition flag is also useful DOSEMU hdimages. It |
|
|
404 |
is not recommended for hard disks for which direct access to |
|
|
405 |
partitions is available through mounting. |
|
|
406 |
|
|
|
407 |
|
|
|
408 |
offset |
|
|
409 |
|
|
|
410 |
|
|
|
411 |
Describes where in the file the MS-DOS filesystem starts. |
|
|
412 |
This is useful for logical partitions in DOSEMU hdimages, |
|
|
413 |
and for ATARI ram disks. By default, this is zero, meaning |
|
|
414 |
that the filesystem starts right at the beginning of the |
|
|
415 |
device or file. |
|
|
416 |
|
|
|
417 |
|
|
|
418 |
fat_bits |
|
|
419 |
|
|
|
420 |
|
|
|
421 |
The number of FAT bits. This may be 12 or 16. This is very |
|
|
422 |
rarely needed, as it can almost always be deduced from |
|
|
423 |
information in the boot sector. On the contrary, describing |
|
|
424 |
the number of fat bits may actually be harmful if you get it |
|
|
425 |
wrong. You should only use it if mtools gets the |
|
|
426 |
autodetected number of fat bits wrong, or if you want to |
|
|
427 |
mformat a disk with a weird number of fat bits. |
|
|
428 |
|
|
|
429 |
|
|
|
430 |
precmd |
|
|
431 |
|
|
|
432 |
|
|
|
433 |
On some variants of Solaris, it is necessary to call |
|
|
434 |
'volcheck -v' before opening a floppy device, in order for |
|
|
435 |
the system to notice that there is indeed a disk in the |
|
|
436 |
drive. precmd= in the drive |
|
|
437 |
clause establishes the desired behavior. |
|
|
438 |
|
|
|
439 |
|
|
|
440 |
blocksize |
|
|
441 |
|
|
|
442 |
|
|
|
443 |
This parameter represents a default block size to be always |
|
|
444 |
used on this device. All I/O is done with multiples of this |
|
|
445 |
block size, independantly of the sector size registered in |
|
|
446 |
the filesystem's boot sector. This is useful for character |
|
|
447 |
devices whose sector size is not 512, such as for example CD |
|
|
448 |
Rom drives on Solaris. |
|
|
449 |
|
|
|
450 |
|
|
|
451 |
Only the file variable is mandatory. The other |
|
|
452 |
parameters may be left out. In that case a default value or |
|
|
453 |
an autodetected value is used. |
|
|
454 |
|
|
|
455 |
|
|
|
456 |
__General Purpose Drive Flags__ |
|
|
457 |
|
|
|
458 |
|
|
|
459 |
A flag can either be set to 1 (enabled) or 0 (disabled). If |
|
|
460 |
the value is ommitted, it is enabled. For example, |
|
|
461 |
scsi is equivalent to scsi=1 |
|
|
462 |
|
|
|
463 |
|
|
|
464 |
nolock |
|
|
465 |
|
|
|
466 |
|
|
|
467 |
Instruct mtools to not use locking on this drive. This is |
|
|
468 |
needed on systems with buggy locking semantics. However, |
|
|
469 |
enabling this makes operation less safe in cases where |
|
|
470 |
several users may access the same drive at the same |
|
|
471 |
time. |
|
|
472 |
|
|
|
473 |
|
|
|
474 |
scsi |
|
|
475 |
|
|
|
476 |
|
|
|
477 |
When set to 1, this option tells mtools to use raw SCSI I/O |
|
|
478 |
instead of the standard read/write calls to access the |
|
|
479 |
device. Currently, this is supported on HP/UX, Solaris and |
|
|
480 |
!SunOs. This is needed because on some architectures, such as |
|
|
481 |
!SunOs or Solaris, PC media can't be accessed using the |
|
|
482 |
read and write syscalls, because the OS |
|
|
483 |
expects them to contain a Sun specific |
|
|
484 |
|
|
|
485 |
|
|
|
486 |
As raw Scsi access always uses the whole device, you need to |
|
|
487 |
specify the |
|
|
488 |
|
|
|
489 |
|
|
|
490 |
On some architectures, such as Solaris, mtools needs root |
|
|
491 |
privileges to be able to use the scsi option. Thus |
|
|
492 |
mtools should be installed set uid root on Solaris if you |
|
|
493 |
want to access Zip/Jaz drives. Thus, if the scsi |
|
|
494 |
flag is given, privileged is automatically implied, |
|
|
495 |
unless explicitly disabled by |
|
|
496 |
privileged=0 |
|
|
497 |
|
|
|
498 |
|
|
|
499 |
Mtools uses its root privileges to open the device, and to |
|
|
500 |
issue the actual SCSI I/O calls. Moreover, root privileges |
|
|
501 |
are only used for drives described in a system-wide |
|
|
502 |
configuration file such as |
|
|
503 |
`/usr/local/etc/mtools.conf', and not for those |
|
|
504 |
described in `~/.mtoolsrc' or |
|
|
505 |
`$MTOOLSRC'. |
|
|
506 |
|
|
|
507 |
|
|
|
508 |
privileged |
|
|
509 |
|
|
|
510 |
|
|
|
511 |
When set to 1, this instructs mtools to use its set-uid and |
|
|
512 |
set-gid privileges for opening the given drive. This option |
|
|
513 |
is only valid for drives described in the system-wide |
|
|
514 |
configuration files (such as |
|
|
515 |
`/usr/local/etc/mtools.conf', not |
|
|
516 |
`~/.mtoolsrc' or `$MTOOLSRC'). Obviously, |
|
|
517 |
this option is also a no op if mtools is not installed |
|
|
518 |
setuid or setgid. This option is implied by 'scsi=1', but |
|
|
519 |
again only for drives defined in system-wide configuration |
|
|
520 |
files. Privileged may also be set explicitely to 0, in order |
|
|
521 |
to tell mtools not to use its privileges for a given drive |
|
|
522 |
even if scsi=1 is set. |
|
|
523 |
|
|
|
524 |
|
|
|
525 |
Mtools only needs to be installed setuid if you use the |
|
|
526 |
privileged or scsi drive variables. If you |
|
|
527 |
do not use these options, mtools works perfectly well even |
|
|
528 |
when not installed setuid root. |
|
|
529 |
|
|
|
530 |
|
|
|
531 |
vold |
|
|
532 |
|
|
|
533 |
|
|
|
534 |
Instructs mtools to interpret the device name as a vold |
|
|
535 |
identifier rather than as a filename. The vold identifier is |
|
|
536 |
translated into a real filename using the |
|
|
537 |
media_findname() and media_oldaliases() |
|
|
538 |
functions of the volmgt library. This flag is only |
|
|
539 |
available if you configured mtools with the |
|
|
540 |
--enable-new-vold option before |
|
|
541 |
compilation. |
|
|
542 |
|
|
|
543 |
|
|
|
544 |
use_xdf |
|
|
545 |
|
|
|
546 |
|
|
|
547 |
If this is set to a non-zero value, mtools also tries to |
|
|
548 |
access this disk as an XDF disk. XDF is a high capacity |
|
|
549 |
format used by OS/2. This is off by default. See section |
|
|
550 |
XDF, for more details. |
|
|
551 |
|
|
|
552 |
|
|
|
553 |
mformat_only |
|
|
554 |
|
|
|
555 |
|
|
|
556 |
Tells mtools to use the geometry for this drive only for |
|
|
557 |
mformatting and not for filtering. |
|
|
558 |
|
|
|
559 |
|
|
|
560 |
filter |
|
|
561 |
|
|
|
562 |
|
|
|
563 |
Tells mtools to use the geometry for this drive both for |
|
|
564 |
mformatting and filtering. |
|
|
565 |
|
|
|
566 |
|
|
|
567 |
remote |
|
|
568 |
|
|
|
569 |
|
|
|
570 |
Tells mtools to connect to floppyd (see section |
|
|
571 |
floppyd). |
|
|
572 |
|
|
|
573 |
|
|
|
574 |
__Supplying multiple descriptions for a |
|
|
575 |
drive__ |
|
|
576 |
|
|
|
577 |
|
|
|
578 |
It is possible to supply multiple descriptions for a drive. |
|
|
579 |
In that case, the descriptions are tried in order until one |
|
|
580 |
is found that fits. Descriptions may fail for several |
|
|
581 |
reasons: |
|
|
582 |
|
|
|
583 |
|
|
|
584 |
1. |
|
|
585 |
|
|
|
586 |
|
|
|
587 |
because the geometry is not appropriate, |
|
|
588 |
|
|
|
589 |
|
|
|
590 |
2. |
|
|
591 |
|
|
|
592 |
|
|
|
593 |
because there is no disk in the drive, |
|
|
594 |
|
|
|
595 |
|
|
|
596 |
3. |
|
|
597 |
|
|
|
598 |
|
|
|
599 |
or because of other problems. |
|
|
600 |
|
|
|
601 |
|
|
|
602 |
Multiple definitions are useful when using physical devices |
|
|
603 |
which are only able to support one single disk geometry. |
|
|
604 |
Example: |
|
|
605 |
|
|
|
606 |
|
|
|
607 |
__ drive a: file= |
|
|
608 |
__ |
|
|
609 |
|
|
|
610 |
|
|
|
611 |
This instructs mtools to use /dev/fd0H1440 for 1.44m (high |
|
|
612 |
density) disks and /dev/fd0H720 for 720k (double density) |
|
|
613 |
disks. On Linux, this feature is not really needed, as the |
|
|
614 |
/dev/fd0 device is able to handle any geometry. |
|
|
615 |
|
|
|
616 |
|
|
|
617 |
You may also use multiple drive descriptions to access both |
|
|
618 |
of your physical drives through one drive |
|
|
619 |
letter: |
|
|
620 |
|
|
|
621 |
|
|
|
622 |
__ drive z: file= |
|
|
623 |
__ |
|
|
624 |
|
|
|
625 |
|
|
|
626 |
With this description, mdir z: accesses your first |
|
|
627 |
physical drive if it contains a disk. If the first drive |
|
|
628 |
doesn't contain a disk, mtools checks the second |
|
|
629 |
drive. |
|
|
630 |
|
|
|
631 |
|
|
|
632 |
When using multiple configuration files, drive descriptions |
|
|
633 |
in the files parsed last override descriptions for the same |
|
|
634 |
drive in earlier files. In order to avoid this, use the |
|
|
635 |
drive+ or +drive keywords instead of |
|
|
636 |
drive. The first adds a description to the end of |
|
|
637 |
the list (i.e. it will be tried last), and the first adds it |
|
|
638 |
to the start of the list. |
|
|
639 |
|
|
|
640 |
|
|
|
641 |
__Character set translation tables__ |
|
|
642 |
|
|
|
643 |
|
|
|
644 |
If you live in the USA, in Western Europe or in Australia, |
|
|
645 |
you may skip this section. |
|
|
646 |
|
|
|
647 |
|
|
|
648 |
__Why character set translation tables are |
|
|
649 |
needed__ |
|
|
650 |
|
|
|
651 |
|
|
|
652 |
DOS uses a different character code mapping than Unix. 7-bit |
|
|
653 |
characters still have the same meaning, only characters with |
|
|
654 |
the eight bit set are affected. To make matters worse, there |
|
|
655 |
are several translation tables available depending on the |
|
|
656 |
country where you are. The appearance of the characters is |
|
|
657 |
defined using code pages. These code pages aren't the same |
|
|
658 |
for all countries. For instance, some code pages don't |
|
|
659 |
contain upper case accented characters. On the other hand, |
|
|
660 |
some code pages contain characters which don't exist in |
|
|
661 |
Unix, such as certain line-drawing characters or accented |
|
|
662 |
consonants used by some Eastern European countries. This |
|
|
663 |
affects two things, relating to filenames: |
|
|
664 |
|
|
|
665 |
|
|
|
666 |
upper case characters |
|
|
667 |
|
|
|
668 |
|
|
|
669 |
In short names, only upper case characters are allowed. This |
|
|
670 |
also holds for accented characters. For instance, in a code |
|
|
671 |
page which doesn't contain accented uppercase characters, |
|
|
672 |
the accented lowercase characters get transformed into their |
|
|
673 |
unaccented counterparts. |
|
|
674 |
|
|
|
675 |
|
|
|
676 |
long file names |
|
|
677 |
|
|
|
678 |
|
|
|
679 |
Micro$oft has finally come to their senses and uses a more |
|
|
680 |
standard mapping for the long file names. They use Unicode, |
|
|
681 |
which is basically a 32 bit version of ASCII. Its first 256 |
|
|
682 |
characters are identical to Unix ASCII. Thus, the code page |
|
|
683 |
also affects the correspondence between the codes used in |
|
|
684 |
long names and those used in short names |
|
|
685 |
|
|
|
686 |
|
|
|
687 |
Mtools considers the filenames entered on the command line |
|
|
688 |
as having the Unix mapping, and translates the characters to |
|
|
689 |
get short names. By default, code page 850 is used with the |
|
|
690 |
Swiss uppercase/lowercase mapping. I chose this code page, |
|
|
691 |
because its set of existing characters most closely matches |
|
|
692 |
Unix's. Moreover, this code page covers most characters in |
|
|
693 |
use in the USA, Australia and Western Europe. However, it is |
|
|
694 |
still possible to chose a different mapping. There are two |
|
|
695 |
methods: the country variable and explicit |
|
|
696 |
tables. |
|
|
697 |
|
|
|
698 |
|
|
|
699 |
__Configuration using Country__ |
|
|
700 |
|
|
|
701 |
|
|
|
702 |
The COUNTRY variable is recommended for people |
|
|
703 |
which also have access to MS-DOS system files and |
|
|
704 |
documentation. If you don't have access to these, I'd |
|
|
705 |
suggest you'd rather use explicit tables |
|
|
706 |
instead. |
|
|
707 |
|
|
|
708 |
|
|
|
709 |
Syntax: |
|
|
710 |
|
|
|
711 |
|
|
|
712 |
COUNTRY=''country''[[,[[''codepage''], |
|
|
713 |
''country-file''] |
|
|
714 |
|
|
|
715 |
|
|
|
716 |
This tells mtools to use a Unix-to-DOS translation table |
|
|
717 |
which matches ''codepage'' and an lowercase-to-uppercase |
|
|
718 |
table for ''country'' and to use the ''country-file'' |
|
|
719 |
file to get the lowercase-to-uppercase table. The country |
|
|
720 |
code is most often the telephone prefix of the country. |
|
|
721 |
Refer to the DOS help page on |
|
|
722 |
''codepage'' and the ''country-file'' |
|
|
723 |
parameters are optional. Please don't type in the square |
|
|
724 |
brackets, they are only there to say which parameters are |
|
|
725 |
optional. The ''country-file'' file is supplied with |
|
|
726 |
MS-DOS, and is usually called `COUNTRY.SYS', and |
|
|
727 |
stored in the `C:DOS' directory. In most cases you |
|
|
728 |
don't need it, as the most common translation tables are |
|
|
729 |
compiled into mtools. So, don't worry if you run a Unix-only |
|
|
730 |
box which lacks this file. |
|
|
731 |
|
|
|
732 |
|
|
|
733 |
If ''codepage'' is not given, a per country default code |
|
|
734 |
page is used. If the ''country-file'' parameter isn't |
|
|
735 |
given, compiled-in defaults are used for the |
|
|
736 |
lowercase-to-uppercase table. This is useful for other |
|
|
737 |
Unices than Linux, which may have no `COUNTRY.SYS' |
|
|
738 |
file available online. |
|
|
739 |
|
|
|
740 |
|
|
|
741 |
The Unix-to-DOS are not contained in the |
|
|
742 |
`COUNTRY.SYS' file, and thus mtools always uses |
|
|
743 |
compiled-in defaults for those. Thus, only a limited amount |
|
|
744 |
of code pages are supported. If your preferred code page is |
|
|
745 |
missing, or if you know the name of the Windows 95 file |
|
|
746 |
which contains this mapping, could you please drop me a line |
|
|
747 |
at alain@linux.lu. |
|
|
748 |
|
|
|
749 |
|
|
|
750 |
The COUNTRY variable can also be set using the |
|
|
751 |
environment. |
|
|
752 |
|
|
|
753 |
|
|
|
754 |
__Configuration using explicit translation |
|
|
755 |
tables__ |
|
|
756 |
|
|
|
757 |
|
|
|
758 |
Translation tables may be described in line in the |
|
|
759 |
configuration file. Two tables are needed: first the |
|
|
760 |
DOS-to-Unix table, and then the Lowercase-to-Uppercase |
|
|
761 |
table. A DOS-to-Unix table starts with the tounix |
|
|
762 |
keyword, followed by a colon, and 128 hexadecimal numbers. A |
|
|
763 |
lower-to-upper table starts with the fucase |
|
|
764 |
keyword, followed by a colon, and 128 hexadecimal |
|
|
765 |
numbers. |
|
|
766 |
|
|
|
767 |
|
|
|
768 |
The tables only show the translations for characters whose |
|
|
769 |
codes is greater than 128, because translation for lower |
|
|
770 |
codes is trivial. |
|
|
771 |
|
|
|
772 |
|
|
|
773 |
Example: |
|
|
774 |
|
|
|
775 |
|
|
|
776 |
__ tounix: |
|
|
777 |
0xc7 0xfc 0xe9 0xe2 0xe4 0xe0 0xe5 0xe7 |
|
|
778 |
0xea 0xeb 0xe8 0xef 0xee 0xec 0xc4 0xc5 |
|
|
779 |
0xc9 0xe6 0xc6 0xf4 0xf6 0xf2 0xfb 0xf9 |
|
|
780 |
0xff 0xd6 0xdc 0xf8 0xa3 0xd8 0xd7 0x5f |
|
|
781 |
0xe1 0xed 0xf3 0xfa 0xf1 0xd1 0xaa 0xba |
|
|
782 |
0xbf 0xae 0xac 0xbd 0xbc 0xa1 0xab 0xbb |
|
|
783 |
0x5f 0x5f 0x5f 0x5f 0x5f 0xc1 0xc2 0xc0 |
|
|
784 |
0xa9 0x5f 0x5f 0x5f 0x5f 0xa2 0xa5 0xac |
|
|
785 |
0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0xe3 0xc3 |
|
|
786 |
0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0xa4 |
|
|
787 |
0xf0 0xd0 0xc9 0xcb 0xc8 0x69 0xcd 0xce |
|
|
788 |
0xcf 0x5f 0x5f 0x5f 0x5f 0x7c 0x49 0x5f |
|
|
789 |
0xd3 0xdf 0xd4 0xd2 0xf5 0xd5 0xb5 0xfe |
|
|
790 |
0xde 0xda 0xd9 0xfd 0xdd 0xde 0xaf 0xb4 |
|
|
791 |
0xad 0xb1 0x5f 0xbe 0xb6 0xa7 0xf7 0xb8 |
|
|
792 |
0xb0 0xa8 0xb7 0xb9 0xb3 0xb2 0x5f 0x5f |
|
|
793 |
fucase: |
|
|
794 |
0x80 0x9a 0x90 0xb6 0x8e 0xb7 0x8f 0x80 |
|
|
795 |
0xd2 0xd3 0xd4 0xd8 0xd7 0xde 0x8e 0x8f |
|
|
796 |
0x90 0x92 0x92 0xe2 0x99 0xe3 0xea 0xeb |
|
|
797 |
0x59 0x99 0x9a 0x9d 0x9c 0x9d 0x9e 0x9f |
|
|
798 |
0xb5 0xd6 0xe0 0xe9 0xa5 0xa5 0xa6 0xa7 |
|
|
799 |
0xa8 0xa9 0xaa 0xab 0xac 0xad 0xae 0xaf |
|
|
800 |
0xb0 0xb1 0xb2 0xb3 0xb4 0xb5 0xb6 0xb7 |
|
|
801 |
0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe 0xbf |
|
|
802 |
0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc7 0xc7 |
|
|
803 |
0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf |
|
|
804 |
0xd1 0xd1 0xd2 0xd3 0xd4 0x49 0xd6 0xd7 |
|
|
805 |
0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde 0xdf |
|
|
806 |
0xe0 0xe1 0xe2 0xe3 0xe5 0xe5 0xe6 0xe8 |
|
|
807 |
0xe8 0xe9 0xea 0xeb 0xed 0xed 0xee 0xef |
|
|
808 |
0xf0 0xf1 0xf2 0xf3 0xf4 0xf5 0xf6 0xf7 |
|
|
809 |
0xf8 0xf9 0xfa 0xfb 0xfc 0xfd 0xfe 0xff |
|
|
810 |
__ |
|
|
811 |
|
|
|
812 |
|
|
|
813 |
The first table maps DOS character codes to Unix character |
|
|
814 |
codes. For example, the DOS character number 129. This is a |
|
|
815 |
u with to dots on top of it. To translate it into Unix, we |
|
|
816 |
look at the character number 1 in the first table (1 = 129 - |
|
|
817 |
128). This is 0xfc. (Beware, numbering starts at 0). The |
|
|
818 |
second table maps lower case DOS characters to upper case |
|
|
819 |
DOS characters. The same lower case u with dots maps to |
|
|
820 |
character 0x9a, which is an uppercase U with dots in |
|
|
821 |
DOS. |
|
|
822 |
|
|
|
823 |
|
|
|
824 |
__Unicode characters greater than 256__ |
|
|
825 |
|
|
|
826 |
|
|
|
827 |
If an existing MS-DOS name contains Unicode character |
|
|
828 |
greater than 256, these are translated to underscores or to |
|
|
829 |
characters which are close in visual appearance. For |
|
|
830 |
example, accented consonants are translated into their |
|
|
831 |
unaccented counterparts. This translation is used for mdir |
|
|
832 |
and for the Unix filenames generated by mcopy. Linux does |
|
|
833 |
support Unicode too, but unfortunately too few applications |
|
|
834 |
support it yet to bother with it in mtools. Most |
|
|
835 |
importantly, xterm can't display Unicode yet. If there is |
|
|
836 |
sufficient demand, I might include support for Unicode in |
|
|
837 |
the Unix filenames as well. |
|
|
838 |
|
|
|
839 |
|
|
|
840 |
__Caution:__ When deleting files with mtools, the |
|
|
841 |
underscore matches all characters which can't be represented |
|
|
842 |
in Unix. Be careful with mdel! |
|
|
843 |
|
|
|
844 |
|
|
|
845 |
__Location of configuration files and parsing |
|
|
846 |
order__ |
|
|
847 |
|
|
|
848 |
|
|
|
849 |
The configuration files are parsed in the following |
|
|
850 |
order: |
|
|
851 |
|
|
|
852 |
|
|
|
853 |
1. |
|
|
854 |
|
|
|
855 |
|
|
|
856 |
compiled-in defaults |
|
|
857 |
|
|
|
858 |
|
|
|
859 |
2. |
|
|
860 |
|
|
|
861 |
|
|
|
862 |
`/usr/local/etc/mtools.conf' |
|
|
863 |
|
|
|
864 |
|
|
|
865 |
3. |
|
|
866 |
|
|
|
867 |
|
|
|
868 |
`/etc/mtools' This is for backwards compatibility |
|
|
869 |
only, and is only parsed if `mtools.conf' doesn't |
|
|
870 |
exist. |
|
|
871 |
|
|
|
872 |
|
|
|
873 |
4. |
|
|
874 |
|
|
|
875 |
|
|
|
876 |
`~/.mtoolsrc'. |
|
|
877 |
|
|
|
878 |
|
|
|
879 |
5. |
|
|
880 |
|
|
|
881 |
|
|
|
882 |
`$MTOOLSRC' (file pointed by the MTOOLSRC |
|
|
883 |
environmental variable) |
|
|
884 |
|
|
|
885 |
|
|
|
886 |
Options described in the later files override those |
|
|
887 |
described in the earlier files. Drives defined in earlier |
|
|
888 |
files persist if they are not overridden in the later files. |
|
|
889 |
For instance, drives A and B may be defined in |
|
|
890 |
`/usr/local/etc/mtools.conf' and drives C and D may |
|
|
891 |
be defined in `~/.mtoolsrc' However, if |
|
|
892 |
`~/.mtoolsrc' also defines drive A, this new |
|
|
893 |
description would override the description of drive A in |
|
|
894 |
`/usr/local/etc/mtools.conf' instead of adding to |
|
|
895 |
it. If you want to add a new description to a drive already |
|
|
896 |
described in an earlier file, you need to use either the |
|
|
897 |
+drive or drive+ keyword. |
|
|
898 |
|
|
|
899 |
|
|
|
900 |
__Backwards compatibility with old configuration file |
|
|
901 |
syntax__ |
|
|
902 |
|
|
|
903 |
|
|
|
904 |
The syntax described herein is new for version |
|
|
905 |
mtools-3.0. The old line-oriented syntax is still |
|
|
906 |
supported. Each line beginning with a single letter is |
|
|
907 |
considered to be a drive description using the old syntax. |
|
|
908 |
Old style and new style drive sections may be mixed within |
|
|
909 |
the same configuration file, in order to make upgrading |
|
|
910 |
easier. Support for the old syntax will be phased out |
|
|
911 |
eventually, and in order to discourage its use, I |
|
|
912 |
purposefully omit its description here. |
|
|
913 |
!!See also |
|
|
914 |
|
|
|
915 |
|
|
|
916 |
mtools |
|
|
917 |
---- |