Windows 98SE on Modern Hardware

DOS Qemu how to post updated, made proper networking working.

Some info about Win98 Phanom floppy driver problem, its also handy Win98 stuff, there is also some drive letter manipulation utility:
https://msfn.org/board/topic/114895-get-…e-floppy-drive/

Update:
I tested it worsk fine for Floppy:
dlmanip delete A
and it can hide Linux partition which is otherwise see as Windows unfortunated volume too… and it means that my data partition letter moved.
dlmanip delete D Parition in Win98 was listed as D.

So far i wasnt lucky with DOS, here i can see only first system C partition and even if try to hive Linux one, is can see second FAT32, but maybe it needs just more time, i tried same setting as for Windows 98, just ignore some partition.

Regarding of MSFN Win98 on modern HW thread:
https://msfn.org/board/topic/97588-moder…comment=1178049

This USB2 pci-e controller is working with Win98:
https://www.ebay.com/itm/USB-2-0-to-PCI-…lEAAOSwaBZZmNXa


Do NOT try passthrough for your first time in mobile computers, they’re a pain in the butt because the mobile GPUs do not have their own video outputs but routes them though the IGP, at least on Intel platforms. Currently some people managed to get them working using Looking Glass, which copies a virtual VRAM buffer from the guest into the host. But don’t ask me for help about that since I never used it. Oh, and nVidia mobile GPUs also have some additional checks like if there is a battery present, so you have to simulate one with custom ACPI code: https://www.reddit.com/r/VFIO/comments/e…cess_qemu_ovmf/


Here you have my former 490 KiB QEMU guide, which I don’t touch since 2016. Everything I can help you with, is already there. Note that Arch Linux changes very often and there are no guarantees that instructions works exactly as I wrote them 4 years ago, you need to simultaneously use the Arch Wiki to see if anything changed and common sense. Make a local copy and have fun: https://pastebin.com/dWC6nxrR

Two videocards system are not usuall, but for testing i will use desktop with IGPU, not notebook. Thanks, but this guide looks like awfull wall of text… This look better, its still lots of terminal porn… so no hassle free at all…
Basic KVM - no pass through: https://dennisnotes.com/note/20180614-ub…04-qemu-setup/
KVM with Pass-through: https://blog.zerosector.io/2018/07/28/kv…pu-passthrough/

I have created QEMu DOS machine Vogons thread, where are all problems listed… to free this thread of it, maybe over time there would be some solutions… and later
https://www.vogons.org/viewtopic.php?f=9&t=72087
if would have some more modern OSes running i can try maybe some VGA pass through to Dos too.

I started fiddling with Win7 Qemu machine (it should be easiest for start) on Linux, but some far, i nothing fancy… i only get angry to with its ugly wizards - gui is nice, but that to have some design standard and workflows… when i want to just create 1 machine, i dont want to mess with some pools.
I could created virtual disk image on NTFS volume (where i have free space), but i can start machine with it - because of some linux permission hell… i because of that, i could only cancel whole wizard, some all settings are lots, its annoying. I never had same problem with Vmware or Virtualbox even on Linux. - it tried sudo virt-manager … i have these partitions mounted for writing, i can make there folder through filemanager… even wizard is able to create there volume… but i have mess with EXT4 regardless.
And even after that im getting this… Because something Python script with poor exceptions handling.

2020-02-24 02.45.03-QemuHell.jpg



Yeah Linux is user friendly :frowning: until you want to do actually do something.

Update: Error is EFI related, when i install ovmf package and use its EFI its working.

To first tutorial i only add, if you need EFI machine, you need install this package too: qemu-efi

Im a bit confused how QEMU/ KVM on Linux graphics output is working… In "classic" virtualization tools i just define virtual vidoecard and start machine… and i get output windows as on real machine.
KVM seems to trying to make it complicated… i default machine is some display component and some Spice and VNC options, there they really needed to get machine output for VM without passthrough?

I tried to find some Win98 videocards pass through success stories… So far i did not find much.

