VOGONS

Common searches


First post, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

It is quite possible to install and use MS-DOS/PC-DOS/DR-DOS within DOSBox. This can be useful for checking software compatibility or getting install programs to work that do not with the built-in DOS in DOSBox. In this guide I will outline the steps in getting it to work. But first, let me start with the limitations :

1. The original DOSes only work with floppy and hard disk images. DOS within DOSBox will NOT work with CD-ROM images. The reason for this is the lack of ATAPI emulation, so no CD-ROM driver will load.

2. This will not assist you in getting hardware features to work that are not emulated in DOSBox, such as BASIC-in-ROM, floppy disk based copy protection, etc.

3. All the items taken for granted in native DOSBox, such as the mouse driver, auto configurations, must be replicated by the user within the disk images.

4. If the DOS you are trying to install is an OEM model, it may fail if it looks for a particular system signature in the BIOS. Tandy DOS may work if machine=tandy.

So, how do you do it? Well, let me give an example using MS-DOS 5.0, among the most popular DOSes of all time.

1. First we prepare a hard drive image. Bochs contains a program called bximage, which can create a bootable hard drive image up to 504MB in size. HAL9000's most recent DOSBox Megabuild has a program called imgmake that will allow you to create a bootable hard drive image up to 2GB. Typically you should not need more than 504MB. The default geometry of a 504MB disk image is 1024 cylinders, 16 heads, 63 sectors, 512 bytes per sector.

Run bximage and input a hard disk size anywhere from 10-504MB. Users of DOS prior to 4.0 should not use a hard drive size greater than 32MB unless you want to attempt to use multiple partitions on the disk image. Make sure the image is "flat" and write down the disk geometry, which will be important later. Name the resulting image file using the 8.3 format limitations, making sure to use the .img extension.

2. Obtain a complete set of floppy install disks for MS-DOS 5.0. Usually, MS-DOS 5.0 was released on 3x720KB or 6x360KB floppies. The first disk is bootable. Make sure their file names are in the 8.3 format and they use the img. extension. There is no difference between .ima and .img files, but DOSBox will only use its BOOT command with the latter.

3. Input these commands into your dosbox.conf file :
imgmount 2 [insert path and file name of hard disk image] -t hdd -fs none -size 512,63,16,1024
boot [insert path and file name of floppy disk images]

Make sure they are the only commands that are active! If you are using the 720KB MS-DOS installation disks, use file names like msdos13.img msdos23.img msdos33.img and put all of them after the boot.

4. Start DOSBox, and if everything went correctly, you will get to the install program. Follow the prompts, they are pretty self-explanatory. Switch disks with Ctrl + F4 when prompted. When the install program finishes, quit DOSBox by closing its window.

5. Change the above lines in your dosbox.conf to the following :

imgmount c [insert path and file name of hard disk image] -t hdd -fs fat -size 512,63,16,1024
mount d [insert path of directory to which you can to copy files from/to the hard drive image]
boot [insert path and file name of hard disk image] -l c

Your hard drive image will now boot to DOS and you can do useful things with it. You will need to mount a directory or images to copy files to/from the disk image.

6. Now you need to tame DOS. You have access to EDIT, so edit Autoexec.bat and Config.sys to suit your preferences. You should copy a mouse driver, since MS-DOS does not have one. Use Cutemouse's v1.91 for good results. You can also add SET SOUND and SET BLASTER variables for Sound Blaster support and copy over an appropriate CT-VOICE.DRV. You can install the Gravis Ultrasound drivers, Windows 3.x, etc.

EMM386.EXE is a bit tricky. With such a basic configuration, you should not need it for UMBs, but for Expanded Memory you will need it. Use the following line : DEVICE=C:\DOS\EMM386.EXE 4096 M5

You can REM the line out if you do not need it. Without the M switch, EMM386 will not be able to set the page frame and will not provide EMS memory.

7. To install programs and games from a floppy disk, you will need to a bootable floppy disk image. Unfortunately, this is a bit tricky when you boot off a hard disk image in DOSBox, as it will not recognize imgmount floppies. Make a copy of the original install disk, BOOT it, exit out of the install program, and edit the autoexec.bat and config.sys files to match your hard drive versions.

8. One you have a good boot disk, you can install whatever programs you like using these commands :

imgmount c [insert path and file name of hard disk image] -t hdd -fs fat -size 512,63,16,1024
boot [insert path and file name of bootable floppy disk image] disk1.img disk2.img . . . diskx.img

Use Ctrl + F4 to switch disks as the install program requests. This will allow you to install programs on floppy disk images to your hard drive that would not be installable in vanilla DOSBox.

Last edited by Great Hierophant on 2013-10-25, 20:28. Edited 1 time in total.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 1 of 17, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Good guide, small spell correction, step 8, you mean "Once" not one.

The old hard disk image guide also mentions a good windows program that allows one to put files on an image without having to use dosbox. Might be worth to mention if that program still exists. On a quick read over I didn't see it mention here but I'm tired and might have missed it 😉

Edit: I meant Disk Explorer from that guide Sample usage of a harddisc image in DOSBOX (worth mentioning, that you need to have the disk image partitioned and formatted before you can copy files to it 😀)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox

Reply 2 of 17, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

The image creation and mounting process is a pain for most users. (Mostly because they refuse to read)

A while back I created standard images for download here for 9x:
Windows 9x DOSBox Guide (Not officially supported)

Probably best to include a .txt file with mount parameters along with the .img with each .zip.

http://www.osforensics.com/tools/mount-disk-images.html
and
http://www.ltr-data.se/opencode.html/
Should be able to mount .img files.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 3 of 17, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Make sure their file names are in the 8.3 format and they use the img. extension. There is no difference between .ima and .img files, but DOSBox will only use its BOOT command with the latter.

AFAICT, DOSBox does not have such limitations on image filenames.

Reply 4 of 17, by Bass

User metadata
Rank Newbie
Rank
Newbie

Dear everyone,

I work for an archive in Berlin/Germany and in our stock are a lot of BackUps from the 80ies, amoung them many of DOS-BackUps (RESTORE/FASTBACK).
We use DOSBOX sometimes as a virtual machine to run the old systems in original enviroment.
It works all well how Great Hierophant above described, but obviously not for IBM DOS 3.2. I have a BackUp here from some IBM DOS System from 1988 which was running on IBM DOS 3.2. If I install that DOS-version, DOSBOX refuses to boot completly from HDD-Image, but to boot from the image from the bootable IBM DOS 3.2 floppy image (A:\ drive) works. All other DOS-versions I tried work fine.
Problem number two, you may help me, is, that I can only mount two HDD images at once (drive number 2 and 3, C: and D:, hda and hdb), but the original System, which I try to run, used three HDDs...

Do someone know, why IBM DOS 3.2 don't boot from HDD and can help us to fix that problem?
Is it possible to add a HDD number 3 (hdc)? Have you the possibility to increase the max number of mounted HDD images?

Greetz,
Bass

Reply 5 of 17, by _Rob

User metadata
Rank Member
Rank
Member

@Bass

I don't know what the problem is, but as a test I tried booting a disk image of PC-DOS 3.2 in vanilla DOSBox 0.74-3 and it worked fine as you mentioned.

Screenshot from 2020-03-10 13-34-42.png
Filename
Screenshot from 2020-03-10 13-34-42.png
File size
17.68 KiB
Views
1782 views
File license
Public domain

Perhaps you should provide some more details as to what is going wrong. Also any debug messages.

I did notice that a HDD image made for a newer DOS version was seen as a non-DOS partition with PC-DOS 3.2, and PC-DOS 3.2 FDISK does not give an option to delete a non-dos partition.

