How to install Windows 95 in QEMU
Windows 95 is an operating system created by Microsoft, released in August 1995. Support ended on December 2001.
Running on CollabVM
The Windows 9x series has a slight problem running on QEMU out of the box, and that is the mouse. The mouse will be off position from the host mouse. This is due to Windows 95 having no USB support at all. However, special USB 1.1 drivers are known to exist for Windows 95B, so if you can find drivers for USB 1.1, then the mouse will function smoothly.
QEMU also has some problems running Windows 95 itself - it tends to be glitchy at times and sometimes BSODs or crashes, but this happens rarely and its not unusable.
Also, due to the old age of Windows 95 (it was released in 1995Windows 98 instead since it is able to run KernelEx, which is capable of running a few modern programs.
), practically no modern programs will run on it. It is recommended to runInstallation
Prerequisites
You're going to need the following: Any copy of Windows 95 preferably on an CD.
Download the patcher9x boot floppy. this will be required to patch Windows 95 to allow booting under KVM and also resolve other potential issues you might run across. Get any Windows 95 boot floppy as well, preferably the one for OSR2. If your Win95 CD is bootable, use it instead.
The following drivers:
- any GD5446 Windows 95 driver for the Cirrus PCI VGA emulated on QEMU in case the copy of 95 you are installing doesn't have it. The ISA version
isa-cirrus-vga
doesn't function properly and shouldn't be used. - the BMIDE95 driver for the IDE disk controller so you can enable DMA for faster disk access (something you will seriously need)
Make a qcow2 image (or a raw image if you want) by typing
qemu-img create -f qcow2 win95.img 700M
700M can be replaced with however big you want the hard drive to be (with M standing for Megabytes). Windows 95 is not a space hog or resource intensive, being such an old OS - you can even make the disk space as low as 70MB (for a compact installation) but this is not recommended. Windows 95 RTM does not support hard drives more than 2 GB due to it only supporting FAT16 partitions by default. This can be circumvented using the OnTrack Disk Manager although it is just recommended to install OSR2 as it will make your experience much easier and less tedious.
When that's done, run the following command:
qemu-system-i386 -hda win95.img -cdrom win95_iso_name.iso -fda patcher9x<ver>.ima -boot a -accel kvm -device cirrus-vga,vgamem_mb=16 -net nic,model=pcnet -net user -rtc base=localtime
You may adjust this if needed, Windows 95 is very picky on your configuration and may outright become sentient and refuse to boot.
It begins...
When you boot into the patcher9x boot floppy, select the first option you see on the boot entry screen and you will be thrown into an FreeDOS prompt which you should be familiar with if you've used DOS before.
Now to try to make it somewhat convenient, the installation process is split into 3 parts, it's an very involved setup procedure as Windows 95 is not stable and very painful to work with but once you get it running properly it's not too bad.
Part 1: Patching Windows 95 itself first
- Run
fdisk
and create an partition, on the first screen that prompts you whenever you want FAT32 support or not, if you're installing OSR2 hit Y, if you're installing RTM hit N. Reboot after you're done. Format the drive withformat C:
. - Go to your newly created C:\ drive and create any folder you may wish on it where you are going to store the contents of the WIN95 folder from the Win95 installation CD. This is required to be done so the files can be patched using patcher9x. This guide assumes you have created an folder on the root of the C:\ drive called
95cd
. - Go into your newly created folder then copy the contents over using
copy D:\win95\*.* .
. It might take an while to copy so be patient. - After it's done copying, navigate back to the A: drive and run the following utility called patch9x. If you run it without any parameters the program will ask you to enter the path to an existing Windows installation or an path to the Windows installation files. Proceed to write the full path to the folder with the contents with the WIN95 folder contents copied from the CD. Then in the next step select the 4th option which will unpack all of the CAB files and patch any files if needed. This can be automated by just running
patch9x -auto C:\95cd
.
Part 2: Actually installing Windows 95
Now that you've patched the Windows 95 installation files, you need to boot into the original Windows 95 boot disk in order to actually install Windows itself due to various compatibility problems which won't be listed here for the time being.
- When you have entered the Windows 95 boot disk and everything has loaded, run
lock C:
to unlock direct access to the drive. This is required as otherwise Windows 95 will fail to install. - Navigate to the C:\ drive and the folder where your Windows 95 installation files reside and then run
setup /is
to skip ScanDisk and begin installing straight away. - Proceed to install it normally, if it prompts you to automatically detect any devices such as Sound devices or Networking adapters, do NOT tick anything and just hit Next.
- Then after the installation is finally done, open the QEMU Monitor with Ctrl-Alt-2 and first eject the floppy with
eject floppy0
then runboot_set c
to set the first primary boot device to be the Hard disk. - Reboot.
After you've booted into the Desktop, congratulations you have made it through the first painful step of Installing Windows 95! But unfortunately, you're far from done.
Part 3: Driver hell
The PCI Bus bug will strike again so to resolve it, navigate to the device manager and change the driver for the "Plug and Play BIOS" to the "PCI Bus", reboot and then let it finish installing any devices that are left.
Installing the Cirrus GD5446 Video Driver:
- Insert CD or Floppy with the driver inside.
- Navigate to the Device Manager and select Change Driver.
- Select Have Disk then click Browse, navigate to the folder where the drivers reside in. Hit OK then Reboot.
Enabling DMA:
- Insert CD or Floppy with the BMIDE95 driver inside.
- Navigate to the BMIDE95 directory and run the Setup.exe Utility. Proceed to install as normal then Reboot.
- Open the Device Manager, Expand Disk Drives then double click "GENERIC IDE DISK TYPE95".
- Switch to the Settings tab and tick "DMA".
- Reboot.
Caveats
SoftGPU doesn't function in any form, whenever if it's with KVM or without KVM, MMX optimized or SSE3 optimized binaries. Trying to use the Graphics APIs causes an instant BSOD and hangs the machine.
On OSR2, the system might not boot with the GD5446 and instead present an black screen with an blinking cursor. To get around this, on the final part of the first graphical part of the installation where your full configuration is shown before copying files, select the Standard VGA adapter instead of "Cirrus Logic" option on the Display Adapter section.
The emulated GD5446 on Windows 95 suffers from severe graphical artifacting on 256 colors. More notably half of the GUI doesn't render properly.
Running the Japanese version of Windows 95 RTM returns an memory related message which you cannot see due to some unknown bug thus requiring you to hit an key in order to continue booting.
TODO: document every single other issue