1) https://www.youtube.com/watch?v=rgIF8uG-2G0&feature=emb_logo // BTW its using Unraid. Now i can compare Unraid and KVM (Virtmanager)… i can tell that after intial hassle that sacrifice whole hdd, start Unraid as main OS etc… its Unraid GUI actually more user friendly that virt-manager.
But to the video, what is proven that some Creative sound card pass through is working. But for videocard pass-through was used some Cirrus 5446 videocard and all is done through PCI-E to PCI adapter (good to know).
I dont understand whole Cirrus video card pass though point, because QEMU already emulation very similar Cirrus card and this one has not 3D acceleration at all and that is really main thing why even try such thing, for 2D and games as Diablo / Fallout etc… i can still stay with my Vmware Windows 98 machine.

2) I found some thread from one familiar guy:) Me. My memory really sucks, where i could be with at least average memory:) Again with Unraid, there is lots of bla, how i cant find working card and some other networking and sound issues…
https://msfn.org/board/topic/176548-unra…pu-passthrough/
But there is some important passage…


So its nice that its pass-through working, but this card is not really good, is too new and its working only with half broken unofficial drivers… I was with old Sandy / Ivy bridge machine, i that Wendel KVM video i heard something about that passthrough is working on Haswell+, but who knows, maybe Unraid is somehow enhanced.

Problems with that setup, which i had:



Some performance info:



Some import info (unraid - i can really say if MB chipset matters or not, vt-d is must have)…
- there is not really too much to set up in unraid… i connect devices to MB and after that i simply select device form Unraid combobox to add it to virtual machine… if device is not present is no go, if i get error during add the device no go… i can start machine with device no go… if device is not present in device manager - no go… if present and i can install drivers… and after that… i can test and its working - way to go.
Only other problem was that Unraid has not Win98 template only XP one, so in machine template was added some unwanted stuff and i had to edit xml manually sometimes, but nothing complex just remove some tags.

Working:
Cirrrus 5446 PCI - videocard
Geforce 7950 PCI-e - videocard
CT 5807 - ES1373 PCI - soundcard
USB Audio - some ebay - 2$ stuff i made it working - but link is now dead, i have quite few of them, so i dunno which one it was, but USB audio is standard so i guess that all USB soundcards will work…

No go cards:
ATI Mach 64 VT - PCI video card
Creative Audigy - sound card
SB !Live - sound card
3Com lan - 509 or 905 - i always had problem with these numbers to remember it correctly

Windows USB working devices (rLoew you can get better source):
The USB LAN Adapter is the Tenda TEL9901G.
The USB Sound Adapter is the Kingwin USB-3DSA.

3) Other sad story (Unraid too):
https://msfn.org/board/topic/177807-qemu…re-passthrough/

@ruthan

have you tried installing windows98 natively? or do you have a UEFI-only system with no CSM?

@infuscomus

I never saw system without CSM, i have enable it on all my systems. This info is above… its natively working at least on Z170, only problem is really that you need PCI slot for sound card, or mess USB one… and that some PCI-E slot is consumed by some old Win98 only videocard => lots of cables… Win98 NIC consumes slot too. Only bummer is really no Dos sound after B75 / X79… otherwise Win98 would be fine, someone made it running on Ryzen too.

KVM in theory can safe one audio card slot… networking is virtualized for sure… and you can simply beside Win98, had 1 (Linux is mandatory) or more full blown modern OSes running in parallel.

I thing that typical setup would be something like:
Linux + WIn 98 or Win XP Switching (you dont need probably both in parallel) + Win 7/10 for proper Windows gaming => at least 2/3 videocards… more probably 3 - because there is not good Win98 / WinXP card for gaming… or Win XP/ Win7 (Geforce 980 TI is not good enough for lastest games).
Because Win98 needs only 1 core and 512 MB of mem, its cheap. Win XP 32bit - need lets say 2 cores(HT) + 4 GB of RAM…with 8+HT core (16 threads) machine and 32GB its all it quite possible… You course you can everytime just shutdown some machine to gain more power…

I need this now for other QEMU PowerMac experiments… but it could be hassle with other QEMU virtual OS too.

If there is some QEMU expert its possible to burn cd with it at least create some iso output file? I found some SW, which need to create boot cd to use, but can only burning option, no iso creating etc… so you need somehow simulate cd /dvd burning with virtual machine… and insert some blank virtual cd… or pass through whole cd drive and hope that it will work.