I was able to delete the old partition with DEBUG (http://www.after10.net/Debug.html) and then create a new partition with FDISK, after which dosbox restarted and quit. After that I could not IMGMOUNT the HDD any longer. Getting an error "Can't create drive from file."

I also tried it with DOSBox ECE and DOSBox-X and the result was the same.

Reply 6 of 17, by _Rob

User metadata
Rank Member
Rank
Member

Ok, I was wrong. I was able to create the hdd image with dosbox-x's imgmake command and mount it.

IMGMAKE hdd.img -t hd -size 20 -nofs
IMGMOUNT 2 hdd.img -t hdd -size 512,32,2,640 -fs none

You will notice the "2" instead of "c", this is necessary to mount it on the second device (hda), specifying "C" will not work.

Then you can boot the dos disk, and run fdisk to create a partition.

BOOT Disk01.img
fdisk

fdisk will cause a reboot and you need to do the above IMGMOUNT and BOOT commands a second time. After this you can format c: and copy the dos files.

format c: /s
mkdir c:\dos
copy *.* c:\dos

Restarting dosbox, I could now boot directly the HDD image without the diskette image.

IMGMOUNT c hdd.img -size 512,32,2,640
BOOT -l c

All of the above commands will work exactly the same in vanilla DOSBox or DOSBox ECE, with exception of the IMGMAKE command which is unique to DOSBox-X. But you could always use 'dd' on Linux to create an image file yourself.
dd if=/dev/zero of=hdd.img bs=1024 count=20480
will create an equivalent 20MB file, identical to that created with IMGMAKE with the -nofs flag.

Reply 7 of 17, by xcomcmdr

User metadata
Rank Member
Rank
Member
_Rob wrote on 2020-03-10, 12:36:
@Bass […]
Show full quote

@Bass

I don't know what the problem is, but as a test I tried booting a disk image of PC-DOS 3.2 in vanilla DOSBox 0.74-3 and it worked fine as you mentioned.

Screenshot from 2020-03-10 13-34-42.png

Perhaps you should provide some more details as to what is going wrong. Also any debug messages.

I did notice that a HDD image made for a newer DOS version was seen as a non-DOS partition with PC-DOS 3.2, and PC-DOS 3.2 FDISK does not give an option to delete a non-dos partition.

I was able to delete the old partition with DEBUG (http://www.after10.net/Debug.html) and then create a new partition with FDISK, after which dosbox restarted and quit. After that I could not IMGMOUNT the HDD any longer. Getting an error "Can't create drive from file."

I also tried it with DOSBox ECE and DOSBox-X and the result was the same.

DOSBox is for games, you might want to try the PCem emulator or VirtualBox instead.

Reply 8 of 17, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
DosFreak wrote on 2012-03-22, 18:04:

The image creation and mounting process is a pain for most users. (Mostly because they refuse to read)

I couldn't agree more.
Unless one is prepared to step into the uncharted territory of running Win9x in DOSBox to play legacy Direct3D games which is totally unsupported by DOSBox devs, it is really pointless of booting another DOS inside DOSBox. I was under the impression that image booting was meant for booter games, but somehow it has a nice side-effect.

Personally, I find DOSBox internal DOS good enough and the folder structure makes life easy for moving files to and from DOSBox rather than dealing with disk images.

Reply 9 of 17, by _Rob

User metadata
Rank Member
Rank
Member
xcomcmdr wrote on 2020-03-10, 20:19:
_Rob wrote on 2020-03-10, 12:36:
@Bass […]
Show full quote

@Bass

I don't know what the problem is, but as a test I tried booting a disk image of PC-DOS 3.2 in vanilla DOSBox 0.74-3 and it worked fine as you mentioned.

Screenshot from 2020-03-10 13-34-42.png

Perhaps you should provide some more details as to what is going wrong. Also any debug messages.

I did notice that a HDD image made for a newer DOS version was seen as a non-DOS partition with PC-DOS 3.2, and PC-DOS 3.2 FDISK does not give an option to delete a non-dos partition.

I was able to delete the old partition with DEBUG (http://www.after10.net/Debug.html) and then create a new partition with FDISK, after which dosbox restarted and quit. After that I could not IMGMOUNT the HDD any longer. Getting an error "Can't create drive from file."

I also tried it with DOSBox ECE and DOSBox-X and the result was the same.

DOSBox is for games, you might want to try the PCem emulator or VirtualBox instead.

Pfff.. In this last attempt I was using DOSBox-X which has other goals then vanilla DOSBox, including running demos and Win9x. And then I looped back and compared how it differed from vanilla DOSBox and DOSBox ECE. Besides I was not actually running anything other than PC-DOS. No real applications in any case.

Reply 10 of 17, by _Rob

User metadata
Rank Member
Rank
Member
kjliew wrote on 2020-03-10, 21:33:
I couldn't agree more. Unless one is prepared to step into the uncharted territory of running Win9x in DOSBox to play legacy Di […]
Show full quote
DosFreak wrote on 2012-03-22, 18:04:

The image creation and mounting process is a pain for most users. (Mostly because they refuse to read)

I couldn't agree more.
Unless one is prepared to step into the uncharted territory of running Win9x in DOSBox to play legacy Direct3D games which is totally unsupported by DOSBox devs, it is really pointless of booting another DOS inside DOSBox. I was under the impression that image booting was meant for booter games, but somehow it has a nice side-effect.

Personally, I find DOSBox internal DOS good enough and the folder structure makes life easy for moving files to and from DOSBox rather than dealing with disk images.

DOSBox-X has a command to create HDD or FDD images (IMGMAKE), and will by default even automatically partition and format them (unless you specify -nofs), which is very useful. But while powerful, for the typical user it is still not at the level of an image creation wizard as you get with something like VMware. Also because you can only run IMGMAKE when your on the DOSBox command prompt, not when your in the middle of a game and it suddenly wants a disk to save its savegame to...

But I agree, while it is interesting that you can run old DOS versions in DOSBox this way, I don't see much point to it. The internal DOSBox commands are typically enough to get the job done and support (to a limited extend) auto-complete which is great. The only issue I have with vanilla DOSBox in this regards is that the supplied commands are a bit too limited. Adding a few extra commands like 'more' and 'xcopy' to the z: drive would really make it easier to use (like DOSBox-X has done), as I have run into a few game installers that needed them. Instead for vanilla DOSBox I grabbed a few executables from FreeDOS and added them to my C drive.

And speaking of Win9x, that works surprisingly well with DOSBox-X.

Reply 11 of 17, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
_Rob wrote on 2020-03-10, 23:05:

The only issue I have with vanilla DOSBox in this regards is that the supplied commands are a bit too limited. Adding a few extra commands like 'more' and 'xcopy' to the z: drive would really make it easier to use (like DOSBox-X has done), as I have run into a few game installers that needed them. Instead for vanilla DOSBox I grabbed a few executables from FreeDOS and added them to my C drive.

You can just create a DOS folder, extract and copy the extra commands from Win98SE ISO to the folder and path it. Fake the DOS version if any of them complained about incorrect DOS version. But what's the point? The beauty of DOSBox mounted folder structure gives you the freedom of doing anything outside of DOSBox while DOSBox is still running. You simply need to flush the disk cache using "RESCAN" and it's DONE.

_Rob wrote on 2020-03-10, 23:05:

And speaking of Win9x, that works surprisingly well with DOSBox-X.

Without 64-bit dynamic_x86, you must be joking. Just stick to the DOSBox SVN.

Reply 12 of 17, by _Rob

User metadata
Rank Member
Rank
Member
kjliew wrote on 2020-03-10, 23:52:
_Rob wrote on 2020-03-10, 23:05:

The only issue I have with vanilla DOSBox in this regards is that the supplied commands are a bit too limited. Adding a few extra commands like 'more' and 'xcopy' to the z: drive would really make it easier to use (like DOSBox-X has done), as I have run into a few game installers that needed them. Instead for vanilla DOSBox I grabbed a few executables from FreeDOS and added them to my C drive.

You can just create a DOS folder, extract and copy the extra commands from Win98SE ISO to the folder and path it. Fake the DOS version if any of them complained about incorrect DOS version. But what's the point? The beauty of DOSBox mounted folder structure gives you the freedom of doing anything outside of DOSBox while DOSBox is still running. You simply need to flush the disk cache using "RESCAN" and it's DONE.

I use the executables from FreeDOS exactly because I don't have to set a version to get them to run. And I know, and do manage files outside of DOSBox. I don't want MORE and XCOPY because I need to run them myself, but because some DOS installers, such as those for Ultima, rely on them. And since I like to setup a per-game mount I need to ensure I add those commands where necessary which is a little inconvenient.

Reply 13 of 17, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
_Rob wrote on 2020-03-10, 23:05:

And speaking of Win9x, that works surprisingly well with DOSBox-X.

It works just as well with SVN (which is to say, far from perfect) if you set the cputype to pentium_slow. Most page fault crashes are caused by programs trying to grow their stacks which requires proper usermode page access checking to be active instead of the cheap shortcut used for "auto" cputype.

Reply 14 of 17, by _Rob

User metadata
Rank Member
Rank
Member
jmarsh wrote on 2020-03-11, 08:15:
_Rob wrote on 2020-03-10, 23:05:

And speaking of Win9x, that works surprisingly well with DOSBox-X.

It works just as well with SVN (which is to say, far from perfect) if you set the cputype to pentium_slow. Most page fault crashes are caused by programs trying to grow their stacks which requires proper usermode page access checking to be active instead of the cheap shortcut used for "auto" cputype.

Thanks, did not know that. May give SVN a whirl at some point to compare.

Reply 15 of 17, by Bass

User metadata
Rank Newbie
Rank
Newbie

Thx @ all

Because of the easy-use architecture and the sandbox design we always used DOSBox. Throw it on any system with a manipulated config of your choice and an endless varity of emulations can run.
So, we'll try your tips and in case it won't work, I'll write again. Thanks anyway!!

Reply 16 of 17, by Bass

User metadata
Rank Newbie
Rank
Newbie

@_Rob:
I tried to send you a private message, but the board prohibits it.
I did everything like you did, and as I wrote, it works perfect with all DOS-Distributions besides IBM-DOS 3.2
Dunno, no matter, what I do, it stops during the boot process.
It's always written: Booting from drive C
with blinking cursor but nothing happens.. Bah...
Maybe we can somehow exchange mail address or somethin?

Best regards,
bAss