|
Running
68k MacOS on x86 Linux
Preface If you have Linux on Intel/AMD hardware, you may need to run MacOS as well. I will not ask why do you want this (using some Mac-only software, transferring old data, nostalgia, etc.) but rather guide how to do it most efficient way. Please note that if you have PowerPC Linux on Apple hardware you should use MacOnLinux instead, which allows to run MacOS 8/9 at nearly native speed. There are several Mac emulators available on x86 hardware, but one really stands out - it is Basilisk II, written by Christian Bauer. Basilisk II emulates 68k CPU series (68000 - Mac Plus, Classic; 68020 - LC; 68030 - LC III; 68040 - LC475, Centris, Quadra). Thus, you may run MacOS 6.x, 7.x, and 8.1. By the way, Basilisk II ports are also available on Windows, FreeBSD, Amiga, BeOS, and other flavors of UNIX. Basilisk II Installation You can build Basilisk II yourself from source code, or just use pre-built RPM from your Linux distro. I have chosen the second way, SuSE Linux 7.3 (the first Linux I used to run Basilisk II) was supplied with Basilisk II version 0.9. After installing RPM you need to acquire ROM of Macintosh you want to emulate (use GetROM utility for this). To start Basilisk II, load sheep_net kernel module ("insmod sheep_net" as root) and then run "BasiliskII" command from terminal. You can start Basilisk II as root, but I would recommend against this. Better to run Basilisk II as different user ("kdesu -c BasiliskII -u your-user-name"). Basilisk II will present a setup dialog where you should 1) create disk image for MacOS data; 2) select Mac ROM image file; 3) adjust other options like memory usage, screen resolution, Ethernet device, etc. Basilisk II can use either your existing net device (e.g. eth0) either Ethertap device (virtual net interface). In first case Basilisk II will behave just like another computer connected directly to your existing Ethernet card (in this case it needs to be configured like the real workstation). However, it will not be able to use a dial-up connection available on your Linux box. Basilisk II documentation clearly outlines advantages and drawbacks of each method. Disk image (Basilisk II will format it as HFS volume) may be of any size allowed by HFS, but for System 7.5 minimal size is around 100 MB. Of course, you can have several disk images. Notes:
MacOS Installation The simplest way to install MacOS under Basilisk II is to install it from the CD. You can install any MacOS version (depend upon Mac ROM used) till MacOS 8.1 (the last version which supported 68k Macs). Also, there is no problem to install one version of MacOS on the first disk image, boot from it, and then install another MacOS incarnation on the second disk image. For example, I didn't had MacOS 7.5.5 CD, but I had MacOS 8 CD and MacOS 7.5.3 install and 7.5.5 update as archives. Installation notes:
The rest of installation and MacOS configuration process is not different from real Mac. After successful installation on main disk image create another one (100 MB or so), copy System Folder and disk tools (e.g. Norton Disk Doctor) there, and use it as rescue disk. Basilisk II is not free from bugs and artifacts, so HFS volume corruption may happen anytime. Sharing Files There are 4 ways to share files with Basilisk II.
Conclusion - use MacOS 7.5.5, classic networking, and Linux volume shared with Netatalk and, optionally, Samba, for simultaneous access from Basilisk II and Windows. If you run Basilisk II as non-root, do not forget to set proper permissions for dev/sheep_net. Note: if you run VMware or WIn4Lin simultaneously with Basilisk II, you should not share the same CD-ROM drive (you will not be able to eject CD disk because it will be mounted by two OS). I have DVD-ROM and CD-RW, so it was not a problem. Performance Objective: test real-world performance of 68k MacOS emulated under Basilisk II on x86 Linux. Hardware: AMD Athlon XP1600+ CPU (1.4 GHz), 512 MB DDR RAM, VIA KT266A chipset, 40 GB 7200 rpm Maxtor hard drive. Host OS: SuSE Linux 7.3, kernel 2.4.16, Free 4.2, ReiserFS root partition, running servers - Netatalk, Samba, CUPS, Apache, ProFTPD, WEBMIN, Free. Guest OS: MacOS 7.5.5 running in 64 MB RAM partition, 550 MB HFS formatted disk image on Linux ReiserFS root, 800x600 resolution/thousands of color mode, 128 KB disk cache, virtual memory off, AppleTalk off. Benchmarking Software: Norton System Info 3.5, MacBench 3.0.
At a glance, performance of MacOS 7.5.5 emulated on Basilisk II running on AMD Athlon XP 1600+ CPU (1.4 GHz) roughly equals to Power Macintosh 6100/60 (PowerPC 601 CPU/60 MHz), except disk scores. The enormously high disk scores may be explained by my assumption that Linux simply cached in RAM portions of HFS disk image used by benchmarking software. However, I have used first-generation Power Macintosh 6100/60 in the past, and can only recall that it have been hell slow. On the other side, Basilisk II on Linux/AMD Athlon XP 1600+ is very very fast - it loads MacOS 7.5.5 within 3 or 4 seconds. Finder operations are completed almost instantly. Stuffit and Retrospect are also snappy. My last word - this system is the fastest MacOS 7 workstation I have ever seen. The Future Currently programmers are busy developing Basilisk II with JIT (Just In-Time Compiler), which will perform on the fly compilation of 68k codes into x86 ones. This cool feature will greatly increase speed of CPU intensive tasks. I have tested Basilisk II v1.0 with JIT beta v0.6, it looked really promising. CPU and FPU scores increased by over 2.6 and 7 times respectively. Disk performance have been significantly lower with JIT on, I have no explanation for this side effect, however (on the graph below JIT scores are in the row #2).
If you want to get JIT working, you have to recompile Basilisk II with "--enable-jit-compiler" and "--enable-jit-fpu" options, and then edit Basilisk II configuration file to explicitly enable JIT (or turn it on in preferences dialog). Additionally, translation cache size should be 16 KB or greater, and translation cache flush must be lazy version 1 (slower) or version 2 (faster), otherwise compiled instructions will be disposed off immediately after execution, resulting significant degradation of performance. JIT v0.6 is not free from some artifacts - Norton Utilities always crash or freeze MacOS on application launch. Additional Benefits With Basilisk II, you can run 68k MacOS and its software at very good speed (if you have fast PC hardware, of course), on both Linux and Windows. It may be a relief for Mac souls for some reasons converted to Windows (I am lackey, I am not one of them). However, for me, the most important benefit of Basilisk II is that this cool piece of software made possible to transfer data without loosing Mac-specific information across Linux/Mac/Windows, and use Claris Emailer with around 50,000 e-mail's in the archive under Linux. Screenshot Basilisk II screenshot (KDE 2.2 desktop running GIMP and Basilisk II, MacOS 7.5.5 running Norton Utilities and Netscape Communicator displaying WEBMIN page from Linux) is available here. Problems Compiling sheep_net Kernel Module If you have problems compiling Basilisk II sheep_net kernel module on Linux with 2.4.19 kernel, please refer to this page for solution. |