Last modified: Fri Aug 2 20:12:46 EDT 2019
Support for W98SE virtual machines (VMs) in current hypervisors is surprisingly weak.
VirtualBox ("vbox") has such complicated and invasive dependencies, including an out-of-tree kernel module, that attempting to get it working on Slackware looked hopeless. Instead I spun up Ubuntu 16.04 LTS (Xenial) in a spare partition and installed the binary package of VirtualBox 5.0.20 from Oracle's archive using apt-get.
Vbox supplies a template for Windows 98 VMs, albeit with the warning that only "limited testing has been performed." I made the following changes to the defaults:
The customized boot image that I had been using ever since it worked on Wildcat Point led to a lockup as soon as the CD driver was used. Replacing XMGR.SYS, UDVD2.SYS, and SHSUCDX.COM with the original 3 drivers HIMEM.SYS, OAKCDROM.SYS, and MSCDEX.EXE got rid of the lockup. I did not revert all the way back to the original boot image, which tries to load many other extraneous drivers.
The serious failures that occurred during installation show that vbox's emulation of vintage hardware has problems, but it is an order of magnitude better than QEMU, and the resulting VM was usable.
First, create the raw image file and put a partition table in it.
Then, generate a vmdk file as follows: VBoxManage
internalcommands createrawvmdk -filename W98SE.vmdk -rawdisk
W98SE.img
The resulting vmdk file (a small text file with fields that note things like disk geometry, UUID, and the path to the raw image) can then be added as an existing virtual hard disk in vbox.
This function is not properly documented. The VBox manual
does not indicate support for raw format disk image files. Even the
createrawvmdk
examples in the Advanced Storage
Section don't mention that it works with raw image files. Thanks to
Linux User #330250 for making me aware of a relevant answer on Stackoverflow.
QEMU integrates with KVM to provide hardware-assisted virtualization and emulates hardware of the appropriate vintage for running W98SE. Unfortunately, support for W98SE in QEMU and KVM have not been maintained, assuming that they ever worked at all.
Tested qemu-2.6.0 with kernel 4.5.0.
Build:
./configure --prefix=/usr/local/qemu-2.6.0 --audio-drv-list=alsa,sdl --enable-seccomp
Run:
QEMU_SHARED_OPTS="-enable-kvm -m 384M -sandbox on -machine pc -cpu pentium2 -display gtk -vga std -no-hpet -no-acpi -soundhw sb16,pcspk -drive index=0,file=rawhdd.img,format=raw,media=disk,readonly=off" export QEMU_AUDIO_DRV=alsa # Must first fix permissions on /dev/kvm qemu-system-i386 ${QEMU_SHARED_OPTS} -cdrom W98SE.iso -boot d
Despite KVM, installation ran much more slowly than it did with VirtualBox.
qemu-img create -f raw rawhdd.img 8G
Problems with resulting VM:
Warnings printed by QEMU included:
main-loop: WARNING: I/O thread spun for 1000 iterations sb16: warning: command 0xfa,0 is not truly understood yet sb16: warning: command 0xf,1 is not truly understood yet sb16: warning: command 0xe,2 is not truly understood yet sb16: warning: command 0xf9,1 is not truly understood yet
Differences when KVM is not enabled:
warning: TCG doesn't support requested feature: CPUID.01H:EDX.vme [bit 1]
.-boot
c
.DOSBox-X (henceforth dbx) got to a Windows desktop without all the flailing, but the resulting VM was still unusable.
Tested git sources cloned on 2016-06-04.
Build:
# x86 dynamic cpu core cannot be enabled for x86_64. ./configure --prefix=/usr/local/dbx --with-sdl-prefix=/usr/local/SDL \ CPPFLAGS="-I/usr/local/fluidsynth-1.1.6/include" \ CFLAGS="-O2" CXXFLAGS="-O2" \ LDFLAGS="-L/usr/local/fluidsynth-1.1.6/lib"
Run: dosbox-x -conf ~/tmp/dbx.conf
Here is dbx.conf. These settings were not
necessarily optimal; I found out afterward that the best available
documentation is the comments in the default config file that you get by
typing config -all -wcp /tmp/default.conf
at the Z: prompt.
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
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
mount -t vfat -o loop,uid=1000,gid=100,shortname=winnt,offset=32256 hdd.img /mnt
cp -a W98SE-current /mnt/WINCD
umount /mnt
E_Exit: DOS:Attempt to use DOS_GetMemory() when private area was unmapped by BOOT
Bugs, quirks, and limitations in the tested snapshot of dbx: