Setting up Bochs (win32 version) to run Windows 95 (updated 28 aug. 2001)

In this tutorial I will try to describe how to set up Windows 95 in the Windows version of the Bochs x86 emulator. There are many ways to install it but I describe one of them. You will need the Windows 95 install CD in order to fully use this tutorial. Also this was tested on a Windows 2000 machine, and in the current (1.2.1) version (when this was written) does not support physical CD-ROM or floppy access under Windows 9x/ME, so if you're using one of those systems you'll have to find another solution like making a diskimage of the CD (which isn't covered in this tutorial).

1. Download Bochs for Windows from bochs.sourceforge.net and unzip it. I also used the Rawwrite, which is often used to make bootdisks for linux installations. You can get the utils here. You will also need the Windows 95 cd.

2. Make a subdirectory (it doesn't have to be a subdir, it can probably be anywhere) in the bochs directory, for example "win95".

3. Making the images. Now you can use the program called bximage.exe to make a hard-drive image. The normal install of windows 95 is about 80Mb and you probably want some room for apps too.

The cyl, heads and sectors per track are important so you'd better write 'em down somewhere. When the image is ready, move the file to the subfolder.

Now for the bootdisk. You can use a physical bootdisk with bochs (easier), or you can use an image. You can use any bootdisk that boots into dos and loads the CD-ROM drivers, I used the win98 bootdisk, and it worked very good. If you are going to use a physical disk you can go to number 4 now. If you want to use a floppy disk image (for some odd reason), you can now use the rawwritewin.exe util that came in the dosutils zip file.

Put a bootdisk into the floppydrive, name the image (example: a.img) and push the "read" button. Move the created floppy image to the subfolder you created earlier.

4. Now for the bochsrc file. I have uploaded a zip file here, containing my bochsrc and a bat file that I'm going to talk about further on in this tutorial.

The bochsrc file have to be in the same subdir as the images. The version I included is a modified version of the bochsrc file for the small linux distro that came along in your bochs version. I haven't modified the file much so if you want to modify it yourself, the file bochsrc-sample.txt in your bochs directory is an excellent model.

You must change the "h:" in the line "cdromd: dev=\\.\h: , status=inserted" to the drive letter of your CD-ROM drive.

Then you have to change the cyl, heads and spt (sectors per track) values in the "diskc: file=c.img, cyl=xxx, heads=xx, spt=xx" line to the correct ones for your image (you wrote it down when you made the image, hopefully :-P ) and change the c.img if you named your hard-disk image otherwise.

Also, if you're going to boot from a floppyimage instead of a physical floppy, you should change the line: "floppya: 1_44=\\.\a:, status=inserted" to "floppya: 1_44=a.img, status=inserted" (if your floppyimage's name is a.img).

You should also put the file included in this file on a floppy and use rawwritewin to make it a floppyimage, put the image in the usual subdirectory. Edit the "b.img" in the line "#floppyb: 1_44=b.img, status=inserted" in the bochsrc file to the name of the image of the disk with the mouse.com on it, so that you get a second floppy drive inside the emulator (B:) from where you can load the mouse drivers.

5. Now you have to make (or take the one from the bochsrc.zip file) a bat file that points to the bochs.exe in your bochs directory. If you created a subdir, the file just need to loke like this: ..\bochs , place the bat file in the same subdir as the images and bochsrc file.

6. Make sure you have the win95 cd in the cd-rom drive and the bootdisk (if you're using a physical one) in the floppy drive and then run the bat file. If everything goes right you should be booted into DOS.

When you've successfully booted to dos, you could run fdisk to partition the HD-image and then format it using format c:

Now you just run setup.exe from the win95 cd and if everything goes right you should soon have a working windows 95 in the emulator.

When you have finished installing Win95, you could do the following changes to the bochsrc file:

- Put the #-sign in this row: "#floppyb: 1_44=b.img, status=inserted", because you will probably not need the mouse drivers anymore now.

- change "boot: a" to "boot: c", so it will boot straight to windows when you start the emulator.

Enjoy!!!

Any comments can be sent to me!

Stefan "MZGuy" Grönroos