Je suis Charlie

Autres trucs


Seulement les RFC

Seulement les fiches de lecture


My PowerMac 7200 and Linux

First publication of this article on 15 June 2000

My girlfriend bought a second-hand Apple PowerMacintosh 7200 (to congratulate herself for the ebook Conception et animation d'un serveur Web associatif - in French). This was a good opportunity to test Linux on it. Unfortunately, unlike what happens with PC laptops, it seems there is no list of Web servers describing how Jim or Joe had setup their Mac with Linux. So, I've made this page to document how I've installed and configured it. Because of various hardware problems (the 7200 does not recognize modern hard disks and I have various SCSI problems with the old disks), I had to discontinue the experience. I no longer have a Powermac/Linux so don't ask me too many questions.

I did not buy it, someone else did, so I did not check its compatibility with Linux, like you should always do with a new machine. As a second-hand machine, it came with no documentation at all. So, I still do not understand some features. You could find very detailed information about its hardware at but, like many corporations, Apple deleted it from its site once the machine was "too old". The choice of Linux was because I wanted to try Linux outside of the Intel-*386 world.

The PowerMacintosh 7200 is no longer manufactured by Apple. The CPU is a 120 Mhz PowerPC 601. The hard disk a 500 Mb SCSI. The mouse has only one button, which is a pain for X11. It seems to be Y2K-compliant :-)

Because of a RAM extension, it has 144 Mb of memory. I have an Ethernet card. There is an internal hard disk and two external disks, on the SCSI bus (plus a scanner, which I did not try with Linux yet). The output of program dmesg is included here for more information:

