Mtools frequently asked questions

Is there a way to configure mtools so that it takes both Mac Zip disks (partition 1) and PC Zip disks (partition 4) without changing the config file between each?

Yes, you may enter both configurations at once into your configuration file. That way, mtools checks both, and uses the first that matches:

drive z: file="/dev/sdb" partition=1
drive z: file="/dev/sdb" partition=4

Is it possible to partition and format Zip 250 disks using mtools?

Sure. However, by default the builtin definition for the zip drive (z:) has the parameters for the 100 Meg variant. If you want to format a 250 Meg disk, you have to supply the parameters explicitly:

$ mpartition -c -t 239 -h 64 -s 32 -b 32 Z:
$ mformat -t 239 -h 64 -s 32 -H 32 z:

You can also enter the parameters into your /etc/mtools.conf file:

drive z: file="/dev/sda" scsi privileged
  cylinders=239 heads=64 sectors=32 hidden=32

I'm new to Linux (Unix), how do I compile mtools?

First, if you use a SuSE or Redhat distribution, there is no need to compile mtools, a premade RPM file is available. Download it, and install it with rpm -U mtools-4.0.18-1.i586.rpm. If you use another distribution, or if you want to use a version of mtools that's more recent than the RPM, proceed as follows: Let's assume that you have downloaded the mtools tar file, and any patch to your homedirectory, before you start. This example uses mtools version 4.0.18, substitute the appropriate version if you use something else. In the examples below, what you should type is shown in bold face, whereas the computer's output and prompts are shown in a italic font. Long output is abridged in the examples.
  1. Unpack mtools:
    > gzip -dc $HOME/mtools-4.0.18.tar.gz | tar xfv -
  2. Go into the mtools directory:
    > cd mtools-4.0.18
  3. Apply the patch, if you have any:
    > gzip -dc $HOME/mtools-4.0.18-20071226.diff.gz | patch -p1 -s
  4. Configure it:
    > ./configure
    creating cache ./config.cache
    checking for gcc... gcc
    checking whether the C compiler (gcc  ) works... yes
    checking whether the C compiler (gcc  ) is a cross-compiler... no
    checking for main in -lnsl... no
    updating cache ./config.cache
    creating ./config.status
    creating Makefile
    creating config.h
  5. Compile it:
    > make
    gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -DCPU_i686 -DVENDOR_pc \
    -DOS_linux  -g -O2 -fno-strength-reduce -Wall -I.  -I. -c buffer.c
    gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -DCPU_i686 -DVENDOR_pc \
    -DOS_linux  -g -O2 -fno-strength-reduce -Wall -I.  -I. -c codepage.c
    gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -DCPU_i686 -DVENDOR_pc \
    -DOS_linux  -g -O2 -fno-strength-reduce -Wall -I.  -I.   -c codepages.c
    gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -DCPU_i686 -DVENDOR_pc \
    -DOS_linux  -g -O2 -fno-strength-reduce -Wall -I.  -I.   -c config.c
    gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -DCPU_i686 -DVENDOR_pc \
    -DOS_linux  -g -O2 -fno-strength-reduce -Wall -I.  -I.   -c floppyd.c
    gcc    -L/usr/X11R6/lib floppyd.o -o floppyd -lX11 -lXau
    gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc\" -DCPU_i686 -DVENDOR_pc \
    -DOS_linux  -g -O2 -fno-strength-reduce -Wall -I.  -I.   -c floppyd_installtest.c
    gcc    -L/usr/X11R6/lib floppyd_installtest.o misc.o expand.o privileges.o -o \
    floppyd_installtest    -lX11 -lXau
  6. Become root
    > su
  7. Install mtools:
    # make install
    ./mkinstalldirs /usr/local/bin
    /usr/bin/install -c mtools /usr/local/bin/mtools
    ./mkinstalldirs /usr/local/bin
    /usr/bin/install -c floppyd /usr/local/bin/floppyd
    ./mkinstalldirs /usr/local/bin
    /usr/bin/install -c floppyd_installtest /usr/local/bin/floppyd_installtest
    Making info file `' from `mtools.texi'.
    ./mkinstalldirs /usr/local/info
    if test -f; then \
      for i in*; do \
        /usr/bin/install -c -m 644 $i /usr/local/info/$i; \
      done; \
    else \
      for i in ./*; do \
        /usr/bin/install -c -m 644 $i /usr/local/info/`echo $i | sed 's|^./||'`; \
      done; \

Mtools doesn't read CD-Roms!

This is to be expected. There are several ways in which operating systems can organize their file data on a raw device. These are called filesystem types. MSDOS for instance uses the FAT filesystem. Linux usually uses ext2. Macintoshes use HFS. NT usually uses NTFS. And CD-Roms usually use ISO9660.

Mtools is intended to read FAT (native MS-Dos) filesystem, and hence cannot read CD-Roms.

However, you can mount the CD-Rom natively using the following command:

mount -t iso9660 /dev/cdrom /cdrom
wien ass de