Install Windows 98 On Qemu Mac Install

Last modified: Fri Aug 2 20:12:46 EDT 2019

Support for W98SE virtual machines (VMs) in current hypervisors issurprisingly weak.

If you are going to install Windows 95, Windows 98 or Windows Me, Novell Netware, Windows NT 3.1/3.5/3.51/4.0 or even setup a dual boot OS/2 VM it's best to start here. First MS-DOS 5.0 & 6.0 (6.1/6.2/6.22) are the 'best' versions to load as they can support a hard disk up to 2GB in size.

VirtualBox
QEMU/KVM
DOSBox-X

VirtualBox

VirtualBox ('vbox') has suchcomplicated and invasive dependencies, including an out-of-tree kernelmodule, that attempting to get it working on Slackware looked hopeless. Instead I spun up Ubuntu 16.04 LTS (Xenial) in a spare partition andinstalled the binary package of VirtualBox 5.0.20 from Oracle's archive usingapt-get.

Vbox supplies a template for Windows 98 VMs, albeit with the warning thatonly 'limited testing has been performed.' I made the following changesto the defaults:

Use Oracle VirtualBox and create a virtual machine using a Windows 98 iso file. Installing Windows 98 bare-metal on a MacBook is not supported because Windows 98 expects legacy BIOS support which was phased out since 2015. Qemu can be installed on Windows and macOS. I understand that Qemu has support for KVM and TCG (which is not hardware assisted virtualization). So, if I install Qemu on macOS and Windows, will it use TCG? I suppose Windows and macOS have their own virtualization extensions on the kernel, just live KVM.

  • Increased memory size to 384 MB.
  • Increased HDD size to 8 GB.
  • Enabled I/O APIC.
  • Disabled network.
  • Disabled USB. (N.B., serial ports were already disabled.)
  • Changed boot order (once the HDD was bootable).
Install Windows 98 On Qemu Mac InstallWindows

The customized boot image that I had been using ever since it worked on Wildcat Point led to a lockup as soon as theCD driver was used. Replacing XMGR.SYS, UDVD2.SYS, and SHSUCDX.COM withthe original 3 drivers HIMEM.SYS, OAKCDROM.SYS, and MSCDEX.EXE got rid of thelockup. I did not revert all the way back to the original boot image,which tries to load many other extraneous drivers.

Windows On Qemu

Qemu
  • Booted the install CD, allowed setup to fdisk and format to its preference.
  • On the second reboot it locked up with a black screen. I killed and restarted vbox, and it proceeded.
  • On the third reboot it gave a blue screen of death, but I hit a key and it continued.
  • Then it had a random failure, trouble copying some file. I clicked OK and it continued.
  • The desktop appeared and sound was working.
  • The CPU idle patch was not needed.
  • Installed IO.SYS from kb311561.
  • Installed VBEMP 9xUniversal VESA/VBE Video Display Driver, restarted, and changed desktopto 800×600 32bpp.
  • Installed 269601usa8.exe = the WDM audio update from kb242937.
  • The resulting VM boots and shuts down cleanly. Hardware-assisted virtualization is allegedly 'active.' Performance is good.
Install

The serious failures that occurred during installation show that vbox'semulation of vintage hardware has problems, but it is an order of magnitudebetter than QEMU, and the resulting VM was usable.

Hidden support for raw image files

First, create the raw image file and put a partition table in it.

Then, generate a vmdk file as follows: VBoxManageinternalcommands createrawvmdk -filename W98SE.vmdk -rawdiskW98SE.img

The resulting vmdk file (a small text file with fields that note thingslike disk geometry, UUID, and the path to the raw image) can then be added asan existing virtual hard disk in vbox.

This function is not properly documented. The VBox manualdoes not indicate support for raw format disk image files. Even thecreaterawvmdk examples in the Advanced StorageSection don't mention that it works with raw image files. Thanks toLinux User #330250 for making me aware of a relevant answer on Stackoverflow.

QEMU/KVM

QEMU integrates with KVM to providehardware-assisted virtualization and emulates hardware of the appropriatevintage for running W98SE. Unfortunately, support for W98SE in QEMU andKVM have not been maintained, assuming that they ever worked at all.

Tested qemu-2.6.0 with kernel 4.5.0.

Install Mac Os On Qemu

Build:

Run:

