From OSDev Wiki
Jump to: navigation, search

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 can be downloaded here

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.

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

Personal tools