In a copy of Linux Format magazine, they had an article by Richard Smedley called “What on Earth is…PEARPC”. After reading it, and lots of experience with emulators and simulators over the years, it peaked my interest. With just a little effort, I was able to run Mac OS X on my Linux host. For more than 20 years, I’ve been a big admirer of the Mac’s attention to detail in the user interface. I’ve even had conversations with Elana and friends about switching over to a PowerBook sometime soon.
So trying out PearPC was sure enticing. The pearpc.sourceforge.net site has a plethora of goodies for you, including some nice easy instructions on how to do it. Interestingly, they talk about using Darwin to partition a disk image (not a physical drive) for the installation. I tried a few times, but it kept freezing after the line
Warning: AppleMacIO self test fails
However the ideas posed on the blog at Designspace (I can’t find a person’s name for attribution) suggested that this was a little too much and the Disk Utility available inside the installer itself would be enough. The fact that others also offered ways to do all of this without first using a Darwin boot CD gave me some hope. There was some mention of getting a preformatted hard drive image out of pearpc.net
though I didn’t actually use this.
I had to use the CVS version of PearPC instead of 0.3.1, the last release sent out in September 2004. The CVS tree is able to boot off the ISO image of the CD, while 0.3.1 doesn’t even show it as existing. My ppccfg
file pointed at the ISO image I created from Elana’s first CD for installing Panther (Mac OS X v10.3). I changed prom_bootmethod
to have the value select
so I could pick the CD image by hand just in case. I created my disk image with
dd if=/dev/zero of=myharddisk.img bs=516096 seek=12482 count=0
and pointed the ppc program to it with the line
pci_ide0_master_image = "/osx/myharddisk.img"
in my ppccfg
. I also changed the line
pci_ide0_slave_image = "/osx/osx-3.iso"
to be the image I created of the OS X install disk 1 CD. I created that image with the command
dd if=/dev/cdrom of=osx-3.iso
So when I got it to boot and run the installer, and it was asking me what device to install it on (but showed no choices), I used Open Disk Utility
from the Installer
pull-down menu, clicked on the disk image (not the CD), on the Partition pull-down selected “1 Partition” , and then chose Partition
. It did well, but when I quit out of that, the Installer said “you cannot install Mac OS X on this volume”. Almost gave up, but tried again—and it worked! I didn’t note the URLs, but I found a couple of places explaining how they got around this same problem just by quitting the Installer and running it again. Voila, that did the trick.
The install went great, and I was able to run src/ppc ppccfg
and see OS X boot up in the window. How cool.
The part to still solve: I can’t get networking to behave well yet. I first had to make sure to do
chown root /osx/pearpc-cvs/scripts/ifppc_up
chmod g-w /osx/pearpc-cvs/scripts/ifppc_up
as root to make PearPC be willing to actually use the script. First enabling pci_3c90x_installed
in my ppccfg
, it never showed the device when I looked in System Preferences. Then I switched to enable pci_rtl8139_installed
; that was a lot better, and even showed the device during the messages of the boot sequence. I also had to run ppc
as root with
sudo src/ppc ppccfg &
in order to make lots of permissions problems not come up related to changes to the network device.
Choosing Network
under the System Preferences made a window pop up announcing that it saw the device. But after that, I wasn’t able to get it to show me that it had successfully used DHCP. Hmm, writing this now I realized that I never made my system enable IP forwarding. Hmmm.
Anyway, now that I’m trying it again with networking enabled, I see
ppc0: error fetching interface information: Device not found
...
UID=0
/osx/pearpc-cvs/scripts/ifppc_up: line 16: brctl: command not found
/osx/pearpc-cvs/scripts/ifppc_up: line 17: brctl: command not found
/osx/pearpc-cvs/scripts/ifppc_up: line 18: brctl: command not found
SIOCSIFADDR: No such device
br1: unknown interface: No such device
SIOCSIFNETMASK: No such device
br1: unknown interface: No such device
SIOCADDRT: Network is unreachable
program terminated with exit code 7
main() caught exception: error executing ifconfig.
Gahh. Back to pearpc 0.3.1, which does much better. It has pci_rtl8139_installed
in its ppccfg
. But it still freezes at
Warning: AppleMacIO self test fails
When I can get the CVS version of pearpc to boot, if I move the mouse while it’s booting I get
[IO/CUDA] Event processing timed out. Event dropped.
appearing a few times until I’m kind enough to stop moving the mouse any more. And attempts to boot with
pci_ide0_slave_image = "/dev/cdrom"
always gets me the error
[IO/IDE] /dev/cdrom: could not open file (No medium found)
and it exits. So I stick a random CD in the drive, and it gets past that—and back to the AppleMacIO warning. I wonder what I did last night to get it to boot successfully (albeit without networking), but now whether I use PearPC 0.3.1 or the CVS version, it’s hanging at the same place. Even if I change ppccfg
to use (or not) the CD image. Or either options for networking or not. Or if I try with a new untouched system disk image or not. Gahh. Trying an strace
shows it looping with
futex(0x810a4d8, FUTEX_WAKE, 1) = 0
clock_gettime(CLOCK_REALTIME, {1113159672, 863922000}) = 0
clock_gettime(CLOCK_REALTIME, {1113159672, 864070000}) = 0
futex(0x810a4f4, FUTEX_WAIT, 5831, {0, 9852000}) = -1 ETIMEDOUT (Connection timed out)
after that warning message. I wonder why its connection is timing out?
Darn, I was hoping what I’d be writing was a description of how I got it to work for me. Not just yet.
More later. 🙂