Contact us

Print

mtools

According to the description of the “mtools” software package, mtools is a collection of utilities for accessing MS-DOS files. Mtools allow you to read, write, and move MS-DOS file-system files (normally on MS-DOS floppy disks).
Mtools supports Windows95 style long file names, OS/2 XDF disks, and 2m disks.
It implements the most common DOS commands so that users coming from DOS/Windows backgrounds won’t have much of a struggle with Unix/Linux like commands.

Another advantage that the mtools packages offers is that, you don’t have to explicitly mount floppy devices (using the typical mount command) before you can access or use the files on the floppy disk

The mtools software use almost the same name and syntax as their DOS counterpart commands,
except that you would append an “m” prefix to the DOS command equivalent.

The table below shows this comparison.


DOS
Linux
dir
mdir
Copy
mcopy


Mtool commands read and write to the physical device, which happens to be owned by the superuser. This means that permissions on the physical device have to be altered to allow regular users to access the mtools facility.

To install mtools

1. While logged into the system as the root user, first check that you don’t already
have the mtools package installed. Type:

root@localhost root# rpm -q mtools

mtools-3.9.8-5

If you get an output similar to the one above, then you don’t have to install the package – you may then skip step 2.

2. You need to connect to your software distribution location (CD-ROM or FTP site)
and download the package called – “mtools*.rpm”
replace the asterisk (*) with the correct version number. To install it type:

root@localhost root# rpm –Uvh mtools*.rpm

3. Once you have successfully installed the package you may to configure it.





To configure mtools

The main configuration file for mtools is the “/etc/mtools.conf” file
It contains definitions for drives (such as , A:, B:, C: etc) that the mtools utilities see

On DOS systems, the first floppy disk drive is usually referred to with the drive letter “A:” or “a:”
In this exercise you will change the drive letter to “z:”. This is done only for illustration
purposes. On a normal system you would probably want to leave the drive letter at its usual default (A)

1. Open the /etc/mtools.conf file with a pager (e.g. less) and study its contents. Type:

root@localhost root# less /etc/mtools.conf

The first seven relevant lines have been copied below:

1 # Example mtools.conf files. Uncomment the lines which correspond to
2 # your architecture and comment out the "SAMPLE FILE" line below
3
4 # Linux floppy drives
5 drive a: file="/dev/fd0" exclusive mformat_only
6 drive b: file="/dev/fd1" exclusive mformat_only
7
.....................................................................................

Close the file when done.

Please note that line numbers have been added to the output above only to aid readability. You may ignore the line numbers..


2. Now open up the file in any text editor ( e.g. vi, pico, joe etc) for editing. Type:

root@localhost root# pico /etc/mtools.conf

1 # Example mtools.conf files. Uncomment the lines which correspond to
2 # your architecture and comment out the "SAMPLE FILE" line below
3
4 # Linux floppy drives
5 drive a: file="/dev/fd0" exclusive mformat_only
6 drive b: file="/dev/fd1" exclusive mformat_only
7
.....................................................................................


Locate your equivalent of line 5 in the above output and change it so that it now reads:

5 drive z: file="/dev/fd0" exclusive mformat_only

Save your changes to the file and exit your text editor.


Created by: system. Last Modification: Tuesday 25 of November, 2008 17:39:32 EST by admin.

...