@zir_blazer I have question, how to select in Linux primary GPU? Between ATI (x800) and Nvidia - 750Ti? I have ATI in 1st slot, so its used for booting and detect by Linux… I make move it to second slot because of Win98. In XP+ Windows im able on Windows level force Nvidia as primary, but i need the same on Linux.
When i google it - see lots of Intel/Nvidia or Intel/AMD for notebooks prime/ optimus stuff, but nothing for ATI. I wonder is blacklisting the right way and when i blacklist ATI, would it be possible to use it after in KVM, or there is other way?

Ok, i have ready Win7 x64 EFI QEMU KVM virtual for pass-through testing. If it would work i will later change fans on my GPU to uncover PCI slot on my Z170 MB, im messing with machine, which is primary my Nas… and try Win98 PCI pass-through. I installed Windows EFI, because i Wendell video was something about that is better and its future.


Otherwise if you can Vmware, even Virtualbox user whole QEMU setup is virtualization medival times… low level technology could be great… but interface and user workflows sucks, classical Linuxian way. Mouse is lagging in compassion with VNC, because all video output is done through Spice or VNC… There is nothing like easy one installer for all guests driver and additions, you have to pick them one by one - and names of folder and components arent too much hinting you… do you have to constantly google some detail. USB3 drivers arent included on virtio cd, or are really well hidden.
You can make everything working (except mouse lags - so far i dont find solution, its not smooth like in Vmware and in Virtualbox), but its annoying.

When i checked virtiol cd - where are drivers for Win XP to Win server 2019, but nothing for Windows 98, so its probably working all with original Windows 98 drivers, but or simply authors dont care. I have to find details about networking and sound emulation… windows 98 arent disk heavy etc…


You blacklist the Driver with a Linux Kernel parameter so that the Linux Kernel does not initialize the GPU. You may also need to deal with X.org configuration files.
Choosing primary Video Card is harder because the most effective way is to disable loading a Video Card Option ROM, but most Motherboards does not allow you to do that. Check this guy: https://forums.servethehome.com/index.ph…-plugged.27599/



You CAN have local video output with QEMU drawing to a SDL window instead of needing a remote VNC/SPICE. With standalone QEMU (Using its parameters instead of libvirt ugly XML format), use -display sdl as a QEMU parameter. Note that this is useless if you’re doing passthrough, where it is actually better to not have a display and instead rely on evdev passthrough.

VirtIO doesn’t include USB. QEMU can emulate a NEC XHCI USB Controller (-device nec-usb-xhci), works with standard Drivers. Note that it is a pain to use USB if you have multiple controllers, since you may not like QEMU using the first open port that it finds to plug something. You need to be very verbose to specify each Device onto a specific Controller. A complex setup looks like this:

-device nec-usb-xhci,id=xhci2
-device nec-usb-xhci,id=xhci3
-device usb-host,bus=xhci3.0,port=1,hostbus=2,hostport=1
-device usb-host,bus=xhci3.0,port=2,hostbus=2,hostport=2
-device usb-host,bus=xhci3.0,port=3,hostbus=2,hostport=3
-device usb-host,bus=xhci3.0,port=4,hostbus=2,hostport=4
-device usb-host,bus=xhci2.0,port=1,hostbus=2,hostport=5
-device usb-host,bus=xhci2.0,port=2,vendorid=0x2833,productid=0x0031

I managed to install Win 7 pass through iGPU, it has no exclamation mark, even after reboot, i connected monitor to it, but see only black screeen, when i switch to it… When i switch to it before is same picture as on my Nvidia, but when i start i got black screen… So its doing something.

I wonder if QXL virtual graphics installed and second real one too, which is primary, should i disable QXL? Linux still claims that is using Geforce as primary display adapter - at least Unigine Heaven benchmark giving me it in info and FPS are as for it should be, no intel HD slimmer. BTW i dunno if Linux only feature, but Anydesk remote desktop (i started using it as Teamviewer replacement for XP and Linu) is actually giving me even 3D stuff, where teamviewer usually not worked, that is nice.

[img]

Windows7-PassThrough.png

[/img]

I did just quick hack, added to Grub start boot line (intel_iommu=on ) and IOMMU enabling and in virt-manager i setup passthrough (this step is virt-manager gone very nicelly), before IOMMU parameter i got some error, that is not possible, what was expected.

I really have to solve space problem with primary Linux EXT4 only for virt manager, i found some info that in QEMU conf i should change user and group, but only go other permission error when i tried to execute machine with disk on NTFS partition. Solution should be some chown ( sudo chown root.kvm /dev/kvm;chmod 660 /dev/kvm
), but i got again with it error (chmod: changing permissions of ‘/dev/kvm’: Operation not permitted
) and i never was big friend of Linux permission porn.

I also ported my QEMu DOS machine to virtual manager, set SB16, but no sound so far, otherwise is working. Sound in Win7 machine is fine - i excepted some stuttering etc, but so far, its nice at least for normal desktop usage.

Other thing to solve and save time, how QEMu and snapshots is there some GUI manager to do that?



Ok, if make such XML edit can i still use machine with virtman? I tried just to switch from QXL to Vmvga, but when i run machine, i had no picture… in Virtman windows just black screen but machine ran, i can tell based on sounds. I dunno why libvirt has not SDL option, its some design thing, or just flaw?

Should that iGPU which im trying to pass through black listed, if yes, how to do it?



So too complex for me now… I just hoped that blacklist ATI gpu would be enough and i wanted to know its kernel name. lspci -v Giving me that magic name in last name of the block:
Kernel modules: Something.

Are you sure that just blacklist it, is not enough?

Ok, i at least solved that permission problem with images on other parition, problem was: Error starting domain: Cannot access storage file '/media/XXX
Solution, i sure that is not cleanest one: sudo chmod -R a+x /media/ruthan/Win7-64

Because i now have enough space, im trying to install Win98 machine without pass through.

I really can find any good virt-manager documentation, that is problems… unraid is really much more user friendly. For example which difference is between simulated i440fx and Q35 chipsets from QEMu point of view? I tried to google it and not got any good info…

Wen you create new QEMu machine, there are really 2 bad work flow traps:
1) When you selecting OS iso, down is checkbox detect in automatically, which i dunno if is really working for Win98 probably not… when you uncheck it, you can select anything from Windows 1.0 to Windows 10… I tried to find target OS info in virt-manager xml file, but i failed.
BTW when i tried to edit files, i didnt get any changes, i find out that have to restart machine, or restart whole virt manager by commands bellow and you cant do it with sudo… as i would excepted, because im used to make some system changes with it:
systemctl stop libvirtd
systemctl start libvirtd

2) Second is at the end of Wizzard (which is really short - install iso and target disk image / disk, mem + number of cpus, nothing else), here is another checkbox for edit machine settings after wizzard, where you can set lots of stuff as type of network card, sound card etc…

I wonder how cpu - topology settings is working… first time i set it to Pentium 3 and installation took lots of time, im installing it with default what is for my machine Skylake-Client-IBRS - i dunno what client-IBRS really means and its much faster. I suspect that if you select something else that kvm is no more active and that it means that all is emulated and much slower. I just thought that set Pentium 3 would be better for compatibility and that maximally i would be able to use new CPU istruction set, which is not really used for compilation of Win98 stuff anyway.

Regardless, when i installed it with P3 setting, i wasnt able to reach anything else that safe mode… otherwise i got just black screen with blinking cursor freeze and even that safemode took few minutes to make something from first blue screen… I just checked device manager, there werent really all devices, NIC or sound card was missing, Cirrus videocard was present.

I really have to learn how to use sdl or any other “real” not vnc/spice output, because it really mess with Win98 setup, which im used to.

virt-manager also is not able to remove USB 2 controller which is pointless for Win98 machine… and there is some Table input device, i dunno if for VNC or why, when i creating machine i can only add USB mouse, but after machine start, i magically got new mouse component in my machine, which before wasnt available… its a mess.

Now im trying Skylake install i will let you know.

Edit machine setting through info icon is so logical, Linux and UI design…

Regarding of Win7 passthrough i red that i could be EFI machine problem:
https://www.reddit.com/r/VFIO/comments/b…_graphics_to_a/

I will also finally add some addon videocard card to pass through but i have only PCI slot, so newest what i have in PCI is TNT2 M64 is probably no much Windows 7 fun… and i would have to install probably other machine now with XP to test.

Ok finaly added addon videocard to my NAS-backup, i find out that free slots is actually PCi-E and PCI are covered by other card and fan. So far can continue…

2020-02-29 01.42.33.jpg



I hope that you will appriete cable management… and pico PSU 200W will not explode… because this machine should really nas with some gaming possibilities, if there is emergency.