device tree used 14980 bytes
Total memory = 144MB; using 1024kB for hash table (at c0300000)
Linux version 2.2.12-2 ( (gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)) #1 Fri Oct 8 18:07:08 MDT 1999
PCI bus 0 controlled by bandit at f2000000
Cache coherency enabled for bandit/PSX at f2000000
System has 32 possible interrupts
Console: colour dummy device 80x25
Calibrating delay loop... 119.19 BogoMIPS
Memory: 142260k available (1556k kernel code, 3496k data, 144k init) [c0000000,c9000000]
DENTRY hash table entries: 262144 (order: 9, 2097152 bytes)
Buffer-cache hash table entries: 262144 (order: 8, 1048576 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
adb devices: [2]: 2 5 [3]: 3 1
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
TCP: Hash tables configured (ehash 262144 bhash 65536)
Starting kswapd v 1.5 
OHCI USB Driver loading
USB HID boot protocol mouse driver registered.
USB Printer support registered.
MacOS display is /platinu
Total VRAM = 1MB 0001
Monitor sense value = 0x60b, using video mode 13 and color mode 0.
Console: switching to colour frame buffer device 104x39
fb0: platinum frame buffer device
ADB keyboard at 2, handler set to 3
ADB mouse at 3, handler set to 2
PowerMac Z8530 serial driver version 1.01
tty00 at 0xf3013020 (irq = 15) is a Z8530 ESCC, port = modem
tty01 at 0xf3013000 (irq = 16) is a Z8530 ESCC, port = printer
pty: 256 Unix98 ptys configured
Macintosh ADB mouse driver installed.
Macintosh non-volatile memory driver v1.0
Sound initialization started
Sound initialization complete
DMA sound driver installed, using 4 buffers of 32k.
RAM disk driver initialized:  16 RAM disks of 4096K size
loop: registered device at major 7
fd0: SWIM3 floppy controller 
scsi0 : 53C94
scsi : 1 host.
USB hub driver registered
  Vendor: QUANTUM   Model: TRB540S           Rev: 0405
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
  Vendor: UMAX      Model: Astra 610S        Rev: V1.3
  Type:   Scanner                            ANSI SCSI revision: 02
  Vendor: MICROP    Model: 1924-21MZ1077802  Rev: HZ2P
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sdb at scsi0, channel 0, id 2, lun 0
  Vendor: MATSHITA  Model: CD-ROM CR-8008    Rev: 8.0e
  Type:   CD-ROM                             ANSI SCSI revision: 02
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 3, lun 0
  Vendor: QUANTUM   Model: FIREBALL_TM1280S  Rev: 300N
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sdc at scsi0, channel 0, id 6, lun 0
scsi : detected 1 SCSI cdrom 3 SCSI disks total.
Uniform CDROM driver Revision: 2.55
SCSI device sda: hdwr sector= 512 bytes. Sectors= 1065235 [520 MB] [0.5 GB]
SCSI device sdb: hdwr sector= 512 bytes. Sectors= 4096656 [2000 MB] [2.0 GB]
SCSI device sdc: hdwr sector= 512 bytes. Sectors= 2503872 [1222 MB] [1.2 GB]
PPP: version 2.3.7 (demand dialling)
TCP compression code copyright 1989 Regents of the University of California
PPP line discipline registered.
eth0: MACE at 00:05:02:88:8d:56, chip revision 25.64

And /proc/pci contains:

PCI devices found:
  Bus  0, device  11, function  0:
    Host bridge: Apple Bandit (rev 3).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=32.  
  Bus  0, device  16, function  0:
    Hot Swap Controller: Apple Grand Central (rev 2).
      Medium devsel.  Master Capable.  Latency=32.  
      Non-prefetchable 32 bit memory at 0xf3000000 [0xf3000000].

I've choosen Linux for the reasons mentioned before. It could have been NetBSD (although it does not seem supported), but I'm more used to Linux. And I wanted the Debian distribution since it is by far the easiest to manage (specially on the long term, when you install new stuff or upgrade) and because it emphasizes freedom and cooperation (all the other Linux distributions were commercial).

Apart from that, the software is typical of an Unix box. The whole stuff, including monsters like Emacs, X11 and LaTeX, takes 320 megabytes of hard disk.

Before starting the installation, I had to think about a proper partitioning. Two hard disks were already partitioned (with a MacOS partition on each, which is seen with a different number, 4 on one disk and 5 on the other) and filled in. A third disk was completely new, I just had to let one partition for MacOS. Remember that the Macintosh is not mine so I was very careful not to destroy what existed before.

I used the pdisk tool, in its MacOS version, to create Apple_UNIX_SVR2 partitions, the ones which are accepted by Linux. The cfdisk run by the Debian installer is not able to manage MacOS partitioning. The MacOS partition was initialized by Apple's "Drive setup". The Linux partitions were initialized by mke2fs, run from the Debian installer.

There is also a Unix version of pdisk, available as a RPM or as source. But do not use cfdisk (menu "Partition a hard disk") on a disk which MacOS may use.

So, my partitions are not seen by fdisk, but it is a minor annoyance. Here is what pdisk says:

Partition map (with 512 byte blocks) on '/dev/sdb'
 #:                type name             length   base    ( size )
 1: Apple_partition_map Apple                63 @ 1      
 2:      Apple_Driver43*Macintosh            54 @ 64     
 3:      Apple_Driver43*Macintosh            74 @ 118    
 4:       Apple_Patches Patch Partition     512 @ 192    
 5:     Apple_UNIX_SVR2 root            1946257 @ 704     (950.3M)
 6:     Apple_UNIX_SVR2 swap             273301 @ 1946961 (133.4M)
 7:     Apple_UNIX_SVR2 home             423430 @ 2220262 (206.8M)
 8:           Apple_HFS Sans titre 4    1452954 @ 2643692 (709.5M)
 9:          Apple_Free Extra                10 @ 4096646

Device block size=512, Number of Blocks=4096655 (2.0G)
DeviceType=0x0, DeviceId=0x0
1: @ 64 for 21, type=0x1
2: @ 118 for 32, type=0xffff

Since the Debian installer requires the base system to be found somewhere and since the Linux kernel can read HFS (MacOS filesystem), I put base2-2.tgz on a MacOS partition, which I mounted from the installer.

For booting the Linux kernel, in order to use the installer, there are typically several options:

  • On machines with a working OpenFirmware ("newworld", to my knowledge, G3 and G4 but not the 7200), you can boot directly from a Linux floppy, with the yaboot program.
  • With a MacOS tool, which will run at startup or once the Finder is there, BootX. (It plays the same role as loadlin on MS-DOS.) It requires MacOS, which is a political problem (MacOS is not free) but not a practical one (I don't think you can buy a Mac without MacOS, which is a shame, but this is another story).

To be sure I didn't risk to change anything on the MacOS side, I used BootX. I put the Debian kernel in the "Linux Kernels" folder into the System folder, and BootX accepted to start it. For reasons I don't know, the current Debian kernel (a Linux 2.2.12) does not see the SCSI disks of the 7200. So, I used the kernel from LinuxPPC, which, while being the same Linux version, works fine. BootX allows you to have several kernels in "Linux kernels" and to switch at will.

After filling the disk with the things I need, df showed:

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb5               957792    329024    580112  36% /
/dev/sdb7               205018      1940    192493   1% /home
/dev/sdb8               726466     18779    707687   3% /MacOS/gros-truc
/dev/sdc4              1251763    952594    299169  76% /MacOS/Paulo_2
/dev/sda5               532244    165104    367140  31% /MacOS/Disque_interne

One the base system installed, I quit dselect immediately and everything was installed by apt-get. That way, I'm sure I will only get the minimum I wanted and I still benefit from the dependencies management.

At the time of this writing, I use kernel 2.2.12. It is the precompiled kernel from LinuxPPC, I had no time to recompile a kernel, yet (and upgrading a kernel with BootX is unc onvenient, since BootX can only boot from a MacOS partition). Power off when shutting down works fine.

The Ethernet card was recognized automatically. Nothing special. The kernel sees it that way:

eth0: MACE at 00:05:02:88:8d:56, chip revision 25.64

Since there is a running home server on the same local network, I just had to configure sendmail that way, in

FEATURE(nullclient, `[]')dnl

The X server for framebuffers (Debian package xserver-fbdev) worked fine, with the XF86config installed by default. My keyboard is a French AZERTY, and I have some problems. The map "mac-fr3" seems fine with the console. The Debian installer refused to change the map (menu "Configuring the keyboard"), saying "This is not a valid binary keymap". Under X11, I still have missing characters, like the |, even when they are fine on the console.

At startup, the X server says:

XFree86 Version 3.3.6 / X Window System
(protocol Version 11, revision 0, vendor release 6300)
Operating System: Linux 2.3.10 ppc [ELF] 
Configured drivers:
   FBDev: Server for frame buffer device
   (Patchlevel 11): mfb, afb, cfb8, cfb16, cfb32, NCR 77C32BLT (accel), ATI Mach64 (accel), IMS TwinTurbo (accel), 3Dlabs Permedia 2 (accel)
(using VT number 7)

XF86Config: /usr/X11R6/lib/X11/XF86Config
(**) stands for supplied, (--) stands for probed/default values
(**) XKB: disabled
(**) Mouse: type: BusMouse, device: /dev/mouse, buttons: 3
(**) FBDev: Graphics device ID: "Linux Frame Buffer Device"
(**) FBDev: Monitor ID: "Generic Monitor"
(**) FontPath set to "/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/"
(**) FBDev: Using default frame buffer video mode
(--) FBDev: Frame buffer device: platinum
(--) FBDev: Video memory: 1024K @ 0xf1000090
(--) FBDev: MMIO regs: 4K @ 0xf8000000
(--) FBDev: Type 0 type_aux 0 bits_per_pixel 8
(--) FBDev: Hardware accelerator: None
(--) FBDev: No driver support for hardware acceleration
bpp = 8, depth = 8, BitsPerRGB = 8
(--) FBDev: Using cfb8 driver

I didn't test the sound.

A few other references:

Version PDF de cette page (mais vous pouvez aussi imprimer depuis votre navigateur, il y a une feuille de style prévue pour cela)

Source XML de cette page (cette page est distribuée sous les termes de la licence GFDL)