How to install Windows 3.1 in QEMU

From Computernewb Wiki
Jump to navigation Jump to search

< Windows 1.x/2.x | Windows 95 >

The Windows 3.1 desktop.
The Windows 3.0 desktop.

Windows 3.1 is an operating system created by Microsoft, released in April 1992. There is its earlier version called Windows 3.0 and another version called Windows 3.0 with Multimedia Extensions. There is an updated version called Windows for Workgroups 3.11 which adds support for networking and there is a (very rare) updated version of Windows 3.1, simply named "Windows 3.11". This article covers both Windows 3.1 and Windows for Workgroups 3.11.

Running on CollabVM

Windows 3.1 depends on MS-DOS. You must install MS-DOS first before installing Windows 3.1.

There are no USB drivers for Windows 3.1, as USB did not exist at the time (releasing nearly 4 years after Windows 3.1's initial release), so a perfect mouse is unfortunately not possible.

There is a VMWare graphics adapter for Windows 3.1 floating around. For PCNet drivers, you can find them here.

386 Enhanced Mode for Windows 3.1 works in QEMU, but it's a little buggy. If it freezes up for you, use WIN /S to start it in standard mode.

For an MS-DOS installation guide, check out MS-DOS for tips.

Starting up

QEMU

Pre-installation

Make a qcow2 image (or a raw image if you want) by typing

qemu-img create -f qcow2 win31.img 150M

150M can be replaced with however big you want the hard drive to be (with M standing for Megabytes). Windows 3.1 is VERY compact (being released in the early 90s) and only requires around 8 MB of disk space. However, if you want your users to install/run any programs, we recommend at least 50 MB of space. Windows 3.1 requires at least MS-DOS 3.1, we recommend MS-DOS 6.22 for best performance however. You can also run 3.1 under FreeDOS, but a few things don't work properly when running under FreeDOS (mainly 386 enhanced mode).

When that's done, run the following command:

qemu-system-i386 -hda win31.img -fda (DOS Floppy Disk 1).img -boot ca -cpu pentium -m 16 -vga vmware -net nic,model=pcnet -net user -localtime

No KVM, MS-DOS works with KVM but Windows 3.1 freezes instantly, so we don't want it. This command does not require root privileges.

We need to install MS-DOS first, so you need to locate:

  • MS-DOS 6.22 installation floppies
  • Windows 3.1 installation floppies

You can find both of these at WinWorldPC or Kirsle.net. Install MS-DOS like you would on a normal computer (all you have to do is hit "enter" repeatedly). To change the floppy disks, press CTRL + ALT + 2 to switch to the QEMU console, and type "change floppy0 (DOS Floppy Disk 2).img" and so on. Press CTRL + ALT + 1 to switch back.

Once MS-DOS is installed we can begin installation of Windows 3.1. Change floppies the same way we did with MS-DOS. Follow the installation guide. If you have ever installed Windows 95, XP, or even Windows 10, it's basically the exact same thing, it's really simple.

Once Windows 3.1 has been successfully installed, you can install the drivers (guide is available here) and either install programs or quit.

You may want to add Windows 3.1 to start with MS-DOS. This is really simple. Exit Windows 3.1 (or use the MS-DOS Prompt), and type "edit C:\autoexec.bat". At the last line, type start C:\WINDOWS\WIN.COM and save the changes. Your VM will now start with Windows 3.1.

After installation

qemu-system-i386 -hda win31.img -boot ca -cpu pentium -m 16 -vga vmware -net nic,model=pcnet -net user -localtime

< Windows 1.x/2.x | Windows 95 >