Installing Gentoo on a Mac G3

2006-11-19 23:47:43 PST

Tags: , ,

Well, I now have Bast, my new Mac G3, booting under its own power. It took a bit more work than normal because I ran into a few problems. But its all up and running now, so let's go over the install.

Bast came with MacOS 9 installed. I booted into it, and it was pretty worthless. Admittedly, it did auto detect the net and I got to look at mindstab.net in Mac IE 5. That was about it. None the less, I had intended to try and save the MacOS partition since it was only using a few hundred megs out of a 20GB harddrive.

So put the Gentoo Minimal PPC 2006.1 disk in and rebooted. Unlike x86 where you can jump into the BIOS and change boot order, on a Mac you just hold down the C key when it boots for a while until you get to the cd's boot prompt. You can probably just push it, but it's hard to tell when, since there is no visual feed back, just a black screen, then a grey screen.

My first problems popup up here, or technically a little earlier. Even back in the 90s when this box was made, Apple had apparently moved to all USB peripherals, and cockily enough, not even bothered to include PS/2 ports on their towers. Kind of lame since I have a 4 port PS/2 KVM switch which this box was supposed to use. Thankfully I had picked up a cheap old Apple USB keyboard when I bough t the box. Reportedly though, it had the shortest keyboard cable I've ever seen. I quickly borrowed my usb hub from another box and got reasonable length from them combined. So all is good? Not quite. The Mac boot loader refused to acknowledge the USB keyboard through the USB hub, even with the hub plugged into external power. So I had to go stand over in the corner by the box, and plug the keyboard in and hit C to boot from cdrom and then ENTER to boot the cdrom, and then unplug the keyboard and plug it into the hub before I could sit down, every time I rebooted the mac. Pretty lame.

Anyways, the LiveCD booted up and after the boot loaders, no one had any problem with the Mac keyboard through the hub. Except of course the keyboard was glitchy and old and kept disconnecting/reconnecting so I lost keys when I typed. Had to watch what I typed very carefully. So I immediately got sshd up and running and that was that for the keyboard.

Next I brought up parted and took a look at the partition table. I tried to resize and shrink MacOS 9's HFS+ file system and partition but parted failed on me every time. Everything on the net assured me it would be doable, but they seemed wrong.

From there things went more smoothly. I followed the Gentoo PPC install guide and everything worked pretty well. At times though, I did feel like I was on a second class architecture because they'd give an x86 dependent example, and then below it as though slapped on as after after thought were some PPC instructions. Of course if the instructions didn't really differ, some times they only showed the x86 related version.

I was pretty sure I had the kernel configured properly, but it would have payed off a bit to read dmesg a little bit closer. More about that shortly. The only recommended/stable bootloader for PPC is yaboot. Yaboot doesn't really seem as advanced as grub, but it's not bad. But the docs probably could have elaborated on some points a little more, like what is OpenBoot? and all the options related to it and do I need to configure them? (apparently not)

Anyways, I thought I had everything and rebooted. Apparently not. I got a kernel panic because it couldn't find the harddrive. It took me several say to figure that one out. First of all, it seems to have 2 IDE controllers, one for the Zip drive and CDRom, and another for the harddrive. I had to look closer at dmesg to find the second, a CMD646. The other problem didn't become apparent until more reading.

On the liveCD the Apple IDE controller is compiled in and so those drives get hda and hdb. The CDM646 driver is a module and gets loaded later so on the liveCD the harddrive is hdc. However, once I was compiling the CDM646 driver into my kernel it still wasn't working because now it was detecting the harddrive first and calling it hda, and oddly the cdrom and zip drive because hde and hdf. But I couldn't see that unless I watched the system boot because once it kernel panicked I couldn't scroll back up.

This was a frustrating bug to diagnose and fix, but I finally got it and now the box booted just fine. I was very close but had one more thing to look into. Both on the LiveCD and the new system, /proc/cpuinfo was reporting 50 bogomips, for what should have been more like 700. This bothered me because I wasn't sure if I'd misconfigured something and was missing out on a lot of performance. Finally though, again, after a lot of searching, I found out that in recent kernels, the timing/scheduling mechanism has been altered to be more sane of PPC with the result that bogomips have become a useless measurement tool for performance. The Internet assures me I'm getting my full performance.

And so I now have Gentoo on a PPC computer, my alternate arch test box. Also, I've since picked up a Dynex PS/2 to USB converter and have the G3 hooked up to my KVM switch as it should be.

Leave a Reply

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
20 queries. 0.409 seconds.