Linux on PowerMac G4 350


Introduction

In this small document I will try to describe how I installed and configured Linux on my brand new G4. Please note that I'm not a MacOS expert and I had never used this system before (oh yes, ok... once but I got sooo frustrated when I had to drag my floppy to the bin to eject it that I had never tried again...).
As strange as it sounds, I bought this machine only to run Linux on it (because it reallyshines and a computer is a terrible thing to waste). So maybe my config will seem strange to most Mac users (especially the keyboard mapping). If you have any suggestion, any comment, I'll be really happy to hear from you.

Used configuration

SystemPowerMac G4 (7400)/350MHz, 1Mb L2 cache, 128Mb RAM
VideoATI Rage128 PCI video card
DiskIDE QUANTUM FIREBALL CX10.2A, 9787MB w/418kB Cache
CD-ROMATAPI (IDE) MATSHITA CR-589
Keyboardfrench(!) integrated kbd (will try a QWERTY Macally soon)
MouseLogitech wheel mouse M-BB48
Modemintegrated ATI="56000" ATI1="APPLE VERSION 0013-2,11/24/1998" ATI3="V2.200-V90_2M_DLS" ATI4="Apple Internal Modem" ATI6="RCV56DPF-PLL L8571A Rev 29.00/29.00"

How to install (in fact, how I did the install...)

The install process

Generic install process is very clearly documented by LinuxPPC
Follow the directions concerning the Blue G3.
I did the install through the network from my laptop because my CD-ROM was a standard ISO one (ie not HFS).
I only tried LinuxPPC (no YDL,...) as I were fully satisfied.

After the install, the system is VERY unstable (mine managed to boot once on every 3 tries...). Pray hard and use the 2.2.6 install kernel to change the console keymap BEFORE switching to 2.2.15.
Of course, DO NOT try to get a graphical login yet, we'll see later (you should do the install in text mode, too).

The MacOS 9 disk annoyance

When upgrading to MacOS 9, the install program will automatically update the driver on your disk, making it unusable under Linux :(
The solution is to manually re-install the MacOS 8.6 driver after the MacOS 9 install: boot on the MacOS 8.6 CD (by hitting the 'C' key while rebooting) and then launch the 'Disk tools' ('Outils disque dur' in French) from the 'Utilities' ('Utilitaires') folder on the 8.6 CD-ROM; then use the 'Update' ('Mise à jour') command in the 'Functions' ('Fonctions') menu to update your disk with the 8.6 drivers. See http://www.linuxppc.com/news/macos9/ for more information.

How to boot

MacOS with BootX

I currently use BootX extension 1.1.3 with the following settings:

Booting using the BootX app does not seem to work very well...

Open Firmware and yaboot

To boot using the Open Firmware (OF), you will need You then have two options

Configuration

Keyboard

The keyboard is a big issue because the keymap has been changed beetween the 2.2.6 kernel (the kernel we used for the install) and the 2.2.15pre3 kernel (the most stable one at the time of this writing).

These keymaps are far from complete, for example they lack many chars one would find on a US keyboard (like brackets, curly brackets, bar, tilda, etc...). As I don't know how to produce these characters on a Mac running MacOS, I haven't mapped them. I you have any information, please feel free to e-mail me.

Console

My /etc/sysconfig/keyboard file and the corresponding /usr/lib/kbd/keymaps/mac/imac-fr.kmap. Be aware that these are French mappings.
You can use showkey -k as an help to do you own mapping.

X11

You can use Xmodmap to change your keyboard mapping. I do it in /etc/X11/gdm/Init/Default. This script expects the Xmodmap file to be in /etc/X11/xinit/.Xmodmap

Graphics (X11)

Here you have to choice to use either the XFree FBDev X-server (not accelerated) or the Xpmac X-server (2D-accelerated) with USB support hacked by Kevin Hendricks.
I would strongly suggest you go for the Xpmac accelerated server. Follow the directions in the readme file, it's very easy to install and to configure (no config file is needed, forget about the /etc/X11/XF86Config mess).

Mouse

The 3 buttons of my Logitech mouse work fine. I'm currently working on the Xpmac server to add the wheel support...

Sound

Kernel

The dmasound.o module bundled with kernel 2.2.15pre3 works fine.
You can add a /sbin/modprobe dmasound in your /etc/rc.d/rc.local for example to have it loaded automatically.

E-Sound

Unfortunately the version I had (0.2.15) has a problem with byte-ordering; it transforms every sound into a terrible noise ;-(
I recompiled the 0.2.17 version and it fixed the problem (esound-0.2.17-1.ppc.rpm, esound-devel-0.2.17-1.ppc.rpm).

Modem

The internal modem is basicaly a 56K Rockwell modem.
The init string I use is AT&F&C1&D2&Q6W2 (please tell me if yours works better...)
I haven't found a way to enable the sound for the modem so you won't hear it dialing...

Tips

Kernel parameters

My G4 hangs on boot if I don't set the hda=noautotune parameter.
The 'no graphic driver' checkbox allows you to use the same video resolution in MacOS and Linux (w/ the Xpmac server)

Mac-On-Linux (MoL)

MoL is a terrific application which allows you to completely "virtualise" your computer to run a guest operating system with nearly native performance (perfect if you have MacOS apps you don't want to 'scrap' when switching to Linux). A similar tool exists for PCs running Linux or NT (even if I wouldn't recommend this solution): VMWare (please note that it is a commercial product). I've currently successfuly tested MacOS 9 and Linux.

Resources


You can e-mail me at vincentl@ec-lyon.fr