QEMU/Guests/Windows 98 and QEMU/Installation: Difference between pages

From Computernewb Wiki
(Difference between pages)
Jump to navigation Jump to search
(idk how i managed to delete those on accident oops)
 
No edit summary
 
Line 1: Line 1:
[[QEMU]] can be installed in many ways. The most common method is installing an already compiled binary, since it is a much simpler method of installation when compared to compiling it from the source code.
{{DISPLAYTITLE:How to install Windows 98 in QEMU}}
'''[[How to install Windows 95 in QEMU|< Windows 95]]''' | '''[[How to install Windows Me in QEMU|Windows Me >]]'''
{{DISPLAYTITLE:How to install Windows 98 in QEMU}}
[[File:Windows98.png|thumb|right|alt=A screenshot of Windows 98 running in QEMU.|Windows 98 running in QEMU.]]
This page details how to install Windows 98 in QEMU. '''Windows 98''' is an operating system created by Microsoft released in June 1998. There is an updated version dubbed Windows 98 Second Edition, which fixes some bugs and adds new features. Support ended in July 2006.


==Linux==
We strongly recommend Windows 98 Second Edition as it fixes many bugs from FE and has more application support.
Pretty much every major Linux distributions has QEMU in their repositories. Below is a list of example commands for various popular operating systems.
==Prerequisites==
===Windows 98 QuickInstall===
Windows 98 without any patches is very, very unstable under QEMU, with bugs such as hanging on reboot, hanging on DOS prompt, hanging randomly, you get the picture. For this reason, we'll be using the [https://github.com/oerg866/win98-quickinstall Windows 98 QuickInstall Project] for this guide, which bundles multiple patches to greatly improve the stability under QEMU.


{| class="wikitable"
You can download it through one of the following options:
|-
* [https://github.com/oerg866/win98-quickinstall Build it yourself]
! Distribution
* [https://computernewb.com/isos/windows/win98qi_v0.9.3_stock.iso Download from Computernewb ISOs]
! Command
* [https://archive.org/details/win98qi_v0.9.3 Download from archive.org] (This link also has other ISOs that contain extra software and utilities. Pick whichever you want, it's your choice.)
|-
===SoftGPU===
| Arch Linux
We'll also be using the SoftGPU driver, to add 32-bit color and high-res support, and also to enable 3D acceleration. Grab the iso [https://github.com/JHRobotics/softgpu/releases/latest here].
| <code>pacman -S qemu</code>
==Starting up==
|-
===Installation===
| CentOS/Fedora
First, create a disk image for the VM using a command like the following.
| <code>dnf install -y qemu</code>
<pre>qemu-img create -f qcow2 win98.img 4G</pre>
|-
| Debian/Ubuntu
| <code>apt install -y qemu</code> (Ubuntu 14.04+)<br><code>apt-get install -y qemu</code> (Ubuntu 12.04-)
|-
| Gentoo
| <code>emerge -av app-emulation/qemu</code>
|-
| openSUSE
| <code>zypper install qemu</code>
|-
| Slackware
| <code>slpkg -s sbo qemu</code>
|-
|}


==Windows==
'''4G''' can be replaced with however big you want the hard drive to be (with G standing for Gigabytes). Windows 98 is a very old OS and does not take up a lot of space.
The best place to grab precompiled Windows binaries is on [https://qemu.weilnetz.de/ Weilnetz]'s page, which are officially linked to on QEMU's official website. The site contains builds of the latest QEMU for 32-bit and 64-bit versions of Windows, and is confirmed to be working and up to date.


Alternatively, there is [http://lassauge.free.fr/qemu/QEMU_on_Windows.html Lassauge's] page, but it requires Cygwin to be installed and only provides 64-bit builds.
When that's done, start up QEMU with a command like the following:


==macOS==
<pre>qemu-system-i386 -m 128M -hda win98.img -cdrom win98_iso_name.iso -device VGA,vgamem_mb=64 -cpu host -accel kvm -M pc-i440fx-2.0,hpet=off -netdev user,id=lan -device pcnet,netdev=lan -usb -device usb-tablet -localtime -monitor stdio</pre>
{| class="wikitable"
|-
! Distribution
! Command
|-
| Homebrew
| <code>brew install qemu</code>
|-
| MacPorts
| <code>port install qemu</code>
|}


The easiest way to get QEMU on macOS is by installing it with [https://brew.sh/ Homebrew], then by typing <code>brew install qemu</code>. It can also be installed through MacPorts.
The machine argument is set to pc-i440fx-2.0, this is to get around the PCI Bus bug that persists within QEMU, And the VGA,vgamem_mb=64 parameter allocates 64MB of VRAM onto the generic VGA adapter QEMU provides to allow higher resolutions and color depths within 98SE.


Alternatively, you can download 2.10.1 binaries from [http://www.mediafire.com/file/jvy54hdzjixzxbb/QEMU_2.10.1.zip this] page, which will work on 64-bit Macs and Mac OS 10.6 or higher. You can also download version 1.6.2 from [http://www.mediafire.com/file/5pk2j3a7d82app6/QEMU_1.6.2_Mac_OS_10.4_G5.zip here], which works on a PowerPC Mac. It requires Mac OS 10.4 or higher, and at least a PowerPC G5 CPU.
We set the memory to 128 MB, but it can run on as low as 8 MB of RAM, although this isn't recommended if you want to be running any programs.


==BSD==
Press any key except F8 to boot into the Windows 98 Quick Installer. The installation here is pretty self explanatory. If you used the "all" iso, you'll be prompted to select a Windows version. We recommend 98 SE. Proceed to format a single FAT32 partition taking up all of available space and mark it as bootable, make sure to write changes to the disk and exit. Once prompted to install integrated device drivers, select Yes and continue. By any circumstances do NOT select slow PnP detection as this will hinder the installation process, let it install and reboot.
{| class="wikitable"
|-
! Distribution
! Command
|-
| FreeBSD
| <code>pkg install qemu</code>
|-
| OpenBSD
| <code>pkg_add -i qemu</code>
|-
|}


QEMU can also be installed and compiled on most BSD-based operating systems.
At this point if all went well, Windows should reboot, install drivers, and load the desktop. If you get a bluescreen or protection error, refer to the troubleshooting section. If it all worked, keep reading
===Enabling DMA===
The first thing you'll want to do is enable DMA on your hard disk ASAP, as it is not enabled by default and this can cause major instabilities.
[[File:Win98dma.png|thumb|right|alt=A screenshot showing how to enable DMA|Enabling DMA]]
# Open Control Panel from the Start Menu
# Select "System" and switch to the Device Manager tab
# Expand "Disk Drives" and double click "QEMU Hard Disk"
# Switch to the "Settings" tab and tick "DMA"
# Reboot windows
===Display driver installation===
We will now install the SoftGPU driver to enable higher resolutions and 32-bit color support.
[[File:Softgpusetup.png|thumb|right|alt=A screenshot of the SoftGPU setup program|SoftGPU installation]]
[[File:98se32bitcolor.png|thumb|right|alt=A screenshot of enabling 32-bit color on Windows 98 SE|Enabling 32 bit color]]
# Switch to the SoftGPU ISO by running a command similar to the following in the QEMU console: <pre>change ide1-cd0 softgpu-&lt;version&gt;.iso</pre>
# If the installer does not run on it's own, double click the CD in My Computer
# The SoftGPU installer will now open. You can pretty much accept the defaults here, however you may want to consider selecting Mesa3D Gallium "Nine" instead of Wine(D3D) for DX8 and DX9 for improved performance at a slight potential stability cost.
# Click install. After a minute or two, you will be prompted to reboot. Click yes.
# Once windows reboots, right click the desktop, select properties, and switch to the "Settings" tab
# If all went well, you should now be able to switch the Colors to "True Color (32-bit)", and the resolution to 1024x768.


==Compiling from source==
You may encounter a bug where not all color modes are available, and attempting to increase to one that is or change the resolution does not properly apply. Refer to the troubleshooting section for how to fix this.
*[https://gitlab.com/qemu-project/qemu/-/blob/master/README.rst See this page for more information.]


===Finishing up===

Congratulations, you should now have a functioning Windows 98 install! Here is some recommended software to install:

* [https://winworldpc.com/download/48c2b151-2618-c39a-11c3-a4e284a2c3a5 Internet Explorer 6 SP1]
* [https://archive.org/download/10.63Opera1063IntSetup/10.63_opera_1063_int_setup.exe Opera 10.63]

==Troubleshooting==
===VXD or protection errors on first boot===

Upon rebooting from the quick installer into Windows 98, you may get a blue screen and error related to "VXD", or "Windows protection". This is usually caused by Windows 98 not being compatible with one or more features of your CPU. To solve this, change <pre>-cpu host</pre> in your QEMU startup command to <pre>-cpu core2duo</pre> and restart the installation. Windows should now install without issues

===Cannot change color depth or resolution after installing SoftGPU===

After installing SoftGPU, you may find that you are unable to change the color depth or resolution, with Windows prompting for reboot and then resetting back to 16 colors, 640x480 afterward. Additionally, you may notice that all color depths are not visible in the settings menu.

This is usually caused by Windows failing to install an adequate monitor driver. To solve this, you'll want to do the following:
[[File:98monitor.png|thumb|right|alt=A screenshot of switching the monitor driver on Windows 98|Installing the monitor driver]]
# Open Control Panel from the Start Menu and select System
# Switch to the Device Manager tab
# Expand "Monitors" and double click the monitor
# Switch to the "Driver" tab and select update driver.
# Select to show all drivers on the computer, and then all hardware.
# Select the "Standard Monitor Types" tab
# Install either the "Super VGA (any maximum resolution you'd like here)" or "Plug-and-Play Monitor" driver. Both have been reported to work for different people so if one doesn't, try the other
# Re-insert the SoftGPU CD if you removed it and reinstall SoftGPU. Agree when it asks to reboot
# You should now be able to use 32-bit color and higher resolutions

[[Category:Windows installation guides]]
[[Category:OS Installation guides]]
[[Category:Operating systems]]
[[Category:QEMU guides]]
[[Category:QEMU guides]]
[[Category:Tutorials]]

'''[[How to install Windows 95 in QEMU|< Windows 95]]''' | '''[[How to install Windows Me in QEMU|Windows Me >]]'''

Revision as of 03:17, 14 April 2024

QEMU can be installed in many ways. The most common method is installing an already compiled binary, since it is a much simpler method of installation when compared to compiling it from the source code.

Linux

Pretty much every major Linux distributions has QEMU in their repositories. Below is a list of example commands for various popular operating systems.

Distribution Command
Arch Linux pacman -S qemu
CentOS/Fedora dnf install -y qemu
Debian/Ubuntu apt install -y qemu (Ubuntu 14.04+)
apt-get install -y qemu (Ubuntu 12.04-)
Gentoo emerge -av app-emulation/qemu
openSUSE zypper install qemu
Slackware slpkg -s sbo qemu

Windows

The best place to grab precompiled Windows binaries is on Weilnetz's page, which are officially linked to on QEMU's official website. The site contains builds of the latest QEMU for 32-bit and 64-bit versions of Windows, and is confirmed to be working and up to date.

Alternatively, there is Lassauge's page, but it requires Cygwin to be installed and only provides 64-bit builds.

macOS

Distribution Command
Homebrew brew install qemu
MacPorts port install qemu

The easiest way to get QEMU on macOS is by installing it with Homebrew, then by typing brew install qemu. It can also be installed through MacPorts.

Alternatively, you can download 2.10.1 binaries from this page, which will work on 64-bit Macs and Mac OS 10.6 or higher. You can also download version 1.6.2 from here, which works on a PowerPC Mac. It requires Mac OS 10.4 or higher, and at least a PowerPC G5 CPU.

BSD

Distribution Command
FreeBSD pkg install qemu
OpenBSD pkg_add -i qemu

QEMU can also be installed and compiled on most BSD-based operating systems.

Compiling from source