Alistair Delva | beaee83 | 2021-02-24 11:27:23 -0800 | [diff] [blame] | 1 | '\" t |
Yi Kong | 39bbd96 | 2022-01-09 19:41:38 +0800 | [diff] [blame] | 2 | .TH mtools 5 "08Jan22" MTOOLS MTOOLS |
Alistair Delva | beaee83 | 2021-02-24 11:27:23 -0800 | [diff] [blame] | 3 | .SH Name |
| 4 | mtools.conf - mtools configuration files |
| 5 | '\" t |
| 6 | .de TQ |
| 7 | .br |
| 8 | .ns |
| 9 | .TP \\$1 |
| 10 | .. |
| 11 | |
| 12 | .tr \(is' |
| 13 | .tr \(if` |
| 14 | .tr \(pd" |
| 15 | |
Yi Kong | 39bbd96 | 2022-01-09 19:41:38 +0800 | [diff] [blame] | 16 | .ds St Mtools\ 4.0.37 |
Alistair Delva | beaee83 | 2021-02-24 11:27:23 -0800 | [diff] [blame] | 17 | .PP |
| 18 | .SH Description |
| 19 | .PP |
| 20 | This manual page describes the configuration files for mtools. They |
| 21 | are called \fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR and \fR\&\f(CW\(if~/.mtoolsrc\(is\fR. If |
| 22 | the environmental variable \fR\&\f(CWMTOOLSRC\fR is set, its contents is used |
| 23 | as the filename for a third configuration file. These configuration |
| 24 | files describe the following items: |
| 25 | .TP |
| 26 | * \ Global\ configuration\ flags\ and\ variables\ |
| 27 | .TP |
| 28 | * \ Per\ drive\ flags\ and\ variables\ |
| 29 | .PP |
| 30 | .SS Location\ of\ the\ configuration\ files |
| 31 | .PP |
| 32 | .PP |
| 33 | \&\fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR is the system-wide configuration file, |
| 34 | and \fR\&\f(CW\(if~/.mtoolsrc\(is\fR is the user's private configuration file. |
| 35 | .PP |
| 36 | On some systems, the system-wide configuration file is called |
| 37 | \&\fR\&\f(CW\(if/etc/default/mtools.conf\(is\fR instead. |
| 38 | .PP |
| 39 | .SS \ \ General\ configuration\ file\ syntax |
| 40 | .PP |
| 41 | The configuration files is made up of sections. Each section starts |
| 42 | with a keyword identifying the section followed by a colon. |
| 43 | Then follow variable assignments and flags. Variable assignments take |
| 44 | the following form: |
| 45 | .ft I |
| 46 | .nf |
| 47 | name=value |
| 48 | .fi |
| 49 | .ft R |
| 50 | |
| 51 | Flags are lone keywords without an equal sign and value following |
| 52 | them. A section either ends at the end of the file or where the next |
| 53 | section begins. |
| 54 | .PP |
| 55 | Lines starting with a hash (\fR\&\f(CW#\fR) are comments. Newline characters |
| 56 | are equivalent to whitespace (except where ending a comment). The |
| 57 | configuration file is case insensitive, except for item enclosed in |
| 58 | quotes (such as filenames). |
| 59 | .PP |
| 60 | .SS Default\ values |
| 61 | For most platforms, mtools contains reasonable compiled-in defaults for |
| 62 | physical floppy drives. Thus, you usually don't need to bother with the |
| 63 | configuration file, if all you want to do with mtools is to access your |
| 64 | floppy drives. On the other hand, the configuration file is needed if |
| 65 | you also want to use mtools to access your hard disk partitions and |
| 66 | DOSEMU image files. |
| 67 | .PP |
| 68 | .SS Global\ variables |
| 69 | .PP |
| 70 | Global flags may be set to 1 or to 0. |
| 71 | .PP |
| 72 | The following global flags are recognized: |
| 73 | .TP |
| 74 | \&\fR\&\f(CWMTOOLS_SKIP_CHECK\fR\ |
| 75 | If this is set to 1, mtools skips most of its sanity checks. This is |
| 76 | needed to read some Atari disks which have been made with the earlier |
| 77 | ROMs, and which would not be recognized otherwise. |
| 78 | .TP |
| 79 | \&\fR\&\f(CWMTOOLS_FAT_COMPATIBILITY\fR\ |
| 80 | If this is set to 1, mtools skips the fat size checks. Some disks have |
| 81 | a bigger FAT than they really need to. These are rejected if this |
| 82 | option is not set. |
| 83 | .TP |
| 84 | \&\fR\&\f(CWMTOOLS_LOWER_CASE\fR\ |
| 85 | If this is set to 1, mtools displays all-upper-case short filenames as |
| 86 | lowercase. This has been done to allow a behavior which is consistent |
| 87 | with older versions of mtools which didn't know about the case bits. |
| 88 | .TP |
| 89 | \&\fR\&\f(CWMTOOLS_NO_VFAT\fR\ |
| 90 | If this is set to 1, mtools won't generate VFAT entries for filenames |
| 91 | which are mixed-case, but otherwise legal dos filenames. This is useful |
| 92 | when working with DOS versions which can't grok VFAT long names, such as |
| 93 | FreeDOS. |
| 94 | .TP |
| 95 | \&\fR\&\f(CWMTOOLS_DOTTED_DIR\fR\ |
| 96 | In a wide directory, prints the short name with a dot instead of spaces |
| 97 | separating the basename and the extension. |
| 98 | .TP |
| 99 | \&\fR\&\f(CWMTOOLS_NAME_NUMERIC_TAIL\fR\ |
| 100 | If this is set to one (default), generate numeric tails for all long |
| 101 | names (~1). If set to zero, only generate numeric tails if otherwise a |
| 102 | clash would have happened. |
| 103 | .TP |
| 104 | \&\fR\&\f(CWMTOOLS_TWENTY_FOUR_HOUR_CLOCK\fR\ |
| 105 | If 1, uses the European notation for times (twenty four hour clock), |
| 106 | else uses the UK/US notation (am/pm) |
| 107 | .TP |
| 108 | \&\fR\&\f(CWMTOOLS_LOCK_TIMEOUT\fR\ |
| 109 | How long, in seconds, to wait for a locked device to become free. |
| 110 | Defaults to 30. |
| 111 | .PP |
| 112 | Example: |
| 113 | Inserting the following line into your configuration file instructs |
| 114 | mtools to skip the sanity checks: |
| 115 | |
| 116 | .nf |
| 117 | .ft 3 |
| 118 | .in +0.3i |
| 119 | MTOOLS_SKIP_CHECK=1 |
| 120 | .fi |
| 121 | .in -0.3i |
| 122 | .ft R |
| 123 | .PP |
| 124 | |
| 125 | \&\fR |
| 126 | .PP |
| 127 | Global variables may also be set via the environment: |
| 128 | |
| 129 | .nf |
| 130 | .ft 3 |
| 131 | .in +0.3i |
| 132 | export MTOOLS_SKIP_CHECK=1 |
| 133 | .fi |
| 134 | .in -0.3i |
| 135 | .ft R |
| 136 | .PP |
| 137 | |
| 138 | \&\fR |
| 139 | .PP |
| 140 | Global string variables may be set to any value: |
| 141 | .TP |
| 142 | \&\fR\&\f(CWMTOOLS_DATE_STRING\fR\ |
| 143 | The format used for printing dates of files. By default, is dd-mm-yyyy. |
| 144 | .PP |
| 145 | .SS Per\ drive\ flags\ and\ variables |
| 146 | .PP |
| 147 | .SS \ \ General\ information |
| 148 | .PP |
| 149 | Per drive flags and values may be described in a drive section. A |
| 150 | drive section starts with |
| 151 | \&\fR\&\f(CWdrive\fR "\fIdriveletter\fR" : |
| 152 | .PP |
| 153 | Then follow variable-value pairs and flags. |
| 154 | .PP |
| 155 | This is a sample drive description: |
| 156 | |
| 157 | .nf |
| 158 | .ft 3 |
| 159 | .in +0.3i |
| 160 | drive a: |
| 161 | file="/dev/fd0" use_xdf=1 |
| 162 | .fi |
| 163 | .in -0.3i |
| 164 | .ft R |
| 165 | .PP |
| 166 | |
| 167 | \&\fR |
| 168 | .PP |
| 169 | .SS \ \ Location\ information |
| 170 | .PP |
| 171 | For each drive, you need to describe where its data is physically |
| 172 | stored (image file, physical device, partition, offset). |
| 173 | .TP |
| 174 | \&\fR\&\f(CWfile\fR\ |
| 175 | The name of the file or device holding the disk image. This is |
| 176 | mandatory. The file name should be enclosed in quotes. |
| 177 | .TP |
| 178 | \&\fR\&\f(CWpartition\fR\ |
| 179 | Tells mtools to treat the drive as a partitioned device, and to use the |
| 180 | given partition. Only primary partitions are accessible using this |
| 181 | method, and they are numbered from 1 to 4. For logical partitions, use |
| 182 | the more general \fR\&\f(CWoffset\fR variable. The \fR\&\f(CWpartition\fR variable |
| 183 | is intended for removable media such as Syquest disks, ZIP drives, and |
| 184 | magneto-optical disks. Although traditional DOS sees Syquest disks and |
| 185 | magneto-optical disks as \fR\&\f(CW\(ifgiant floppy disks\(is\fR which are |
| 186 | unpartitioned, OS/2 and Windows NT treat them like hard disks, |
| 187 | i.e. partitioned devices. The \fR\&\f(CWpartition\fR flag is also useful DOSEMU |
| 188 | hdimages. It is not recommended for hard disks for which direct access |
| 189 | to partitions is available through mounting. |
| 190 | .TP |
| 191 | \&\fR\&\f(CWoffset\fR\ |
| 192 | Describes where in the file the MS-DOS file system starts. This is useful |
| 193 | for logical partitions in DOSEMU hdimages, and for ATARI ram disks. By |
| 194 | default, this is zero, meaning that the file system starts right at the |
| 195 | beginning of the device or file. |
| 196 | .PP |
| 197 | .SS \ \ Disk\ Geometry\ Configuration |
| 198 | .PP |
| 199 | Geometry information describes the physical characteristics about the |
| 200 | disk. Its has three purposes: |
| 201 | .TP |
| 202 | formatting\ |
| 203 | The geometry information is written into the boot sector of the newly |
| 204 | made disk. However, you may also describe the geometry information on |
| 205 | the command line. See section mformat, for details. |
| 206 | .TP |
| 207 | filtering\ |
| 208 | On some Unixes there are device nodes which only support one physical |
| 209 | geometry. For instance, you might need a different node to access a disk |
| 210 | as high density or as low density. The geometry is compared to the |
| 211 | actual geometry stored on the boot sector to make sure that this device |
| 212 | node is able to correctly read the disk. If the geometry doesn't match, |
| 213 | this drive entry fails, and the next drive entry bearing the same drive |
| 214 | letter is tried. See section multiple descriptions, for more details on |
| 215 | supplying several descriptions for one drive letter. |
| 216 | .IP |
| 217 | If no geometry information is supplied in the configuration file, all |
| 218 | disks are accepted. On Linux (and on SPARC) there exist device nodes |
| 219 | with configurable geometry (\fR\&\f(CW\(if/dev/fd0\(is\fR, \fR\&\f(CW\(if/dev/fd1\(is\fR etc), |
| 220 | and thus filtering is not needed (and ignored) for disk drives. (Mtools |
| 221 | still does do filtering on plain files (disk images) in Linux: this is |
| 222 | mainly intended for test purposes, as I don't have access to a Unix |
| 223 | which would actually need filtering). |
| 224 | .IP |
| 225 | If you do not need filtering, but want still a default geometry for |
| 226 | mformatting, you may switch off filtering using the \fR\&\f(CWmformat_only\fR |
| 227 | flag. |
| 228 | .IP |
| 229 | If you want filtering, you should supply the \fR\&\f(CWfilter\fR flag. If you |
| 230 | supply a geometry, you must supply one of both flags. |
| 231 | .TP |
| 232 | initial\ geometry\ |
| 233 | On devices that support it (usually floppy devices), the geometry |
| 234 | information is also used to set the initial geometry. This initial |
| 235 | geometry is applied while reading the boot sector, which contains the |
| 236 | real geometry. If no geometry information is supplied in the |
| 237 | configuration file, or if the \fR\&\f(CWmformat_only\fR flag is supplied, no |
| 238 | initial configuration is done. |
| 239 | .IP |
| 240 | On Linux, initial geometry is not really needed, as the configurable |
| 241 | devices are able to auto-detect the disk type accurately enough (for |
| 242 | most common formats) to read the boot sector. |
| 243 | .PP |
| 244 | Wrong geometry information may lead to very bizarre errors. That's why I |
| 245 | strongly recommend that you add the \fR\&\f(CWmformat_only\fR flag to your |
| 246 | drive description, unless you really need filtering or initial geometry. |
| 247 | .PP |
| 248 | The following geometry related variables are available: |
| 249 | .TP |
| 250 | \&\fR\&\f(CWcylinders\fR\ |
| 251 | .TQ |
| 252 | \&\fR\&\f(CWtracks\fR |
| 253 | The number of cylinders. (\fR\&\f(CWcylinders\fR is the preferred form, |
| 254 | \&\fR\&\f(CWtracks\fR is considered obsolete) |
| 255 | .TP |
| 256 | \&\fR\&\f(CWheads\fR\ |
| 257 | The number of heads (sides). |
| 258 | .TP |
| 259 | \&\fR\&\f(CWsectors\fR\ |
| 260 | The number of sectors per track. |
| 261 | .PP |
| 262 | Example: the following drive section describes a 1.44M drive: |
| 263 | .PP |
| 264 | |
| 265 | .nf |
| 266 | .ft 3 |
| 267 | .in +0.3i |
| 268 | drive a: |
| 269 | file="/dev/fd0H1440" |
| 270 | fat_bits=12 |
| 271 | cylinders=80 heads=2 sectors=18 |
| 272 | mformat_only |
| 273 | .fi |
| 274 | .in -0.3i |
| 275 | .ft R |
| 276 | .PP |
| 277 | |
| 278 | \&\fR |
| 279 | .PP |
| 280 | The following shorthand geometry descriptions are available: |
| 281 | .TP |
| 282 | \&\fR\&\f(CW1.44m\fR\ |
| 283 | high density 3 1/2 disk. Equivalent to: |
| 284 | \&\fR\&\f(CWfat_bits=12 cylinders=80 heads=2 sectors=18\fR |
| 285 | .TP |
| 286 | \&\fR\&\f(CW1.2m\fR\ |
| 287 | high density 5 1/4 disk. Equivalent to: |
| 288 | \&\fR\&\f(CWfat_bits=12 cylinders=80 heads=2 sectors=15\fR |
| 289 | .TP |
| 290 | \&\fR\&\f(CW720k\fR\ |
| 291 | double density 3 1/2 disk. Equivalent to: |
| 292 | \&\fR\&\f(CWfat_bits=12 cylinders=80 heads=2 sectors=9\fR |
| 293 | .TP |
| 294 | \&\fR\&\f(CW360k\fR\ |
| 295 | double density 5 1/4 disk. Equivalent to: |
| 296 | \&\fR\&\f(CWfat_bits=12 cylinders=40 heads=2 sectors=9\fR |
| 297 | .PP |
| 298 | The shorthand format descriptions may be amended. For example, |
| 299 | \&\fR\&\f(CW360k sectors=8\fR |
| 300 | describes a 320k disk and is equivalent to: |
| 301 | \&\fR\&\f(CWfat_bits=12 cylinders=40 heads=2 sectors=8\fR |
| 302 | .PP |
| 303 | .SS \ \ Open\ Flags |
| 304 | .PP |
| 305 | Moreover, the following flags are available: |
| 306 | .TP |
| 307 | \&\fR\&\f(CWsync\fR\ |
| 308 | All i/o operations are done synchronously |
| 309 | .TP |
| 310 | \&\fR\&\f(CWnodelay\fR\ |
| 311 | The device or file is opened with the O_NDELAY flag. This is needed on |
| 312 | some non-Linux architectures. |
| 313 | .TP |
| 314 | \&\fR\&\f(CWexclusive\fR\ |
| 315 | The device or file is opened with the O_EXCL flag. On Linux, this |
| 316 | ensures exclusive access to the floppy drive. On most other |
| 317 | architectures, and for plain files it has no effect at all. |
| 318 | .PP |
| 319 | .SS \ \ General\ Purpose\ Drive\ Variables |
| 320 | .PP |
| 321 | The following general purpose drive variables are available. Depending |
| 322 | to their type, these variables can be set to a string (precmd) or |
| 323 | an integer (all others) |
| 324 | .TP |
| 325 | \&\fR\&\f(CWfat_bits\fR\ |
| 326 | The number of FAT bits. This may be 12 or 16. This is very rarely |
| 327 | needed, as it can almost always be deduced from information in the |
| 328 | boot sector. On the contrary, describing the number of fat bits may |
| 329 | actually be harmful if you get it wrong. You should only use it if |
| 330 | mtools gets the auto-detected number of fat bits wrong, or if you want |
| 331 | to mformat a disk with a weird number of fat bits. |
| 332 | .TP |
| 333 | \&\fR\&\f(CWcodepage\fR\ |
| 334 | Describes the DOS code page used for short filenames. This is a number |
| 335 | between 1 and 999. By default, code page 850 is used. The reason for |
| 336 | this is because this code page contains most of the characters that are |
| 337 | also available in ISO-Latin-1. You may also specify a global code page |
| 338 | for all drives by using the global \fR\&\f(CWdefault_codepage\fR parameter |
| 339 | (outside of any drive description). This parameters exists starting at |
| 340 | version 4.0.0 |
| 341 | .TP |
Yi Kong | 39bbd96 | 2022-01-09 19:41:38 +0800 | [diff] [blame] | 342 | \&\fR\&\f(CWdata_map\fR\ |
| 343 | Remaps data from image file. This is useful for image files which |
| 344 | might need additional zero-filled sectors to be inserted. Such is the |
| 345 | case for instance for IBM 3174 floppy images. These images represent |
| 346 | floppy disks with fewer sectors on their first cylinder. These missing |
| 347 | sectors are not stored in the image, but are still counted in the |
| 348 | filesystem layout. The data_map allows to fake these missing sectors |
| 349 | for the upper layers of mtools. A data_map is a comma-separated |
| 350 | sequence of source type and size. Source type may be \fR\&\f(CWzero\fR for |
| 351 | zero-filled sectors created by map, \fR\&\f(CWskip\fR for data in raw image |
| 352 | to be ignored (skipped), and nothing for data to be used as is |
| 353 | (copied) from the raw image. Datamap is automatically complemented by |
| 354 | an implicit last element of data to be used as is from current offset |
| 355 | to end of file. Each size is a number followed by a unit: \fR\&\f(CWs\fR for |
| 356 | a 512 byte sector, \fR\&\f(CWK\fR for Kbytes, \fR\&\f(CWM\fR for megabytes, |
| 357 | \&\fR\&\f(CWG\fR for gigabytes, and nothing for single bytes. |
| 358 | .IP |
| 359 | Example: |
| 360 | .IP |
| 361 | \&\fR\&\f(CWdata_map=1s,zero31s,28s,skip1s\fR would be a map for use with IBM |
| 362 | 3174 floppy images. First sector (\fR\&\f(CW1s\fR, boot sector) is used as |
| 363 | is. Then follow 31 fake zero-filled sectors (\fR\&\f(CWzero31s\fR), then the |
| 364 | next 28 sectors from image (\fR\&\f(CW28s\fR) are used as is (they contain |
| 365 | FAT and root directory), then one sector from image is skipped |
| 366 | (\fR\&\f(CWskip1s\fR), and finally the rest of image is used as is |
| 367 | (implicit) |
| 368 | .IP |
| 369 | .TP |
Alistair Delva | beaee83 | 2021-02-24 11:27:23 -0800 | [diff] [blame] | 370 | \&\fR\&\f(CWprecmd\fR\ |
| 371 | On some variants of Solaris, it is necessary to call 'volcheck -v' |
| 372 | before opening a floppy device, in order for the system to notice that |
| 373 | there is indeed a disk in the drive. \fR\&\f(CWprecmd="volcheck -v"\fR in the |
| 374 | drive clause establishes the desired behavior. |
| 375 | .TP |
| 376 | \&\fR\&\f(CWblocksize\fR\ |
| 377 | This parameter represents a default block size to be always used on this |
| 378 | device. All I/O is done with multiples of this block size, |
| 379 | independently of the sector size registered in the file system's boot |
| 380 | sector. This is useful for character devices whose sector size is not |
| 381 | 512, such as for example CD-ROM drives on Solaris. |
| 382 | .PP |
| 383 | Only the \fR\&\f(CWfile\fR variable is mandatory. The other parameters may |
| 384 | be left out. In that case a default value or an auto-detected value is |
| 385 | used. |
| 386 | .PP |
| 387 | .SS \ \ General\ Purpose\ Drive\ Flags |
| 388 | .PP |
| 389 | A flag can either be set to 1 (enabled) or 0 (disabled). If the value is |
| 390 | omitted, it is enabled. For example, \fR\&\f(CWscsi\fR is equivalent to |
| 391 | \&\fR\&\f(CWscsi=1\fR |
| 392 | .TP |
| 393 | \&\fR\&\f(CWnolock\fR\ |
| 394 | Instruct mtools to not use locking on this drive. This is needed on |
| 395 | systems with buggy locking semantics. However, enabling this makes |
| 396 | operation less safe in cases where several users may access the same |
| 397 | drive at the same time. |
| 398 | .TP |
| 399 | \&\fR\&\f(CWscsi\fR\ |
| 400 | When set to 1, this option tells mtools to use raw SCSI I/O instead of |
| 401 | the standard read/write calls to access the device. Currently, this is |
| 402 | supported on HP-UX, Solaris and SunOS. This is needed because on some |
| 403 | architectures, such as SunOS or Solaris, PC media can't be accessed |
| 404 | using the \fR\&\f(CWread\fR and \fR\&\f(CWwrite\fR system calls, because the OS expects |
| 405 | them to contain a Sun specific "disk label". |
| 406 | .IP |
| 407 | As raw SCSI access always uses the whole device, you need to specify the |
| 408 | "partition" flag in addition |
| 409 | .IP |
| 410 | On some architectures, such as Solaris, mtools needs root privileges to |
| 411 | be able to use the \fR\&\f(CWscsi\fR option. Thus mtools should be installed |
| 412 | setuid root on Solaris if you want to access Zip/Jaz drives. Thus, if |
| 413 | the \fR\&\f(CWscsi\fR flag is given, \fR\&\f(CWprivileged\fR is automatically |
| 414 | implied, unless explicitly disabled by \fR\&\f(CWprivileged=0\fR |
| 415 | .IP |
| 416 | Mtools uses its root privileges to open the device, and to issue the |
| 417 | actual SCSI I/O calls. Moreover, root privileges are only used for |
| 418 | drives described in a system-wide configuration file such as |
| 419 | \&\fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR, and not for those described in |
| 420 | \&\fR\&\f(CW\(if~/.mtoolsrc\(is\fR or \fR\&\f(CW\(if$MTOOLSRC\(is\fR. |
| 421 | .TP |
| 422 | \&\fR\&\f(CWprivileged\fR\ |
| 423 | When set to 1, this instructs mtools to use its setuid and setgid |
| 424 | privileges for opening the given drive. This option is only valid for |
| 425 | drives described in the system-wide configuration files (such as |
| 426 | \&\fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR, not \fR\&\f(CW\(if~/.mtoolsrc\(is\fR or |
| 427 | \&\fR\&\f(CW\(if$MTOOLSRC\(is\fR). Obviously, this option is also a no op if mtools is |
| 428 | not installed setuid or setgid. This option is implied by 'scsi=1', but |
| 429 | again only for drives defined in system-wide configuration files. |
| 430 | Privileged may also be set explicitly to 0, in order to tell mtools not |
| 431 | to use its privileges for a given drive even if \fR\&\f(CWscsi=1\fR is set. |
| 432 | .IP |
| 433 | Mtools only needs to be installed setuid if you use the |
| 434 | \&\fR\&\f(CWprivileged\fR or \fR\&\f(CWscsi\fR drive variables. If you do not use |
| 435 | these options, mtools works perfectly well even when not installed |
| 436 | setuid root. |
| 437 | .TP |
| 438 | \&\fR\&\f(CWvold\fR\ |
| 439 | .IP |
| 440 | Instructs mtools to interpret the device name as a vold identifier |
| 441 | rather than as a filename. The vold identifier is translated into a |
| 442 | real filename using the \fR\&\f(CWmedia_findname()\fR and |
| 443 | \&\fR\&\f(CWmedia_oldaliases()\fR functions of the \fR\&\f(CWvolmgt\fR library. This |
| 444 | flag is only available if you configured mtools with the |
| 445 | \&\fR\&\f(CW--enable-new-vold\fR option before compilation. |
| 446 | .TP |
| 447 | \&\fR\&\f(CWswap\fR\ |
| 448 | .IP |
| 449 | Consider the media as a word-swapped Atari disk. |
| 450 | .TP |
| 451 | \&\fR\&\f(CWuse_xdf\fR\ |
| 452 | If this is set to a non-zero value, mtools also tries to access this |
| 453 | disk as an XDF disk. XDF is a high capacity format used by OS/2. This |
| 454 | is off by default. See section XDF, for more details. |
| 455 | .TP |
| 456 | \&\fR\&\f(CWmformat_only\fR\ |
| 457 | Tells mtools to use the geometry for this drive only for mformatting and |
| 458 | not for filtering. |
| 459 | .TP |
| 460 | \&\fR\&\f(CWfilter\fR\ |
| 461 | Tells mtools to use the geometry for this drive both for mformatting and |
| 462 | filtering. |
| 463 | .TP |
| 464 | \&\fR\&\f(CWremote\fR\ |
| 465 | Tells mtools to connect to floppyd (see section floppyd). |
| 466 | .PP |
| 467 | .SS \ \ Supplying\ multiple\ descriptions\ for\ a\ drive |
| 468 | .PP |
| 469 | It is possible to supply multiple descriptions for a drive. In that |
| 470 | case, the descriptions are tried in order until one is found that |
| 471 | fits. Descriptions may fail for several reasons: |
| 472 | .TP |
| 473 | 1.\ |
| 474 | because the geometry is not appropriate, |
| 475 | .TP |
| 476 | 2.\ |
| 477 | because there is no disk in the drive, |
| 478 | .TP |
| 479 | 3.\ |
| 480 | or because of other problems. |
| 481 | .PP |
| 482 | Multiple definitions are useful when using physical devices which are |
| 483 | only able to support one single disk geometry. |
| 484 | Example: |
| 485 | |
| 486 | .nf |
| 487 | .ft 3 |
| 488 | .in +0.3i |
| 489 | drive a: file="/dev/fd0H1440" 1.44m |
| 490 | drive a: file="/dev/fd0H720" 720k |
| 491 | .fi |
| 492 | .in -0.3i |
| 493 | .ft R |
| 494 | .PP |
| 495 | |
| 496 | \&\fR |
| 497 | .PP |
| 498 | This instructs mtools to use /dev/fd0H1440 for 1.44m (high density) |
| 499 | disks and /dev/fd0H720 for 720k (double density) disks. On Linux, this |
| 500 | feature is not really needed, as the /dev/fd0 device is able to handle |
| 501 | any geometry. |
| 502 | .PP |
| 503 | You may also use multiple drive descriptions to access both of your |
| 504 | physical drives through one drive letter: |
| 505 | .PP |
| 506 | |
| 507 | .nf |
| 508 | .ft 3 |
| 509 | .in +0.3i |
| 510 | drive z: file="/dev/fd0" |
| 511 | drive z: file="/dev/fd1" |
| 512 | .fi |
| 513 | .in -0.3i |
| 514 | .ft R |
| 515 | .PP |
| 516 | |
| 517 | \&\fR |
| 518 | .PP |
| 519 | With this description, \fR\&\f(CWmdir z:\fR accesses your first physical |
| 520 | drive if it contains a disk. If the first drive doesn't contain a disk, |
| 521 | mtools checks the second drive. |
| 522 | .PP |
| 523 | When using multiple configuration files, drive descriptions in the files |
| 524 | parsed last override descriptions for the same drive in earlier |
| 525 | files. In order to avoid this, use the \fR\&\f(CWdrive+\fR or \fR\&\f(CW+drive\fR |
| 526 | keywords instead of \fR\&\f(CWdrive\fR. The first adds a description to the |
| 527 | end of the list (i.e. it will be tried last), and the first adds it to |
| 528 | the start of the list. |
| 529 | .PP |
| 530 | .SS Location\ of\ configuration\ files\ and\ parsing\ order |
| 531 | .PP |
| 532 | The configuration files are parsed in the following order: |
| 533 | .TP |
| 534 | 1.\ |
| 535 | compiled-in defaults |
| 536 | .TP |
| 537 | 2.\ |
| 538 | \&\fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR |
| 539 | .TP |
| 540 | 3.\ |
| 541 | \&\fR\&\f(CW\(if~/.mtoolsrc\(is\fR. |
| 542 | .TP |
| 543 | 4.\ |
| 544 | \&\fR\&\f(CW\(if$MTOOLSRC\(is\fR (file pointed by the \fR\&\f(CWMTOOLSRC\fR environmental |
| 545 | variable) |
| 546 | .PP |
| 547 | Options described in the later files override those described in the |
| 548 | earlier files. Drives defined in earlier files persist if they are not |
| 549 | overridden in the later files. For instance, drives A and B may be |
| 550 | defined in \fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR and drives C and D may be |
| 551 | defined in \fR\&\f(CW\(if~/.mtoolsrc\(is\fR However, if \fR\&\f(CW\(if~/.mtoolsrc\(is\fR also |
| 552 | defines drive A, this new description would override the description of |
| 553 | drive A in \fR\&\f(CW\(ifSYSCONFDIRmtools.conf\(is\fR instead of adding to it. If |
| 554 | you want to add a new description to a drive already described in an |
| 555 | earlier file, you need to use either the \fR\&\f(CW+drive\fR or \fR\&\f(CWdrive+\fR |
| 556 | keyword. |
| 557 | .PP |
| 558 | .SS Backwards\ compatibility\ with\ old\ configuration\ file\ syntax |
| 559 | .PP |
| 560 | The syntax described herein is new for version \fR\&\f(CWmtools-3.0\fR. The |
| 561 | old line-oriented syntax is still supported. Each line beginning with a |
| 562 | single letter is considered to be a drive description using the old |
| 563 | syntax. Old style and new style drive sections may be mixed within the |
| 564 | same configuration file, in order to make upgrading easier. Support for |
| 565 | the old syntax will be phased out eventually, and in order to discourage |
| 566 | its use, I purposefully omit its description here. |
| 567 | .PP |
| 568 | .SH See also |
| 569 | mtools |