QEMU/Guests/Mac OS 9: Difference between revisions

no edit summary
No edit summary
No edit summary
This article will describe in detail how to install Mac OS 9.2 with mouse drivers, sound, networking, and graphics. This tutorial should work with Mac OS 9.0 and 9.1 (which needs an additional flag; more details below).
 
==Prerequisites==
==Before you start==
===QEMU===
Versions of Mac OS prior to 10.4 (Tiger) did not run on x86 hardware. Instead, it used a PowerPC CPU. Because of this, it's not possible to run this OS with KVM, so we'll need to use pure software emulation, which may be a little slow but shouldn't be agonizing if you're on a newer PC.
You need [[QEMU]] installed, specifically the PowerPC version since old Macs used PowerPC instead of x86. On Arch you can install it with <code>pacman -S qemu-system-ppc</code> and on Debian/Ubuntu you can install it with <code>apt install qemu-system-ppc</code>. The Windows version should come with it already installed.
 
===Mac OS 9.2.1 CD===
You canwill grabneed a Mac OS 9.2.1 ISOCD. You can either use a physical disc or download one from [https://winworldpc.com/product/mac-os-9/92 WinWorldPC].
 
==InstallationStarting up==
===Pre-installationInstallation===
As always, the first thing we want to do is create the hard disk image by opening the Terminal or Command Prompt and typing this:
 
<pre>qemu-img create -f qcow2 macos9.img 2G</pre>
 
'''2G''' can be replaced with however big you want the hard drive to be (with G standing for Gigabytes). Mac OS 9 is a very old OS and thus does not take up a lot of space. [[How to create a disk image in QEMU|See this page for more information on how this command works.]]
 
When that's done, we can start up QEMU with the following command:
You should see an output like this:
 
[[File:MacOS Img Created.png|700px]]
 
Now we're ready to go.
 
===Starting up===
Now, we'll start QEMU like this:
<pre>qemu-system-ppc -M mac99 -m 512 -hda macos9.img -cdrom /path/to/macos-9-cd.iso -netdev user,id=mynet -device sungem,netdev=mynet -device usb-mouse -device usb-kbd -boot d</pre>
 
This sets the machine type to "mac99" (basically a G4 Mac). You can also set it to <code>-M g3beige</code> which is a Power Mac G3. We also add a USB mouse and keyboard for far smoother input.
A breakdown of this command: <code>qemu-system-ppc</code> is the name of the QEMU emulator, of course. <code>-M mac99</code> tells it to emulate a "Mac99" model (which is a G4 Mac). QEMU also supports a Beige PowerMac G3. You can type <code>-M ?</code> for a full list. <code>-m 512</code> adds 512 MB of RAM to the machine. The system becomes really unstable with more than 1 GB of RAM so I recommend setting this to about 896 MB (the maximum supported by Mac OS 9) at most. <code>-hda macos9.img</code> is the hard drive. <code>-cdrom /path/to/macos-9-cd.iso</code> adds a CDrom drive, which needs to be changed to point to the Mac OS ISO. <code>-netdev user,id=mynet</code> adds a virtual "user" network and sets up some network configuration. It'll also attach to your host's LAN. <code>-device sungem,netdev=mynet</code> adds a virtual NIC (in this case, a SunGEM network card) and assigns it to the virtual network specified before. <code>-device usb-mouse</code> and <code>-device usb-kbd</code> add a USB mouse and keyboard which will allow for much better input (especially if you are hosting this on [[CollabVM]]). And finally, <code>-boot d</code> tells the machine to boot from the CD-ROM drive.
 
We set the RAM to 512 MB, though you can run it with as little as 40 MB and as high as 768 MB. The OS starts becoming severely unstable if more than a GB of RAM is given.
If you are installing Mac OS 9.0 or 9.1, you will also need to add <code>-cpu G3</code> to the flags for it to work.
 
If you are installing Mac OS 9.0 or 9.1, you will'll also need to add <code>-cpu G3</code> to the flags for it to work.
 
===Installation===
With all that done, we are now ready to start.
 
When you start QEMU, you should see a yellow screen with some details like this: