Copyright (C) 2000-2012 |
Manpages mtools.1Section: MTOOLS (3)Updated: 02Jun01 Index Return to Main Contents Namemtools.conf - mtools configuration files
DescriptionThis manpage describes the configuration files for mtools. They are called if/usr/local/etc/mtools.confis and if~/.mtoolsrcis. If the environmental variable MTOOLSRC is set, its contents is used as the filename for a third configuration file. These configuration files describe the following items:
Location of the configuration files
if/usr/local/etc/mtools.confis is the system-wide configuration file, and if~/.mtoolsrcis is the user's private configuration file. On some systems, the system-wide configuration file is called if/etc/defaults/mtools.confis instead. General configuration file syntax
The configuration files is made up of sections. Each section starts
with a keyword identifying the section followed by a colon.
Then follow variable assignments and flags. Variable assignments take
the following form:
name=value
Lines starting with a hash (#) are comments. Newline characters are equivalent to whitespace (except where ending a comment). The configuration file is case insensitive, except for item enclosed in quotes (such as filenames). Default valuesFor most platforms, mtools contains reasonable compiled-in defaults for physical floppy drives. Thus, you usually don't need to bother with the configuration file, if all you want to do with mtools is to access your floppy drives. On the other hand, the configuration file is needed if you also want to use mtools to access your hard disk partitions and dosemu image files.Global variablesGlobal flags may be set to 1 or to 0. The following global flags are recognized:
Example:
Inserting the following line into your configuration file instructs
mtools to skip the sanity checks:
MTOOLS_SKIP_CHECK=1
Global variables may also be set via the environment:
export MTOOLS_SKIP_CHECK=1 Global string variables may be set to any value:
Per drive flags and variablesGeneral informationPer drive flags and values may be described in a drive section. A drive section starts with drive "driveletter" : Then follow variable-value pairs and flags.
This is a sample drive description:
drive a: file="/dev/fd0" use_xdf=1 Disk Geometry ConfigurationGeometry information describes the physical characteristics about the disk. Its has three purposes:
Wrong geometry information may lead to very bizarre errors. That's why I strongly recommend that you add the mformat_only flag to your drive description, unless you really need filtering or initial geometry. The following geometry related variables are available:
Example: the following drive section describes a 1.44M drive:
drive a: file="/dev/fd0H1440" fat_bits=12 cylinders=80 heads=2 sectors=18 mformat_only The following shorthand geometry descriptions are available:
The shorthand format descriptions may be amended. For example, 360k sectors=8 describes a 320k disk and is equivalent to: fat_bits=12 cylinders=40 heads=2 sectors=8 Open FlagsMoreover, the following flags are available:
General Purpose Drive VariablesThe following general purpose drive variables are available. Depending to their type, these variables can be set to a string (file, precmd) or an integer (all others)
Only the file variable is mandatory. The other parameters may be left out. In that case a default value or an autodetected value is used. General Purpose Drive FlagsA flag can either be set to 1 (enabled) or 0 (disabled). If the value is ommitted, it is enabled. For example, scsi is equivalent to scsi=1
Supplying multiple descriptions for a driveIt is possible to supply multiple descriptions for a drive. In that case, the descriptions are tried in order until one is found that fits. Descriptions may fail for several reasons:
Multiple definitions are useful when using physical devices which are
only able to support one single disk geometry.
Example:
drive a: file="/dev/fd0H1440" 1.44m drive a: file="/dev/fd0H720" 720k This instructs mtools to use /dev/fd0H1440 for 1.44m (high density) disks and /dev/fd0H720 for 720k (double density) disks. On Linux, this feature is not really needed, as the /dev/fd0 device is able to handle any geometry. You may also use multiple drive descriptions to access both of your physical drives through one drive letter:
drive z: file="/dev/fd0" drive z: file="/dev/fd1" With this description, mdir z: accesses your first physical drive if it contains a disk. If the first drive doesn't contain a disk, mtools checks the second drive. When using multiple configuration files, drive descriptions in the files parsed last override descriptions for the same drive in earlier files. In order to avoid this, use the drive+ or +drive keywords instead of drive. The first adds a description to the end of the list (i.e. it will be tried last), and the first adds it to the start of the list. Character set translation tablesIf you live in the USA, in Western Europe or in Australia, you may skip this section. Why character set translation tables are neededDOS uses a different character code mapping than Unix. 7-bit characters still have the same meaning, only characters with the eight bit set are affected. To make matters worse, there are several translation tables available depending on the country where you are. The appearance of the characters is defined using code pages. These code pages aren't the same for all countries. For instance, some code pages don't contain upper case accented characters. On the other hand, some code pages contain characters which don't exist in Unix, such as certain line-drawing characters or accented consonants used by some Eastern European countries. This affects two things, relating to filenames:
Mtools considers the filenames entered on the command line as having the Unix mapping, and translates the characters to get short names. By default, code page 850 is used with the Swiss uppercase/lowercase mapping. I chose this code page, because its set of existing characters most closely matches Unix's. Moreover, this code page covers most characters in use in the USA, Australia and Western Europe. However, it is still possible to chose a different mapping. There are two methods: the country variable and explicit tables. Configuration using CountryThe COUNTRY variable is recommended for people which also have access to MS-DOS system files and documentation. If you don't have access to these, I'd suggest you'd rather use explicit tables instead. Syntax: COUNTRY="country[,[codepage], country-file]" This tells mtools to use a Unix-to-DOS translation table which matches codepage and an lowercase-to-uppercase table for country and to use the country-file file to get the lowercase-to-uppercase table. The country code is most often the telephone prefix of the country. Refer to the DOS help page on "country" for more details. The codepage and the country-file parameters are optional. Please don't type in the square brackets, they are only there to say which parameters are optional. The country-file file is supplied with MS-DOS, and is usually called ifCOUNTRY.SYSis, and stored in the ifC:\DOSis directory. In most cases you don't need it, as the most common translation tables are compiled into mtools. So, don't worry if you run a Unix-only box which lacks this file. If codepage is not given, a per country default code page is used. If the country-file parameter isn't given, compiled-in defaults are used for the lowercase-to-uppercase table. This is useful for other Unices than Linux, which may have no ifCOUNTRY.SYSis file available online. The Unix-to-DOS are not contained in the ifCOUNTRY.SYSis file, and thus mtools always uses compiled-in defaults for those. Thus, only a limited amount of code pages are supported. If your preferred code page is missing, or if you know the name of the Windows 95 file which contains this mapping, could you please drop me a line at alain@linux.lu. The COUNTRY variable can also be set using the environment. Configuration using explicit translation tablesTranslation tables may be described in line in the configuration file. Two tables are needed: first the DOS-to-Unix table, and then the Lowercase-to-Uppercase table. A DOS-to-Unix table starts with the tounix keyword, followed by a colon, and 128 hexadecimal numbers. A lower-to-upper table starts with the fucase keyword, followed by a colon, and 128 hexadecimal numbers. The tables only show the translations for characters whose codes is greater than 128, because translation for lower codes is trivial. Example:
tounix: 0xc7 0xfc 0xe9 0xe2 0xe4 0xe0 0xe5 0xe7 0xea 0xeb 0xe8 0xef 0xee 0xec 0xc4 0xc5 0xc9 0xe6 0xc6 0xf4 0xf6 0xf2 0xfb 0xf9 0xff 0xd6 0xdc 0xf8 0xa3 0xd8 0xd7 0x5f 0xe1 0xed 0xf3 0xfa 0xf1 0xd1 0xaa 0xba 0xbf 0xae 0xac 0xbd 0xbc 0xa1 0xab 0xbb 0x5f 0x5f 0x5f 0x5f 0x5f 0xc1 0xc2 0xc0 0xa9 0x5f 0x5f 0x5f 0x5f 0xa2 0xa5 0xac 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0xe3 0xc3 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0xa4 0xf0 0xd0 0xc9 0xcb 0xc8 0x69 0xcd 0xce 0xcf 0x5f 0x5f 0x5f 0x5f 0x7c 0x49 0x5f 0xd3 0xdf 0xd4 0xd2 0xf5 0xd5 0xb5 0xfe 0xde 0xda 0xd9 0xfd 0xdd 0xde 0xaf 0xb4 0xad 0xb1 0x5f 0xbe 0xb6 0xa7 0xf7 0xb8 0xb0 0xa8 0xb7 0xb9 0xb3 0xb2 0x5f 0x5f fucase: 0x80 0x9a 0x90 0xb6 0x8e 0xb7 0x8f 0x80 0xd2 0xd3 0xd4 0xd8 0xd7 0xde 0x8e 0x8f 0x90 0x92 0x92 0xe2 0x99 0xe3 0xea 0xeb 0x59 0x99 0x9a 0x9d 0x9c 0x9d 0x9e 0x9f 0xb5 0xd6 0xe0 0xe9 0xa5 0xa5 0xa6 0xa7 0xa8 0xa9 0xaa 0xab 0xac 0xad 0xae 0xaf 0xb0 0xb1 0xb2 0xb3 0xb4 0xb5 0xb6 0xb7 0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe 0xbf 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc7 0xc7 0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf 0xd1 0xd1 0xd2 0xd3 0xd4 0x49 0xd6 0xd7 0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde 0xdf 0xe0 0xe1 0xe2 0xe3 0xe5 0xe5 0xe6 0xe8 0xe8 0xe9 0xea 0xeb 0xed 0xed 0xee 0xef 0xf0 0xf1 0xf2 0xf3 0xf4 0xf5 0xf6 0xf7 0xf8 0xf9 0xfa 0xfb 0xfc 0xfd 0xfe 0xff The first table maps DOS character codes to Unix character codes. For example, the DOS character number 129. This is a u with to dots on top of it. To translate it into Unix, we look at the character number 1 in the first table (1 = 129 - 128). This is 0xfc. (Beware, numbering starts at 0). The second table maps lower case DOS characters to upper case DOS characters. The same lower case u with dots maps to character 0x9a, which is an uppercase U with dots in DOS. Unicode characters greater than 256If an existing MS-DOS name contains Unicode character greater than 256, these are translated to underscores or to characters which are close in visual appearance. For example, accented consonants are translated into their unaccented counterparts. This translation is used for mdir and for the Unix filenames generated by mcopy. Linux does support Unicode too, but unfortunately too few applications support it yet to bother with it in mtools. Most importantly, xterm can't display Unicode yet. If there is sufficient demand, I might include support for Unicode in the Unix filenames as well.Caution: When deleting files with mtools, the underscore matches all characters which can't be represented in Unix. Be careful with mdel! Location of configuration files and parsing orderThe configuration files are parsed in the following order:
Options described in the later files override those described in the earlier files. Drives defined in earlier files persist if they are not overridden in the later files. For instance, drives A and B may be defined in if/usr/local/etc/mtools.confis and drives C and D may be defined in if~/.mtoolsrcis However, if if~/.mtoolsrcis also defines drive A, this new description would override the description of drive A in if/usr/local/etc/mtools.confis instead of adding to it. If you want to add a new description to a drive already described in an earlier file, you need to use either the +drive or drive+ keyword. Backwards compatibility with old configuration file syntaxThe syntax described herein is new for version mtools-3.0. The old line-oriented syntax is still supported. Each line beginning with a single letter is considered to be a drive description using the old syntax. Old style and new style drive sections may be mixed within the same configuration file, in order to make upgrading easier. Support for the old syntax will be phased out eventually, and in order to discourage its use, I purposefully omit its description here. See alsomtools
Index
This document was created by man2html, using the manual pages. Time: 16:03:49 GMT, December 05, 2024 |