Speed up your 90s iMac
Introduction
My 1998 iMac has been sitting in my basement with an old HDD. I know those don’t last long, so why was this one still working? So I eventually took action and replaced it with an SD card reader instead, which I boughtrecently (there will be a video about that too). So now all that’s left is to get Mac Os 9 installed on an SD Card, so the iMac can boot from there.
There are many ways of achieving this:
-
Creating a restore usb thumb drive and boot from there. Then install Mac Os 9. To do this you need admin credentials for the iMac which I don’t have. I purchased this from someone else and they forgot to give them to me.
-
Using an actual bootable CD. For this we need the CD drive to be working, and the one on my iMac is not. It’s pining for the fjords.
-
Last but not least, we could install Mac Os 9 and Os X straight into the SD card from a Virtual Machine (QEMU in this case). You need another Mac for this, or Linux (not sure if this works on Windows). This option is probably the fastest because of the speed advantages of more recent computers.
So I’ve decided to go for the third option, since I can’t even do the other two.
Note: you cannot install the Os by just mounting an ISO or DMG image from some drive and trying it that way. The installer won’t start, you will get a warning.
Another note: this configuration and installation process is no different than installing the system on an SSD. So if you have an IDE to SSD adapter, it will work too.
Before we begin
We’ll be installing Mac Os 9 on this SD card first. A fresh install. If we want both Mac Os X and 9 installed, we need to start with Mac Os 9. I will be doing this from my Macbook Pro M1 using QEMU, which is an Open Source Virtual Machine.
The Macbook Pro M1 already has an SD Card slot which is way faster than using USB 1.1 on the iMac, so that’s an advantage. Of course, one could use Firewire on the iMac, but in my case I don’t have any adapters for that.
Requirements
- A Macintosh computer (I’m running Sonoma) – you can probably do this on Linux too, although it might be way slower.
- Homebrew installed
- ISO images for Mac Os 9 and Mac Os 10.3 (Panther). Google is your friend.
Installing Homebrew (if you don’t have it installed already)
Homebrew is very easy to install, and recommended. Follow the instructions from the link below, it’s literally typing one terminal command.
Installing QEMU
Now we’ll use Homebrew to install QEMU.
brew install qemu
Just make sure everything got installed successfully before proceeding.
Make an image out of the SDCard
What we’re going to do now is to create an image out of the SD card with DD, and then we’ll attach that image as a drive on the QEMU command. After we finish installing everything on the image, we’ll clone the image back to the SD card with DD.
Why do this instead of attaching the physical SD Card? Well, mainly because I couldn’t make it work. QEMU is quite finicky with physical drives on Macs. However, if you found a way of getting it to work let me know.
The reason cloning with DD instead of just creating an image with QEMU, is because we want to make sure that we have the exact byte size copy of that SD card so as to not loose any space. Also, there’s some hidden partitions that we need to copy over. If I just create a 16 GB image with QEMU and then copy that to my 16gb SD card with DD I might mess up those partitions. One can cause some serious trouble with DD, so I would avoid science experiments on this step.
Note: if you’re using something large like an SSD with 512 gb of space, then this method might not be the fastest. The DD cloning process will take a while.
So lets format the SDCard on the MacBook Pro running Sonoma. Open up Disk Utility and format the physical card using Mac Os Journal and an Apple Partition Mac (APM). Make sure you select APM because by default it’ll be GUID. Disk Utility still allows us to use that old partitioning system on Sonoma and older systems, which is good news since Mac Os 9 won’t see GUID partitions at all. And when I say at all, I mean it. You won’t be able to re-format the card (which will be an image in our case) on Panther or Mac Os 9.
Lets fire up the terminal and then run:
diskutil list
This will help you figure out which is the correct drive number for your SD card. In my case it was /dev/disk4. diskutil list looks like this for me:
/dev/disk4 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *16.0 GB disk4
1: Apple_partition_map 32.3 KB disk4s1
2: Apple_HFS MacOs9_HDD 15.9 GB disk4s3
So lets make an image out of that drive. Run:
sudo dd if=/dev/disk6 of=MacOs9_SD_Card.img bs=1m
This takes a bit. It copies the whole SD Card bit by bit. If it’s a larger SD card it can take a while.
After the image is done do:
chmod 666 MacOs9_SD_Card.img
Because otherwise QEMU won’t be able to load it due to the .img file permissions. If you want to keep it clean, you can change the owner also, because it will probably be root. Use this chown command to set ownership to your user:
chown <user> MacOs9_SD_Card.img
Where <user> is your user name as it’s displayed on the terminal for other files you own.
Installing Mac Os 9
Next run this to boot the QEMU emulator with the SD Card and the CD drive.
qemu-system-ppc -L pc-bios -boot d -cpu "G3" -M mac99,via=pmu -accel tcg,tb-size=64 -m 512 -drive file=MacOs9_SD_Card.img,format=raw,if=ide -cdrom /Users/Shared/Mac_OS9.2.1_Original_Copy.iso
The CD drive has a Mac_OS9.2.1_Original_Copy.iso attached (D drive). Note the Boot command which is telling QEMU to do this from the D drive. We will also attach our MacOs9_SD_Card.img as the main drive (C drive).
The G3 command is absolutely useful. If you don’t have that to throttle the CPU frequency, the mouse will become impossible to use on Mac Os 9. Trust me on this.
Once everything booted, if the drive (MacOs9_SD_Card.img) hasn’t mounted, open Drive Setup before starting the installer. It should be in the Utilities folder. You will have to format the drive again, for some forsaken reason. But at least you will be able to see the partition on Drive Setup. Not sure why this happens, but at least Mac Os 9 can see it. If you’ve formatted the drive using a GUID partition you will probably not see the drive on Mac Os 9.
Now launch the Mac Os 9 installer. Follow all the installation steps. Once it’s done, shut Mac Os 9 down.
At this point we have to switch the bootable drive to c. This way we’ll run the final setup for Mac Os 9.
qemu-system-ppc -L pc-bios -boot c -cpu "G3" -M mac99,via=pmu -accel tcg,tb-size=64 -m 512 -drive file=MacOs9_SD_Card.img,format=raw,if=ide -cdrom /Users/Shared/Mac_OS9.2.1_Original_Copy.iso
Go through the final setup steps. After that is done shut down again.
Installing Mac Os X
To install Mac Os X we will need to replace the Mac Os 9 CD image with the first Panther ISO. We also need to swith the boot drive to d, which is the CD drive.
Run the following command:
qemu-system-ppc -L pc-bios -boot d -cpu "G3" -M mac99,via=pmu -accel tcg,tb-size=64 -m 512 -drive file=MacOs9_SD_Card.img,format=raw,if=ide -cdrom /Users/Shared/Mac_OS_X_Install_Disc_1.iso
The installer should launch automatically, follow the steps. The first disk doesn’t take long.
After that is done, the installer will ask you to restart. Click on the restart button, but we’re going to interrupt this. Close the QEMU window, you will get asked to confirm this. Go back to the terminal and switch the Panther Install Disk to Disk_2.
qemu-system-ppc -L pc-bios -boot c -cpu "G3" -M mac99,via=pmu -accel tcg,tb-size=64 -m 512 -drive file=MacOs9_SD_Card.img,format=raw,if=ide -cdrom /Users/Shared/Mac_OS_X_Install_Disc_2.iso
We’ve switched the drive to drive c once again. This is because we will boot from the main drive, not the CD drive. The Os will boot from the SD card image and will automatically load the second install disk. This install step will take longer, but once you’re done with disk 2 you can shutdown Os X. At this point the SD card will be ready.
Note: Disk 3 doesn’t seem to be needed. It probably contains some extras.
It’s now time to clone the SD Card image back to the physical SD Card. Run the sloooow dd command below. I had to unmount the physical SD card first. The r in front of disk is deliberate (eg: of=/dev/rdisk4). It stands for RAW:
sudo dd if=MacOs.raw of=/dev/rdisk4 bs=4M status=progress
All set! Now pull the SD Card from your modern Mac and insert it into your iMac’s SD Card Reader and test it. It should run great, but let me know in the comments if you found any issues.