VOGONS

Common searches


Guide - Windows 95 on DOSBox 0.74

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by dada

User metadata
Rank Member
Rank
Member

btKYp.png

This guide is for those who want to get Windows 95 working on DOSBox but don't want to go through the trouble of looking up all the scattered pieces of information that need to be known. It took me a bit of fiddling around, but it turns out it's actually quite easy.

Attn: this guide has been moved to Google Docs. Further updates will be added there only.

The old guide is shown below, but it could be outdated by the time you read this.

Old guide wrote:
You just can't do it while in DOSBox's own DOS shell--you need to boot up from pure DOS. […]
Show full quote

You just can't do it while in DOSBox's own DOS shell--you need to boot up from pure DOS.

Let me know if you want anything elaborated; I kind of wrote this in a hurry since I've got a ton of other work to get done today and should really be getting started 😀

1. Get a boot disk
First off, get an MS-DOS boot disk. You'll need a .img file. I myself used 622C.IMG from Bootdisk.com.

I don't know exactly which versions of MS-DOS will work, but I suppose 7 should be fine too. I've read that you can cheat Windows into accepting a different version by using set ver 6.0, but I can't confirm this myself since if you use 6.22 you'll never run into this problem.

Make sure this file is in your DOSBox directory.

2. Make a hard disk image
You can do this using the bximage program that comes with Bochs. HAL9000's Megabuild contains a built in command for creating these from within DOSBox. (Would be awesome if that could be merged with the main branch.)

Making an image using bximage is extremely straightforward. There's a section on using it on the DOSBox wiki too.

All you really need to remember when using bximage is the cylinder count, since everything else is standardized and shouldn't be changed. In my example I'm making a 400 MB image which has 812 cylinders. Only flat images are supported (as of this time of editing). Sparse images will not be recognized. However, it's possible to still compress flat files using your host OS's filesystem; in Windows XP, this is the default behavior (hence the blue filename).

Copy this file (let's call it c.img) to your DOSBox directory.

3. Mount and format your new hard disk image
So now we have a hard disk image that we're going to be installing Windows 95 on. The problem is it doesn't have a filesystem yet. This is where our boot disk first comes in.

Start up DOSBox and type the following:

imgmount 2 c.img -size 512,63,16,812 -t hdd -fs none

Note: you may need to replace c.img with the name you gave your image file, and replace 812 with the cylinder count you used when creating the file using bximage. It should say Drive number 2 mounted as c.img. You might notice that we're not giving it a drive letter: basically, every drive needs to have a filesystem, which is a sort of file index, before it can be used properly. Without a filesystem (like FAT32, NTFS, HFS+, etc.) a filesystem is just empty, unorganized space that the operating system can recognize but can't really do anything with, so until we fix this problem we can't mount it under C or any other drive letter yet. Modifying filesystems on a drive is called partitioning.

Now type the following:

boot 622c.img

DOSBox will now boot up from the MS-DOS boot disk.

The first thing we'll do is use fdisk to create a filesystem. Run fdisk, choose option 1 (Create DOS partition or Logical DOS Drive), then option 1 (Create Primary DOS Partition). When asked if you want the new partition to comprise the whole hard disk, choose Y. A system restart will be prompted. Press enter; DOSBox will quit.

Now that we have our newly partitioned drive, we need to format it to effectively bring it to a completely empty and consistent state so that we can start putting files on it. To do so, we need to restart DOSBox and boot back into MS-DOS. This time, however, we'll mount our drive differently:

imgmount c c.img

At this point, DOSBox should say "Drive C is mounted as c.img". If something is wrong, start this step over. Don't attempt to access the C drive from DOSBox's own DOS shell or you might make it unreadable for pure DOS. Now boot into MS-DOS by using the same command as last time:

boot 622c.img

When you enter the DOS prompt, format your new C drive by typing:

format c:

Note: if at this point DOSBox is incorrectly reporting the size of your hard disk, that may be due to either a DOSBox bug or a problem with MS-DOS. I don't know exactly which one, but I've found that hard disk images with a size of over 512 MB (or a cylinder count of over 1000?) tend to be problematic. They'll work, but you'll only be able to use a portion.

4. Copy over setup files and start Windows 95 installation
At this point you should have your Windows 95 disc ready. The version should not matter all that much; I'm using a Dutch OEM version myself, the same one I got with my first Pentium computer about 17 years ago.

It doesn't really matter if it's an image or not. The trick here is to copy the installation files over to your newly formatted hard disk and then perform the install from there. (If you don't have an image already, consider making one anyway. Discs degrade over time and will become unreadable, especially if it's already a home made copy to begin with.)

The easiest way to do this (to my knowledge, anyway) is to mount the c.img file in your operating system. qbix mentioned that mount -o loop dos622.img /mnt should do it on Linux. I'm on Mac OS X myself and can mount it by double clicking on the image file in the Finder. On Windows, I'm not entirely sure if this is possible, but a program like Isobuster should work too. Dominus recommends using DiskExplorer which is free. Make sure you close DOSBox before you move the files.

All you need to do is move over the entire WIN95 directory (the one containing all the CAB files) from the CD to your mounted and now formatted image. It should be only about 34 MB in size. Unmount c.img and restart DOSBox. We'll now start the installation.

Mount c.img like we did the last time and boot 622c.img.

To start the installation, type the following:

c:
cd win95
setup /is

(The /is flag will prevent Scandisk from running, which is unnecessary.)

Note: if the mouse is not working at this point, exit setup and run mouse.com from the A: drive.

Windows 95 will now begin installation. To have Windows start up automatically when starting DOSBox, you could edit your config to contain the following under [autoexec]:

[autoexec]
imgmount c c.img
boot c.img

In a little while, Windows 95 will be installed. If you find that DOSBox isn't running anymore after a while, that's because Windows setup prompted a restart. Simply restart DOSBox and reboot into your c.img (if you haven't already added the above lines to your [autoexec]).

5. Caveats and finishing up
Note that the best way to run Windows 95 under DOSBox is with machine=svga_s3, core=normal and cputype=pentium_slow. I'm actually not sure about core=normal being the best choice (qbix mentioned that the dynamic core is probably as safe to use as the normal core), but it's the oldest and most tested.

In the past, core=simple was used to run Windows 95, but these days it does more harm than good. The simple core emulates less instructions and causes visual glitches today.

It's possible to get internet working using HAL9000's NE2000 passthrough patch, but it requires compiling your own version or using his Megabuild. I'll update this guide later when I get that working.

On Mac OS X, make sure you don't set the screen bit depth to anything over 8-bit (256 colors). 16-bit and 32-bit are broken and causes visual glitches. I've also found that it's MUCH faster in full-screen mode when using the opengl output system.

Hardware detection should work just fine, so don't worry about DOSBox locking up.

6. Thanks!
... to qbix, Dominus, h-a-l-9000 and the rest of the IRC gang for helping me get this working. Visit #dosbox @ irc.freenode.net. 😀 Post here if you're having trouble so I can add fixes to the guide.

TODO

  • Get internet working
  • Get CD-ROM drive working (is this possible?)
  • Find out how to easily move win95 dir to disk image on Windows host operating system
Last edited by dada on 2012-09-10, 14:24. Edited 8 times in total.

Reply 1 of 123, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Nice guide, someone please move it to the guides forum 😀
A good utility for Windows, even though it is quite old, is the Disk Explorer, mentioned in this guide Sample usage of a harddisc image in DOSBOX

CD-Rom is not possible, the code for that is not there 😀

Reply 2 of 123, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

Nice guide, someone please move it to the guides forum 😀
A good utility for Windows, even though it is quite old, is the Disk Explorer, mentioned in this guide Sample usage of a harddisc image in DOSBOX

CD-Rom is not possible, the code for that is not there 😀

Could somebody implement the code? 😁

Reply 3 of 123, by Svenne

User metadata
Rank Member
Rank
Member

Nice guide, but I can't get MS-DOS to detect the image file. I'm using a MS-DOS 7.1 boot floppy. The image file is on 500 mb and 1015 cylinders.

Intel C2D 2.8 GHz @ 3.0 GHz | ASUS P5KPL | ASUS GTS250 1 GB | 4GB DDR2-800 | 500 GB SATA | Win 7 Pro/Ubuntu 9.10

Reply 4 of 123, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
mr_bigmouth_502 wrote:
Dominus wrote:

Nice guide, someone please move it to the guides forum 😀
A good utility for Windows, even though it is quite old, is the Disk Explorer, mentioned in this guide Sample usage of a harddisc image in DOSBOX

CD-Rom is not possible, the code for that is not there 😀

Could somebody implement the code? 😁

we got better things to do.

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 123, by dada

User metadata
Rank Member
Rank
Member
Svenne wrote:

Nice guide, but I can't get MS-DOS to detect the image file. I'm using a MS-DOS 7.1 boot floppy. The image file is on 500 mb and 1015 cylinders.

What kind of error message are you getting? Does the image mount successfully under the DOSBox prompt but then fail to show up in fdisk (actually, causing fdisk to say "no fixed disks present")?

EDIT: well, this is strange. I just tried doing this myself a couple of times with a 500 MB image of 1015 cylinders, but apparently I can't get fdisk to recognize disk images that were set to "sparse" or "growing". The "flat" image type works consistently, which is strange considering I do believe my own install is on a sparse image.

Anybody know what might cause this?

Reply 6 of 123, by Svenne

User metadata
Rank Member
Rank
Member

Thank you 😀
I'll try to create a flat image instead, and hopefully that will work.
EDIT: Works great, thank you. However, I have no idea on how to copy files. I tried ISO Buster wich you reffered to in your guide, but for some reason it couldn't copy/move files.

Last edited by Svenne on 2010-05-31, 12:07. Edited 1 time in total.

Intel C2D 2.8 GHz @ 3.0 GHz | ASUS P5KPL | ASUS GTS250 1 GB | 4GB DDR2-800 | 500 GB SATA | Win 7 Pro/Ubuntu 9.10

Reply 7 of 123, by dada

User metadata
Rank Member
Rank
Member
Svenne wrote:

Thank you 😀
I'll try to create a flat image instead, and hopefully that will work.

It's still strange, since I would think that a sparse image *should* work. Maybe I was wrong and I made a flat image too without realizing it while writing the guide.

Hopefully using a flat image will solve your problem, if it does I'll update the guide.

Reply 8 of 123, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I *was* wondering about the sparse image working for you, btw 😀
I'd stay on the save side and change the guide to using a flat image.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 10 of 123, by dada

User metadata
Rank Member
Rank
Member

Modified the topic to

Only flat images are supported (as of this time of editing). Sparse images will not be recognized. However, it's possible to still compress flat files using your host OS's filesystem; in Windows XP, this is the default behavior (hence the blue filename).

Will make some other edits when I get off work.

Reply 11 of 123, by Yushatak

User metadata
Rank Member
Rank
Member

I am getting a wonky error trying to follow this guide when trying to mount the image, specifically.

I have a 512MB image - 1040 cyl. I try using the line:

imgmount 2 c c.img -size 523,63,16,1040 -fs none

It returns "The image must be on a host or local drive."

I have also tried imgmount 3, imgmount 2 c x:\c.img (where x: is the dosbox directory where c.img is located mounted in dosbox), imgmount 2 c c:\dosbox\c.img, and every other logical combination I can think of.

I am using that special build w/ glide, NE2000, and etc. support by one of the members here.. not the MBL, the other - his name escapes me but starts with a "G".

Reply 12 of 123, by dada

User metadata
Rank Member
Rank
Member
Yushatak wrote:
I am getting a wonky error trying to follow this guide when trying to mount the image, specifically. […]
Show full quote

I am getting a wonky error trying to follow this guide when trying to mount the image, specifically.

I have a 512MB image - 1040 cyl. I try using the line:

imgmount 2 c c.img -size 523,63,16,1040 -fs none

It returns "The image must be on a host or local drive."

I have also tried imgmount 3, imgmount 2 c x:\c.img (where x: is the dosbox directory where c.img is located mounted in dosbox), imgmount 2 c c:\dosbox\c.img, and every other logical combination I can think of.

First of all, your bytes per sector in that command is set to 523, it should be 512. Also, when mounting the image the first time, you're not supposed to specify a drive letter but a device type instead (hence the 2; the c in your command shouldn't be there, it should only be used later after partitioning). You also need to make sure you add the -t hdd part.

Try this: imgmount 2 c.img -size 512,63,16,1040 -t hdd -fs none

Reply 13 of 123, by Yushatak

User metadata
Rank Member
Rank
Member

Ah, I have had -t hdd in there, I just removed it during one of the last couple tries and forgot to put it in the post here. As for the 512 - that was a nasty typo, glad you caught that.

I will try omitting C and see if that helps.

Edit: Yeah that works - thanks.. been a long time since I messed with HDD images in DOSBox.

Reply 15 of 123, by Shouker

User metadata
Rank Newbie
Rank
Newbie

Hi
I run windows 95B under dosbox 0.74
With machine=svga_s3 the display of icons is completely messed up for 256 colors, 16 bits and 32 bits colors.
I tried somes other s3 drivers but I didn't found something working properly
It is working for someone with svga_s3 ?

Reply 16 of 123, by Svenne

User metadata
Rank Member
Rank
Member

I think DOSBox emulates an S3 864. You could also try H-A-L 9000's megabuild.
Anyway, how to I copy files to the virtual HDD? I tried ISOBuster, but it didn't work.

Intel C2D 2.8 GHz @ 3.0 GHz | ASUS P5KPL | ASUS GTS250 1 GB | 4GB DDR2-800 | 500 GB SATA | Win 7 Pro/Ubuntu 9.10