Notes on getting Linux running on my Twentieth Anniversary Macintosh.
Choice of Operating Systems
Why not stick with Mac OS 7.6.1? There's a site on the net devoted to
running System 7 on older Mac hardware and yet still "get along" with
other modern systems. I'm intrigued, it looks cute.
I'll probably give this a go sometime.
Check out
http://main.system7today.com/
and
http://www.macdrivermuseum.net/
Mac OS 8.0? You've got to be kidding. How that half-finished chunk of shit
ever escaped the labs at Apple, I'll never know.
Mac OS 8.1? That's what I used to run on my TAM. I'm looking for something
more capable, that's all.
Mac OS 8.5? 8.6? 9? Ahh, and here's where it all goes to hell.
The TAM has some decidedly odd hardware in it, and with every
subsequent release of Mac OS, it was supported less well.
Eventually, it got so bad one would be afraid of touching the
volume control for fear of getting blown into the next room by
the Bose sound system. Sounds great, if only we could
control the
damn thing...
BSD? That's what I wanted to run. But the open firmware video
support (necessitated by some bizarre hardware) isn't quite
up to snuff, and you'll wind up having to use a serial port as
your console. No fun. Although, I really
want to go back to
BSD, so maybe I'll try this some day.
Why Is This Hard?
Well, for a few reasons...
Video: Okay, the video is built from an ATI 3D Rage II
processor with 2MB of VRAM, connected to an 800x600 LCD
screen. Straightforward, right? Suuuuuuure, except that the
system lies to you. The video system
only works in 800x600,
but open firmware merrily indicates to the OS it hosts that, sure,
go ahead and start up in 640x480 mode. Which never works,
and leaves you without a console. Stare at that blank screen
while the kernel churns away underneath you. And if a mere
text console is hard, I bet you can't wait for XFree86 to get
in on the act. Fun fun fun!
Audio: Sure, one of the reasons you bought this puppy, right?
Sounds great,
except that the hardware audio mixer is not like
any of the other mixers Apple spec'd in their Macs. Which means
that your volume control for things like, say, the CD player is either
off or BLARING. Basically, the bottom 60% or so of the volume range is
completely silent; once you get to 61% (or whatever the number actually is),
it comes on full blast.
Fortunately, this insanity only affects the CD-ROM, FM Radio, and TV Tuner
portions of the system; the DSP seems to be controlled normally, so
you can at least decode and play sound files at normal volume.
Tuners: The TAM has a built in TV Tuner and FM Radio. Which, of course,
no one knows anything about. They've
got to be somewhat standard,
one of these days I'll prod them a bit and see if there's a driver that
understands them under Linux or BSD systems.
Some people will try to convince you that a TAM is just a
PowerMac 5400/5500/6400/6500
mounted on its side, with some parts from a PowerBook 3400 thrown in.
Don't listen to these people; they don't own one and don't know what they're
talking about.
Those people are quoting Apple's documentation at you, which any fool can do.
Yes, it's an Alchemy or Gazelle motherboard, but it's not just like the other
PowerMacs and it won't "just work" like the other systems do.
For example:
Here's a wonderful summary of the TAM. Each sites purports to tell you
everything you need to know about one.
If you want to see the system with its Bose soundsystem, or the vertically
mounted CD-ROM, or the leather palmrests on the keyboard, go to one of
the following links. When you're done giggling at how many different sites
can't even get the basic facts consistent, come on back here.
Which Linux?
I've installed and tried the following systems.
Currently, I've found Yellow Dog Linux 3.0.1 to be the most
effective distro for the TAM. I
do plan to upgrade to later
releases of YDL, but I'm in no hurry right now. Everything's
finally working (to some degree), and I
know that upgrading
to a 2.4 kernel is going to break some things.
Anyway. Here are the systems I've tried. In all cases, I've used
BootX. I know
people complain that it isn't "clean" in the way it leaves the hardware
when Linux is loaded after Mac OS; but, to be honest, the only place
this has ever bitten me is in the ADB keyboard's caps lock key (see
"Problems" below on dealing with this).
All of the following systems either have flaky video, or lack support
for a major piece of the system (like, say, the SCSI controller) you'll
need for the install.
- Debian 3.1r4
- Mandrake 10.1
- YDL 4.0.1
- YDL 4.1
Even YDL 3.0.1 wasn't perfect. Though it seems to support the TAM
very well, I still couldn't use the Farallon Comm Slot II ethernet card
with it. Eventually, I gave up and grabbed a PCI based ethernet card
for it. Later versions of YDL work with the CSII card, so I'm guessing
that at a later date, if I upgrade the system and fix the video drivers,
I'll have a pretty good setup.
My Hardware
Here's my system. This is what worked for me.
- 128 MB RAM
- 4 MB L2 Cache DIMM
- 6 GB disk from an old PowerBook.
- Belkin (Realtek) 10/100 PCI Ethernet card
- Farallon 10/100 Comm Slot II Ethernet card (not used at present)
Mac OS Setup
Set up a 256 MB partition on your disk to hold some version of Mac OS.
In this, install BootX.
From the 3 YDL 3.0.1 CD-ROMs, get the first one. Mount it under Mac OS,
and look for two kernels and a ramdisk image.
You'll need both kernels! One is labeled with "BOOT" in its name, the other isn't.
Place both of them in your
Linux Kernels directory.
Store the ramdisk image somewhere sane.
Run BootX. Clear the kernel arguments line, you won't need to specify
anything for YDL 3.0.1. Under
Options point it at the ramdisk image
you copied off the CD.
Choose the
...BOOT kernel.
Check the
No Video Driver option (so the system will use the Open Firmware framework).
Leave the Ramdisk size at 8K.
Note: If you're trying to use one of the other distros, and you're working with a
2.4 or 2.6 kernel, do
not check the
No Video Driver option. Leave it clear,
and instead, supply
video=atyfb:vmode:10,cmode:8 as a kernel argument.
The color bit depth, set by
cmode in that line, can be 8 or 16. There isn't
one value that works best for all distros, so be prepared to try both.
Installing YDL Linux
Everything's pretty normal here. As far as your disk partitions goes,
give yourself 256 MB for a swap partition, and set aside some chunk
of the disk for
/home accounts. Use the rest for the root filesystem.
Since we're using BootX and not quik, there's no reason not to use ext3
for those filesystems.
Go through the installation. It'll take a couple hours to grind through
all three CD's.
Eventually, you'll need to reboot. When you do this, there are two
changes to make in BootX. Don't forget this!
- Change your kernel from the
...BOOT variant to the other "plainly" named one.
- Kill your ramdisk, and select the partition that holds your root filesystem. This is probably something like "hda6" or "hda7", assuming you started with a typical Apple-partitioned hard drive.
One of the very first things you'll want to do is bring your system up to date.
It's still a YDL 3.0.1 box, but at least it'll be as up to date as they got.
Do this with
yum update and sit back. Be patient. Wait a while.
Answer 'y'es when the time comes.
Adding Freshrpms
Add the Freshrpms site to your updater's configuration.
Edit your
/etc/yum.conf file and add this text to the bottom.
[freshrpms]
name=Yellow Dog Linux 3.0 - ppc - freshrpms
baseurl=http://ayo.freshrpms.net/yellowdog/3.0/ppc/freshrpms
Just to get it over with, do something like
yum list now. It'll
force all the headers to be downloaded from Freshrpms so that
it'll know what software is available. You don't have to do that
now, of course, but if you do, there will be less waiting later
when you actually want to download something!
Fixing Video
The text console mode under YDL 3.0.1 works great when you boot
with
video=ofonly (or if you just check the
No Video Driver box).
However, when you're running X, you'll probably notice some strangeness.
The anaconda-generated
/etc/XF86Config file will leave some pixels
off the side of your screen.
If you run
Xautoconfig without any arguments, you get a different
configuration... one that leaves pixels off the
other side of your screen.
sigh
But, if you run
Xautoconfig with the
--safe option, you'll get a configuration
that looks perfect on your screen. Sure, you don't have any snazzy video
acceleration, but we'll worry about that some other day.
Note: We still have no control over screen brightness or contrast yet.
Fixing Sound
YDL 3.0.1 does support sound, but for reasons I can't be bothered with
chasing down, neither YDL's anaconda nor the underlying Redhat sound
detection stuff works right.
There's nothing to trigger the loading of the proper kernel modules for
sound.
We
could do this with some start and stop init scripts, but it turns out
the LKM mechanism is fancy enough that we can add sound support
with a single line change to the
/etc/modules.conf file.
First, get the major device number of
/dev/dsp on your system.
It's probably 14, but it never hurts to double check (maybe you and I are
loading slightly different systems).
Then, add a line like the following to
/etc/modules.conf, replacing
the 14 as appropriate.
With this change, the first program to touch
/dev/dsp will cause
a flurry of kernel modules to be loaded via
modprobe, which
will support the underlying sound system.
alias char-major-14 dmasound_pmac
Note: The hardware audio mixer still needs to be fixed.
If you have the
sox package loaded, you can try it out with something
simple like
play -v 0.3 /usr/share/sounds/*Ahem*
At this point, you'll know if your sound is working right.
If you want to play MP3's, you'll need an MP3 decoder added to your system.
There's a ton of packages that you could add, that would all trigger support
for MP3 to be loaded into your system. I suppose things like
xmms would
do it. But, just to get the ball rolling, here's something quicker.
Just run
yum install mpg321 and let it pick up a couple dependencies
along the way; install them all.
Then, you can just run
mpg321 -g 50 foo.mp3 to listen to an mp3 at
a moderately low gain (volume).
Front Panel Buttons
Nothing fixed here, yet. Nor is the remote control working, either.
I suspect these devices all live on the I2C bus, so it's probably not
going to be very hard to get them going.
Again, another day...
TV Tuner
Don't make me laugh.
FM Radio
Again, don't make me laugh.
Problems
Q: My caps lock key is flickering, and/or I get all upper case or mixed
case characters when I type, even though I'm not hitting the shift key.
A: Yup. I
think this is a side effect from using BootX instead of quik
as your boot loader. I've found that, when this happens, if I just hit
the caps lock key a bunch of times, the system finally syncs back up
with it and it starts working right. The light may stick on, but the key
will work as you'd expect.