DOSEMU does not have a facility to swap disks or directory paths on the fly, aside from using the LREDIR
command, which is not possible to invoke during a program’s setup routine. Therefore, when the setup routine asks for “Disk 2”, there is no way to insert the correct virtual disk. Here is how to work around that.
I will assume that you have a directory that contains either standard headerless floppy disk images (size exactly 1474560 bytes for 1.44MB type disks; 1228800 bytes for 1.2MB type) of each of the program’s install disks, or a set of subdirectories, each containing the files that the install disks contained.
For example:
$ ls -l
total 15
drwxrwxr-x 2 games nemesis 2048 Nov 25 2003 Disk1
drwxrwxr-x 3 games nemesis 2048 Nov 25 2003 Disk2
drwxrwxr-x 3 games nemesis 2048 Nov 25 2003 Disk3
drwxrwxr-x 9 games nemesis 2048 Nov 25 2003 Disk4
drwxrwxr-x 3 games nemesis 2048 Nov 25 2003 Disk5
drwxrwxr-x 3 games nemesis 2048 Nov 25 2003 Disk6
drwxrwxr-x 7 games nemesis 2048 Nov 25 2003 Disk7
-rw-rw-r-- 1 games nemesis 236 Nov 25 2003 Disks.txt
$ find
.
./Disk7
./Disk7/BIN11
./Disk7/HELP
./Disk7/HELP/UTILERR.HL$
./Disk7/INC11
./Disk7/INC11/BSEDOS.H$
./Disk7/INC11/BSE.H$
./Disk7/INC11/BSEDEV.H$
./Disk7/INC11/BSEERR.H$
./Disk7/INC11/BSESUB.H$
./Disk7/INC11/OS2.H$
./Disk7/INC11/OS2DEF.H$
./Disk7/INC11/PM.H$
./Disk7/INC11/PMAVIO.H$
./Disk7/INC11/PMBITMAP.H$
./Disk7/INC11/PMDEV.H$
[..etc..]
Given that, configure a disk of the correct size in the $HOME/.mtoolsrc
:
drive a:
1.44m
file="/home/nemesis/1440.img" mformat_only
Then configure a disk drive of the correct type for that disk image in /etc/dosemu/dosemu.conf
:
$_floppy_a = "threeinch:/home/nemesis/1440.img"
Now start DOSEMU. On the Linux side, you can use the mtools
utilities such as mdir
, mformat
, mcopy
, and mdel
to operate on the virtual disk A:
now, and you should immediately be able to see the changes to the virtual disk inside DOSEMU by performing DIR A:
. Copy the files for the program’s Disk 1 and run the setup routine.
The rest is left as an exercise to the reader, but whenever the setup routine requests a new disk, you can freely mformat A:
and then mcopy -s Disk1/* A:
(-s
is required for a deep copy) if you have a directory containing the files, or just overwrite the virtual disk file with the next image using cp
or dd
if you have disk images.
Note that some setup routines will check for a correct disk label, so if you are trying to install such a program and you are creating install disks by copying files from subdirectories, you will have to set the (somehow known to you) correct label with mformat -v
. Also, none of the above will work if the program employs any media-based anti-copying protection.