Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 65 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       This manpage describes the configuration files for mtools.
       They   are   called    `/usr/local/etc/mtools.conf'    and
       `~/.mtoolsrc'.  If  the environmental variable MTOOLSRC is
       set, its contents is used as the filename for a third con­
       figuration  file.  These  configuration files describe the
       following items:

       *  Global configuration flags and variables

       *  Per drive flags and variables

       *  Character translation tables

   Location of the configuration files
       `/usr/local/etc/mtools.conf' is the system-wide configura­
       tion file, and `~/.mtoolsrc' is the user's private config­
       uration file.

       On some systems, the  system-wide  configuration  file  is
       called `/etc/defaults/mtools.conf' instead.

     General configuration file syntax
       The  configuration files is made up of sections. Each sec­
       tion starts with a keyword identifying  the  section  fol­
       lowed  by  a  colon.  Then follow variable assignments and
       flags. Variable assignments take the following form:

       Flags are lone keywords without an equal  sign  and  value
       following  them.   A section either ends at the end of the
       file or where the next section begins.

       Lines starting with a hash (#) are comments. Newline char­
       acters 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 values
       For 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.
              If this is set to 1,  mtools  skips  the  fat  size
              checks.  Some  disks  have  a  bigger FAT than they
              really need to. These are rejected if  this  option
              is not set.

              If this is set to 1, mtools displays all-upper-case
              short filenames as lowercase. This has been done to
              allow  a  behavior  which  is consistent with older
              versions of mtools which didn't know about the case

              If  this  is  set  to 1, mtools won't generate VFAT
              entries for filenames  which  are  mixed-case,  but
              otherwise legal dos filenames.  This is useful when
              working with DOS versions  which  can't  grok  VFAT
              longnames, such as FreeDos.

              In  a  wide directory, prints the short name with a
              dot instead of spaces separating the  basename  and
              the extension.

              If  this  is set to one (default), generate numeric
              tails for all long names (~1).   If  set  to  zero,
              only  generate  numeric  tails if otherwise a clash
              would have happened.

              If 1, uses the European notation for times  (twenty
              four  hour  clock),  else  uses  the UK/US notation

       Example: Inserting the following line into your configura­
       tion file instructs mtools to skip the sanity checks:


       Global variables may also be set via the environment:

            export MTOOLS_SKIP_CHECK=1

       Global string variables may be set to any value:

              The  format  used  for printing dates of files.  By

     Disk Geometry Configuration
       Geometry information describes the  physical  characteris­
       tics about the disk. Its has three purposes:

              The  geometry  information is written into the boot
              sector of the newly made  disk.  However,  you  may
              also  describe the geometry information on the com­
              mand line. See section mformat, for details.

              On some Unices there are device  nodes  which  only
              support  one  physical  geometry. For instance, you
              might need a different node to  access  a  disk  as
              high  density  or  as  low density. The geometry is
              compared to the actual geometry stored on the  boot
              sector  to  make sure that this device node is able
              to correctly read the disk. If the geometry doesn't
              match,  this  drive entry fails, and the next drive
              entry bearing the same drive letter is  tried.  See
              section  multiple descriptions, for more details on
              supplying several descriptions for one  drive  let­

              If  no geometry information is supplied in the con­
              figuration file, all disks are accepted.  On  Linux
              (and  on  Sparc) there exist device nodes with con­
              figurable geometry  (`/dev/fd0',  `/dev/fd1'  etc),
              and  thus filtering is not needed (and ignored) for
              disk drives.  (Mtools still does  do  filtering  on
              plain  files (disk images) in Linux: this is mainly
              intended for test purposes, as I don't have  access
              to a Unix which would actually need filtering).

              If  you  do  not  need  filtering, but want still a
              default geometry for mformatting,  you  may  switch
              off filtering using the mformat_only flag.

              If you want filtering, you should supply the filter
              flag.  If you supply a geometry,  you  must  supply
              one of both flags.

       initial geometry
              On   devices   that   support  it  (usually  floppy
              devices), the geometry information is also used  to
              set  the initial geometry. This initial geometry is
              applied while reading the boot sector,  which  con­
              tains  the  real geometry.  If no geometry informa­

       The following geometry related variables are available:

       tracks The number of cylinders.  (cylinders  is  the  pre­
              ferred form, tracks is considered obsolete)

       heads  The number of heads (sides).

              The number of sectors per track.

       Example:  the  following  drive  section describes a 1.44M

            drive a:
                cylinders=80 heads=2 sectors=18

       The following shorthand geometry descriptions  are  avail­

       1.44m  high density 3 1/2 disk. Equivalent to: fat_bits=12
              cylinders=80 heads=2 sectors=18

       1.2m   high density 5 1/4 disk. Equivalent to: fat_bits=12
              cylinders=80 heads=2 sectors=15

       720k   double   density   3   1/2   disk.  Equivalent  to:
              fat_bits=12 cylinders=80 heads=2 sectors=9

       360k   double  density  5   1/4   disk.   Equivalent   to:
              fat_bits=12 cylinders=40 heads=2 sectors=9

       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 Flags
       Moreover, the following flags are available:

       sync   All i/o operations are done synchronously

              The  device  or  file  is  opened with the O_NDELAY
              flag. This is needed on  some  non-Linux  architec­
              image.  This  is mandatory. The file name should be
              enclosed in quotes.

              Tells mtools to treat the drive  as  a  partitioned
              device,  and  to use the given partition. Only pri­
              mary partitions are accessible using  this  method,
              and they are numbered from 1 to 4. For logical par­
              titions, use the more general offset variable.  The
              partition  variable is intended for removable media
              such as Syquests, ZIP drives,  and  magneto-optical
              disks.  Although  traditional DOS sees Syquests and
              magneto-optical disks as `giant floppy disks' which
              are  unpartitioned,  OS/2 and Windows NT treat them
              like hard disks, i.e. partioned devices. The parti­
              tion flag is also useful DOSEMU hdimages. It is not
              recommended for hard disks for which direct  access
              to partitions is available through mounting.

              Describes  where  in the file the MS-DOS filesystem
              starts. This is useful for  logical  partitions  in
              DOSEMU  hdimages,  and  for  ATARI  ram  disks.  By
              default, this is zero, meaning that the  filesystem
              starts  right  at  the  beginning  of the device or

              The number of FAT bits. This may be 12 or 16.  This
              is  very  rarely needed, as it can almost always be
              deduced from information in the boot sector. On the
              contrary,  describing  the  number  of fat bits may
              actually be harmful if you get it wrong. You should
              only  use it if mtools gets the autodetected number
              of fat bits wrong, or if you want to mformat a disk
              with a weird number of fat bits.


              On  some  variants  of  Solaris, it is necessary to
              call 'volcheck -v' before opening a floppy  device,
              in  order  for  the  system to notice that there is
              indeed a disk in the drive. precmd="volcheck -v" in
              the  drive clause establishes the desired behavior.


              This parameter represents a default block  size  to
              be  always  used  on  this device.  All I/O is done
              with multiples of this block size, independantly of
              the sector size registered in the filesystem's boot
              sector.  This is useful for character devices whose
              Instruct mtools to not use locking on  this  drive.
              This is needed on systems with buggy locking seman­
              tics.  However, enabling this makes operation  less
              safe  in  cases  where several users may access the
              same drive at the same time.

       scsi   When set to 1, this option tells mtools to use  raw
              SCSI  I/O  instead of the standard read/write calls
              to access the device. Currently, this is  supported
              on  HP/UX,  Solaris  and  SunOs.   This  is  needed
              because on some architectures,  such  as  SunOs  or
              Solaris,  PC media can't be accessed using the read
              and write syscalls, because the OS expects them  to
              contain a Sun specific "disk label".

              As  raw  Scsi  access always uses the whole device,
              you need to specify the "partition" flag  in  addi­

              On  some  architectures,  such  as  Solaris, mtools
              needs root privileges to be able to  use  the  scsi
              option.   Thus  mtools  should be installed set uid
              root on Solaris  if  you  want  to  access  Zip/Jaz
              drives.   Thus,  if  the scsi flag is given, privi­
              leged is automatically implied,  unless  explicitly
              disabled by privileged=0

              Mtools uses its root privileges to open the device,
              and to issue the actual SCSI I/O calls.   Moreover,
              root  privileges are only used for drives described
              in  a  system-wide  configuration  file   such   as
              `/usr/local/etc/mtools.conf',  and  not  for  those
              described in `~/.mtoolsrc' or `$MTOOLSRC'.

              When set to 1, this instructs  mtools  to  use  its
              set-uid  and  set-gid  privileges  for  opening the
              given drive.  This option is only valid for  drives
              described  in  the  system-wide configuration files
              (such    as    `/usr/local/etc/mtools.conf',    not
              `~/.mtoolsrc'  or  `$MTOOLSRC').   Obviously,  this
              option is also a no op if mtools is  not  installed
              setuid  or  setgid.   This  option  is  implied  by
              'scsi=1', but again only for drives defined in sys­
              tem-wide  configuration files.  Privileged may also
              be set explicitely to 0, in order  to  tell  mtools
              not to use its privileges for a given drive even if
              scsi=1 is set.

              Mtools only needs to be installed setuid if you use
              the  privileged or scsi drive variables.  If you do
              not use these options, mtools works perfectly  well
              Consider the media as a word-swapped Atari disk.

              If  this  is  set  to a non-zero value, mtools also
              tries to access this disk as an XDF disk. XDF is  a
              high  capacity  format used by OS/2. This is off by
              default. See section XDF, for more details.

              Tells mtools to use the  geometry  for  this  drive
              only for mformatting and not for filtering.

              Tells  mtools  to  use  the geometry for this drive
              both for mformatting and filtering.

              Tells mtools to connect  to  floppyd  (see  section

     Supplying multiple descriptions for a drive
       It  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:

       1.     because the geometry is not appropriate,

       2.     because there is no disk in the drive,

       3.     or because of other problems.

       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"

       the list.

   Character set translation tables
       If you live in the USA, in Western Europe or in Australia,
       you may skip this section.

     Why character set translation tables are needed
       DOS  uses  a  different  character code mapping than Unix.
       7-bit characters still have the same meaning, only charac­
       ters  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  charac­
       ters.  On  the other hand, some code pages contain charac­
       ters which don't exist in Unix, such as certain line-draw­
       ing characters or accented consonants used by some Eastern
       European countries. This affects two things,  relating  to

       upper case characters
              In  short  names,  only  upper  case characters are
              allowed. This also holds for  accented  characters.
              For  instance, in a code page which doesn't contain
              accented uppercase characters, the accented  lower­
              case  characters  get  transformed into their unac­
              cented counterparts.

       long file names
              Micro$oft has finally come to their senses and uses
              a  more  standard  mapping for the long file names.
              They use Unicode, which is basically a 32 bit  ver­
              sion of ASCII. Its first 256 characters are identi­
              cal to Unix ASCII. Thus, the code page also affects
              the  correspondence  between the codes used in long
              names and those used in short names

       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.

       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 `COUNTRY.SYS',
       and stored in the `C:\DOS' 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,  com­
       piled-in  defaults are used for the lowercase-to-uppercase
       table. This is useful for other Unices than  Linux,  which
       may have no `COUNTRY.SYS' file available online.

       The  Unix-to-DOS  are  not  contained in the `COUNTRY.SYS'
       file, and thus mtools always uses compiled-in defaults for
       those.  Thus, only a limited amount of code pages are sup­
       ported. 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

       The  COUNTRY  variable  can also be set using the environ­

     Configuration using explicit translation tables
       Translation tables may be described in line in the config­
       uration 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.


             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
             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

     Unicode characters greater than 256
       If 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  applica­
       tions  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 order
       The configuration files are parsed in the following order:

       1.     compiled-in defaults

       2.     `/usr/local/etc/mtools.conf'
       `/usr/local/etc/mtools.conf' and drives C  and  D  may  be
       defined  in  `~/.mtoolsrc'  However, if `~/.mtoolsrc' also
       defines drive A, this new description would  override  the
       description  of  drive  A  in `/usr/local/etc/mtools.conf'
       instead of adding to it. If you want to add a new descrip­
       tion  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 syntax
       The 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

See also


MTOOLS                       05Jun03                  mtools.1(3)
Help us cut cost by not downloading the whole site!
Use of automated download sofware ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and therefore is expressedly prohibited. For more details on this, take a look here



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.08 Seconds