MTools

From OSDev Wiki
Jump to: navigation, search

Mtools is a collection of tools to allow Unix systems to manipulate MS-DOS based filesystems, such as FAT. It provides command-line utilities to read, write, and move files on an MS-DOS filesystem. Mtools is not capable of facilitating mounting an MS-DOS disk image to the host system. One common use for Mtools is to copy files to a FAT disk image located on the host system.

Mtools is available in the package repositories of most Linux distributions, or can be built from source under Cygwin. The source code is available here: https://www.gnu.org/software/mtools/

Using disk images

The -i option, followed by a disk images file name, allows for using a disk image in place of a real device when the drive letter : is used.

For example to copy the file kernel.elf from the working directory to the root directory of the image floppy.img one would use

 mcopy -i floppy.img kernel.elf ::/


It is important to notice that, while MTools claims to include only the minimal BIOS Parameter Block (BPB), it actually uses the FAT16 extension (see e.g. [1] under 'FAT16' for an explanation) to the BPB if you format a FAT12 image.

See Also

External Links


This article is a stub! This page or section is a stub. You can help the wiki by accurately contributing to it.

Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox