Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

IMGMOUNT - DOSBoxWiki https://www.dosbox.

com/wiki/IMGMOUNT

IMGMOUNT
From DOSBoxWiki
Jump to navigationJump to search

A utility to mount hard disk and optical disc images in DOSBox.

Note: You can use Disk Explorer to copy files and folders to/from images (but not to
delete them or DOSBox will consider the images corrupted! Read the
aforementioned link for more info).

Contents
▪ 1 Command line parameters
▪ 2 Optical disc images
▪ 2.1 Loading an ISO image
▪ 2.1.1 An example in Windows
▪ 2.1.2 Other example in Windows (more than one image)
▪ 2.1.3 An example in Unix
▪ 2.1.4 Loading more than one image
▪ 2.2 Loading a CUE image
▪ 2.2.1 An example in Windows
▪ 2.2.2 An example in Unix
▪ 2.2.3 Note: make sure to use CUE and not BIN for Mixed Mode CDs
▪ 2.2.4 Note: you can mount CUE with an ISO for Mixed Mode CDs
▪ 3 Hard disk images
▪ 3.1 The "-size" parameter (required to to create bootable hard disk
images)
▪ 3.2 Loading a regular hard disk image
▪ 3.2.1 Example
▪ 3.3 Bootable hard disk images
▪ 3.3.1 Format the partition with "format"
▪ 3.3.2 Loading a bootable hard disk image

Command line parameters


IMGMOUNT DRIVE [imagefile] -t [image_type] -fs [image_format]
-size [sectorsbytesize, sectorsperhead, heads, cylinders -u DRIVE]

DRIVE
Drive name (letter) the image will use

▪ a for the drive letter a:\ or


▪ b for the drive letter b:\ etc...

imagefile
Location of the image files to mount in DOSBox. The location can be on a
mounted drive inside DOSBox, or on your real disk. It is possible to mount

1 von 6 24.01.22, 12:57


IMGMOUNT - DOSBoxWiki https://www.dosbox.com/wiki/IMGMOUNT

multiple (e.g. "~/images/CD1.cue ~/images/CD2.cue [...] ~images/CDn.cue") optical disc


images (ISOs or CUE/BIN) as well, if you need CD swapping capabilities specify
all images in succession. The CDs can be swapped with CTRL-F4 at any time.

-t
The following are valid image types:
floppy
Specifies a floppy image or images. DOSBox will automatically identify the
disk geometry (360K, 1.2MB, 720K, 1.44MB, etc).
iso
Specifies an optical disc iso image. The geometry is automatic and set for
this size. This can be an iso or a cue/bin.
hdd
Specifies a hard disk image. The proper CHS geometry must be set for this
to work.

-fs
The following are valid file system formats:
iso
Specifies the ISO 9660 optical disc format.
fat
Specifies that the image uses the FAT file system. DOSBox will attempt to
mount this image as a drive in DOSBox and make the files available from
inside DOSBox.
none
DOSBox will make no attempt to read the file system on the disk. This is
useful if you need to format it or if you want to boot the disk using the
BOOT command. When using the "none" filesystem, you must specify the
drive number (2 or 3, where 2=master, 3=slave) rather than a drive letter.
For example, to mount a 70MB image as the slave drive device, you would
type: "imgmount 3 d:\test.img -size 512,63,16,142 -fs none" (without the quotes).
Compare this with a mount to read the drive in DOSBox, which would read
as: "imgmount e: d:\test.img -size 512,63,16,142".

-size
The Cylinders, Heads and Sectors specification of the drive. Only required to to
create bootable hard disk images. This means it is not required for either
loading a regular hard disk image or optical disc images.

-u
unmount an image.

▪ e.g. if an disk image was mounted to be the disk drive a:\ type:
▪ "imgmount -u a"

Optical disc images


Loading an ISO image

An example in Windows

Z:>mount c "c:\images"
Z:>imgmount d "C:\MyISO.iso" -t iso

2 von 6 24.01.22, 12:57


IMGMOUNT - DOSBoxWiki https://www.dosbox.com/wiki/IMGMOUNT

Z:>d:
D:>

Other example in Windows (more than one image)

Z:>mount c "c:\images"
Z:>imgmount d c:\mr2_cd1.iso c:\mr2_cd2.iso -t iso
Z:>d:
D:>

An example in Unix

Z:>mount c "/tmp"
Z:>imgmount d "/tmp/MyISO.iso" -t iso
Z:>d:
D:>

Loading more than one image

It is possible to mount more than one image, and then switch between them using
ctrl-f4 Example in Linux:

IMGMOUNT.COM d c:\disk1.iso c:\disk2.iso ... -t cdrom

Loading a CUE image

An example in Windows

Z:>mount c "c:\images"
Z:>imgmount d "C:\cdimg.cue" -t iso -fs iso
Z:>d:
D:>

An example in Unix

Z:>mount c "/tmp"
Z:>imgmount d "/tmp/cdimg.cue" -t iso -fs iso
Z:>d:
D:>

Note: make sure to use CUE and not BIN for Mixed Mode CDs

You can mount bin/cue type CD images with the IMGMOUNT command, and it will
'sort of' work if you specify the .bin file as the file to mount. However, it will not
mount the audio tracks of the CD correctly if you do this. Specifying the associated
.cue file will load all tracks correctly.

Note: you can mount CUE with an ISO for Mixed Mode CDs

3 von 6 24.01.22, 12:57


IMGMOUNT - DOSBoxWiki https://www.dosbox.com/wiki/IMGMOUNT

It is also possible to use a cuescheet in combination with an ISO and compressed


audio tracks in OGG or MP3 format.

Hard disk images


The "-size" parameter (required to to create bootable hard disk
images)

Didn't understand the "512,63,16,142" part?

All you really need to know is that the formula is always:

-size 512,63,16,X

X is the number of "cylinders" in the image. It's based on the image's size. If you
create the image through Bochs, then it would tell you the number of cylinders.

If you want to understand a little more, here's a more detailed explanation than the
official one on the numbers.

Now, let's say you created a 70M image using the bximage program from Bochs. You
will then get the following details:

I:> bximage.exe
========================================================================
bximage
Disk Image Creation Tool for Bochs
$Id: bximage.c,v 1.32 2006/06/16 07:29:33 vruppert Exp $
========================================================================

Do you want to create a floppy disk image or a hard disk image?


Please type hd or fd. [hd]

What kind of image should I create?


Please type flat, sparse or growing. [flat]

Enter the hard disk size in megabytes, between 1 and 129023


[10] 70

I will create a 'flat' hard disk image with


cyl=142
heads=16
sectors per track=63
total sectors=143136
total size=69.89 megabytes

What should I name the image?


[c.img] 70mb.img

Writing: [] Done.

I wrote 73285632 bytes to 70mb.img.

You don't actually need to know the total numbers of sectors, other than to calculate
the sector size (in bytes):

bytes-per-sectors = total-file-size-in-bytes / total-sectors


bytes_per_sectors = 73285632 / 143136
bytes_per_sectors = 512

Now you have all you need.

4 von 6 24.01.22, 12:57


IMGMOUNT - DOSBoxWiki https://www.dosbox.com/wiki/IMGMOUNT

Start the line with 512 and then add the 3 first parts in reverse order. In other words:

imgmount ...... -size 512,63,16,142

▪ Here's a tip: the first 3 numbers should always be the same. So all you really
need is the cyl=X. In other words, it should always be:

imgmount ...... -size 512,63,16,X

▪ Only the X changes, according to the size you specify when you create the
image.

That wasn't so hard, was it? ;-)

Loading a regular hard disk image

Example

Z:>mount d c:\images
Z:>d:
D:>imgmount c "70mb.img"

Bootable hard disk images

Format the partition with "format"

Start DOSBox again and type:

Z:>mount d c:\images
Z:>d:
D:>imgmount 2 "70mb.img" -size 512,63,16,142 -t hdd -fs none
D:>boot "msdos622.img"
(Opening and booting from image file: msdos622.img)

...

A:\>format c: /s

Exit DOSBox.

The hard disk image is now bootable! See Loading a bootable hard disk image.

Loading a bootable hard disk image

From now on, whenever you want to boot from drive C:, start DOSBox and type, for
example:

Z:>mount d c:\images
Z:>d:
D:>imgmount c "70mb.img"
D:>boot -l c
(Opening and directly booting from image file: 70mb.img)
C:>

5 von 6 24.01.22, 12:57


IMGMOUNT - DOSBoxWiki https://www.dosbox.com/wiki/IMGMOUNT

Retrieved from "https://www.dosbox.com/wiki/index.php?title=IMGMOUNT&


oldid=4119"

▪ This page was last edited on 26 October 2010, at 17:57.

6 von 6 24.01.22, 12:57

You might also like