MTools: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
(Improved introduction, fixed broken link and added external links)
 
Line 1: Line 1:
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 gives you command line access to FAT disks or disk images. It does not mount an image like the other programs, but you get MTools 'dir', 'format' etc that access the image. This is obviously not as integrated as mounting the image so the Host OS itself can see the filesystem, but its the next best thing. Several linux distro's come with prebuilt packages, but it compiles out of the box under cygwin.


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/
MTools can be downloaded [http://mtools.linux.lu/ here]


==Using disk images==
==Using disk images==
Line 11: Line 11:


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. [http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html] under 'FAT16' for an explanation) to the BPB if you format a FAT12 image.
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. [http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html] under 'FAT16' for an explanation) to the BPB if you format a FAT12 image.

==See Also==
===External Links===
* https://www.gnu.org/software/mtools/ Mtools home page.
* https://linux.die.net/man/1/mtools Mtools Linux man entry.



{{Stub}}
{{Stub}}

Latest revision as of 05:13, 14 November 2020

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 page is a stub.
You can help the wiki by accurately adding more contents to it.