How to Automount folder as C: in Dosbox

I have had a look at the community documentation here and there doesn't seem to be any information about how to "Automount" a folder as the C: drive in Dosbox.

Also as a bonus is it possible to automount the cd/dvd drive in the same way?


Solution 1:

With DosBox open, type:

config -writeconf /home/user/dosbox.conf (or whatever) then exit Dosbox.

Open dosbox.conf and add (the [autoexec] is at the bottom):

[autoexec] 

mount c /home/user/path/to/folder

I assume you can do the same for just about any command, it seems to be basically a batch file that is ran at launch.

http://www.ubuntugeek.com/howto-auto-mount-a-drive-in-dosbox.html

Solution 2:

As it has already been shown how to mount a folder and set it as c drive in dosbox (although it is also necessary to add c: under the mount c line to actually change to that folder), I will address the second part of the question and demonstrate a few other dosbox commands that can be used to mount optical drives and disk image files.

All the following commands go in the [autoexec] section of your dosbox.conf. To select a different conf from the default held in .dosbox, generate it with the config -writeconf command (as noted in the above answer), edit it and place it in your game folder, and launch the game so that dosbox uses the custom conf:

dosbox -conf /home/mike/DOS/Game/dosboxgame.conf

With regard to your second question, you can mount multiple optical drives if you have more than one physical drive connected to your computer. The disc must be mounted in Ubuntu before you start dosbox. The dosbox command to add to your conf file is, for example:

mount d /media/The_Web -t cdrom

Dosbox also has a very useful feature that allows you to mount a folder as if it were a cdrom: this is very useful when the folder contains multiple disk images. A sample command for this that I have in one of my dosbox confs is:

mount d /home/mike/DOS/EXPRESS/DATA -t cdrom

To mount image files that you may have, use the imgmount feature, which supports multiple images. I have a command similar to the following example in another of my dosbox confs:

imgmount d /home/mike/DOS/game/game.iso -t iso 

or (because -t iso or -t cdrom both work with disc images) you can use

imgmount d /home/mike/DOS/TIMES/Timeshock.cue -t cdrom

When you have composed all the entries you need for your conf (and set all the disks and folders to mount), the [autoexec] part of your conf may look this:

imgmount d /home/mike/DOS/game/game.iso -t cdrom
mount c /home/mike/DOS/game
c:
game.EXE

There is more relevant information in the dosbox manual and on the useful wiki.