Despite KVM, installation ran much more slowly than it did withVirtualBox.

  • qemu-img create -f raw rawhdd.img 8G
  • Booted the install CD, allowed setup to fdisk and format to its preference. UDVD2 said 'BAD controller at ...' but it wasn't a showstopper.
  • Every attempt to boot from the HDD locked up with a black screen. After restarting, the startup menu with safe mode or step-by-step confirmation would come up. Choosing step-by-step confirmation and then accepting all of the default responses (hitting Enter a lot) somehow enabled it to proceed.
  • At one point it blue screened and locked up. Restarted, kept trying, it proceeded.
  • After lots of fighting I made it to the desktop. Sound was working,but looping and breaking up with high CPU load.
  • The CPU idle patch was not needed.
  • Installed IO.SYS from kb311561.
  • Installed VBEMP 9xUniversal VESA/VBE Video Display Driver, restarted, and changed desktopto 800×600 32bpp.
  • Installed 269601usa8.exe = the WDM audio update from kb242937.

Problems with resulting VM:

  • The display now enters a trashed state whenever I try to open a DOS box or run a batch file.
  • Windows no longer shuts down cleanly. Scandisk runs after everyboot, followed by the black screen of death and having to restart instep-by-step mode.
  • Softsynths cause such a high CPU load that everything else in the VMfreezes. Only one of them was able to function without the soundskipping and breaking up.
  • General flakiness, lockups, random boot failures.

Warnings printed by QEMU included:

Differences when KVM is not enabled:

  • QEMU prints an additional warning: TCG doesn't support requested feature: CPUID.01H:EDX.vme [bit 1].
  • Sooner or later it stubbornly locks up at the CD-ROM startup menu. To make progress, change the command-line option to -bootc.
  • More than once it locks up at the W98SE splash screen. Kill andrestart QEMU.
  • When arriving at the desktop, it locks up every time unless and untilthe SB16 device is removed.
  • On the good side, every boot does not need to go step-by-step.

DOSBox-X

DOSBox-X(henceforth dbx) got to a Windows desktop without all the flailing, but theresulting VM was still unusable.

Tested git sources cloned on 2016-06-04.

Build:

Run: dosbox-x -conf ~/tmp/dbx.conf

Here is dbx.conf. These settings were notnecessarily optimal; I found out afterward that the best availabledocumentation is the comments in the default config file that you get bytyping config -all -wcp /tmp/default.conf at the Z: prompt.

Qemu

The hotkey to release the mouse grab is Ctrl-F10.

  • dd if=/dev/zero of=hdd.img bs=1G count=8
    8589934592 bytes (8.6 GB) copied
  • It refused to boot from the CD image, so I did fdisk and format /s c: from a boot floppy image.
    imgmount 0 'W98SE-cleaner.img' -t floppy -fs none
    imgmount 2 'hdd.img' -t hdd -fs none -size 512,63,16,16644 -ide 1m
    boot -l a
  • Mounted the HDD image and copied the contents of a W98SE install CD to a directory, WINCD.
    mount -t vfat -o loop,uid=1000,gid=100,shortname=winnt,offset=32256 hdd.img /mnt
    cp -a W98SE-current /mnt/WINCD
    umount /mnt
  • Changed dbx.conf to remove the boot floppy and boot C instead.
  • Ran dbx, cd into WINCD, and ran setup.exe. It took a long time and dbx logged lots of errors to console.
  • At the first reboot dbx crashed with this:
    E_Exit: DOS:Attempt to use DOS_GetMemory() when private area was unmapped by BOOT
    Restarted dbx and continued.
  • Made it to the desktop. Sound was working, and a driver for the3dfx Voodoo was already installed. Turned up the volume and changed thevideo settings to 800×600 32bpp.
  • Installed CPU idle driver AMNHLT (amnhltm.zip).
  • Installed IO.SYS from kb311561.
  • Installed 269601usa8.exe = the WDM audio update from kb242937.
  • Attempted to install two softsynths. Each one caused the VM to become unbootable.

Bugs, quirks, and limitations in the tested snapshot of dbx:

  • OpenGL is broken. No scaling, no fullscreen. Blah.
  • With machine=svga_s3 it actually emulates a 3dfx Voodoo.
  • Dynamic core is not available in x86_64, and the emulation is very slow.
  • With cycles=max, the window title bar shows cycles=3000, but it's actually max.
  • There's no hint telling how to release the mouse grab (Ctrl-F10).

KB
Home